Gentoo Archives: gentoo-user

From: Kai Krakow <hurikhan77@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: [offtopic] Copy-On-Write ?
Date: Sat, 16 Sep 2017 12:06:23
Message-Id: 20170916140607.4239cd75@jupiter.sol.kaishome.de
In Reply to: Re: [gentoo-user] Re: [offtopic] Copy-On-Write ? by Rich Freeman
1 Am Fri, 15 Sep 2017 14:28:49 -0400
2 schrieb Rich Freeman <rich0@g.o>:
3
4 > On Fri, Sep 8, 2017 at 3:16 PM, Kai Krakow <hurikhan77@×××××.com>
5 > wrote:
6 > >
7 > > At least in btrfs there's also a caveat that the original extents
8 > > may not actually be split and the split extents share parts of the
9 > > original extent. That means, if you delete the original later, the
10 > > copy will occupy more space than expected until you defragment the
11 > > file:
12 >
13 > True, but keep in mind that this applies in general in btrfs to any
14 > kind of modification to a file. If you modify 1MB in the middle of a
15 > 10GB file on ext4 you end up it taking up 10GB of space. If you do
16 > the same thing in btrfs you'll probably end up with the file taking up
17 > 10.001GB. Since btrfs doesn't overwrite files in-place it will
18 > typically allocate a new extent for the additional 1MB, and the
19 > original content at that position within the file is still on disk in
20 > the original extent. It works a bit like a log-based filesystem in
21 > this regard (which is also effectively copy on write).
22
23 Good point, this makes sense. I never thought about that.
24
25 But I guess that btrfs doesn't use 10G sized extents? And I also guess,
26 this is where autodefrag jumps in.
27
28
29 --
30 Regards,
31 Kai
32
33 Replies to list-only preferred.

Replies

Subject Author
Re: [gentoo-user] Re: [offtopic] Copy-On-Write ? Rich Freeman <rich0@g.o>
Re: [gentoo-user] Re: [offtopic] Copy-On-Write ? Dan Douglas <ormaaj@×××××.com>