]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: bail out of uuid tree scanning if we're closing
authorJosef Bacik <josef@toxicpanda.com>
Fri, 14 Feb 2020 20:05:01 +0000 (15:05 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:41 +0000 (17:01 +0100)
commit4f3670c1fc3387b3b31f2a01a673e4e7d80b2a16
treed81e39c7488090275614bbf269e2c25bef724130
parent374c878b3bf5603b66c35c3bc980695017660383
btrfs: bail out of uuid tree scanning if we're closing

In doing my fsstress+EIO stress testing I started running into issues
where umount would get stuck forever because the uuid checker was
chewing through the thousands of subvolumes I had created.

We shouldn't block umount on this, simply bail if we're unmounting the
fs.  We need to make sure we don't mark the UUID tree as ok, so we only
set that bit if we made it through the whole rescan operation, but
otherwise this is completely safe.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/uuid-tree.c
fs/btrfs/volumes.c