]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: move btrfs_scratch_superblocks into btrfs_dev_replace_finishing
authorJosef Bacik <josef@toxicpanda.com>
Thu, 20 Aug 2020 15:18:26 +0000 (11:18 -0400)
committerDavid Sterba <dsterba@suse.com>
Fri, 25 Sep 2020 14:40:22 +0000 (16:40 +0200)
commit7d957df0e48bf1a6f723b6e63cb16ef667ee3265
tree6fe6b85bcd80720539057c913fe282adffb3c671
parentf32db2e18cdaf72ae6de1e2851ade7cbeca4cdd1
btrfs: move btrfs_scratch_superblocks into btrfs_dev_replace_finishing

We need to move the closing of the src_device out of all the device
replace locking, but we definitely want to zero out the superblock
before we commit the last time to make sure the device is properly
removed.  Handle this by pushing btrfs_scratch_superblocks into
btrfs_dev_replace_finishing, and then later on we'll move the src_device
closing and freeing stuff where we need it to be.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/dev-replace.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h