]> git.ipfire.org Git - people/arne_f/kernel.git/commit
Btrfs: skip subvol entries when checking if we've created a dir already
authorJosef Bacik <jbacik@fusionio.com>
Mon, 12 Aug 2013 14:56:14 +0000 (10:56 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Oct 2013 01:14:32 +0000 (18:14 -0700)
commit1aa65a004a258d3a83eb9f55f4277d9688ec35c5
treeea8d0739f725acc9be653a4c9d5f48d622779e6e
parent5c9f7ebcf25e00906b62239a457a7bb22b90135d
Btrfs: skip subvol entries when checking if we've created a dir already

commit a05254143cd183b18002cbba7759a1e4629aa762 upstream.

We have logic to see if we've already created a parent directory by check to see
if an inode inside of that directory has a lower inode number than the one we
are currently processing.  The logic is that if there is a lower inode number
then we would have had to made sure the directory was created at that previous
point.  The problem is that subvols inode numbers count from the lowest objectid
in the root tree, which may be less than our current progress.  So just skip if
our dir item key is a root item.  This fixes the original test and the xfstest
version I made that added an extra subvol create.  Thanks,

Reported-by: Emil Karlson <jekarlson@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/send.c