Btrfs: enhance btrfs_scratch_superblock to scratch all superblocks
authorAnand Jain <anand.jain@oracle.com>
Fri, 14 Aug 2015 10:32:59 +0000 (18:32 +0800)
committerDavid Sterba <dsterba@suse.com>
Thu, 1 Oct 2015 15:37:34 +0000 (17:37 +0200)
commit12b1c2637b6e0763121648d637ffe603b422e986
tree92f6954c4e22915f07e481af9d1574a97b897ae6
parent29c36d72535deb3d8961b3fb4b6a565190a6c63b
Btrfs: enhance btrfs_scratch_superblock to scratch all superblocks

This patch updates and renames btrfs_scratch_superblocks, (which is used
by the replace device thread), with those fixes from the scratch
superblock code section of btrfs_rm_device(). The fixes are:
  Scratch all copies of superblock
  Notify kobject that superblock has been changed
  Update time on the device

So that btrfs_rm_device() can use the function
btrfs_scratch_superblocks() instead of its own scratch code. And further
replace deivce code which similarly releases device back to the system,
will have the fixes from the btrfs device delete.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
[renamed to btrfs_scratch_superblock]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c
fs/btrfs/volumes.h