Thread (3 messages) 3 messages, 2 authors, 2015-10-17

Re: [PATCH v5 9/9] btrfs: btrfs_copy_file_range() only supports reflinks

flat view

From: Chris Mason <hidden>
Date: 2015-10-16 13:19:50
Also in: linux-btrfs, linux-fsdevel, linux-nfs

On Fri, Oct 16, 2015 at 05:25:44AM -0700, Christoph Hellwig wrote:
On Fri, Oct 16, 2015 at 07:49:19AM -0400, Chris Mason wrote:
quoted
quoted
Yes, that would be my preference.  I'd also like to understand what
exactly btrfs does in fallocate.
For which part?  The answer changes based on how many references there
are to a given fallocated region.
Both cases.  With btrfs allocating new block on every write how do you
avoid that ENOSPC?  Is there a unassigned block preallocation that's
made persistent in some way?
So:

fallocate 1g -> foo

reflink foo foo2

We've now implicitly doubled the size of the fallocate, but at reflink
time btrfs doesn't account for the doubling.  It's actually much
better in this case to just use a hole because neither foo or foo2 can
use the preallocated space until the 1g is fully unshared.

When we're doing writes, it'll check the preallocated extents for extra
refs and force COW if any exist.  So writes into a preallocated region
can enospc.

-chris
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help