David Sterba wrote:
> On Wed, Aug 03, 2011 at 08:07:42PM +0200, David Sterba wrote:
>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to