Thread (6 messages) 6 messages, 5 authors, 2011-08-12

Re: [RFC, crash][PATCH] btrfs: allow cross-subvolume file clone

From: Li Zefan <hidden>
Date: 2011-08-04 02:42:09

David Sterba wrote:
On Wed, Aug 03, 2011 at 08:07:42PM +0200, David Sterba wrote:
quoted
I'm working on a patch to fix cross-volume cloning, worked for simple cases
like cloning a single file. When I cloned a full linux-2.6 tree there was a
immediate BUG_ON (after third cloned file) in btrfs_delayed_update_inode
with -ENOSPC :
oh, a similar issue was already reported on 5 Jul 2011:

"[BUG] delayed inodes and reflinks"
http://permalink.gmane.org/gmane.comp.file-systems.btrfs/11763 
We've got four reports on this bug.

The cause is we didn't reserve enough space when starting a transaction.

We need space for:

1. btrfs_insert_empty_item()
2. btrfs_update_inode()
3. btrfs_drop_extents()

The first 2 are easy, but drop_extents is not, we have to calc the space
needed for drop_extents in worst case.

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