]> 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)
commitc4763e4965db5671578020fc745020f144acbd8a
tree6fe6b85bcd80720539057c913fe282adffb3c671
parent8ca14c249a2801ef9e4fda35b4ce28f3eef651d8
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