On Fri, Sep 8, 2017 at 3:16 PM, Kai Krakow <hurikha...@gmail.com> wrote:
>
> At least in btrfs there's also a caveat that the original extents may
> not actually be split and the split extents share parts of the
> original extent. That means, if you delete the original later, the copy
> will occupy more space than expected until you defragment the file:
>

True, but keep in mind that this applies in general in btrfs to any
kind of modification to a file.  If you modify 1MB in the middle of a
10GB file on ext4 you end up it taking up 10GB of space.  If you do
the same thing in btrfs you'll probably end up with the file taking up
10.001GB.  Since btrfs doesn't overwrite files in-place it will
typically allocate a new extent for the additional 1MB, and the
original content at that position within the file is still on disk in
the original extent.  It works a bit like a log-based filesystem in
this regard (which is also effectively copy on write).


-- 
Rich

Reply via email to