]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: create sprout should rename fsid on the sysfs as well
authorAnand Jain <Anand.Jain@oracle.com>
Tue, 3 Jun 2014 03:36:03 +0000 (11:36 +0800)
committerChris Mason <clm@fb.com>
Sat, 28 Jun 2014 20:48:44 +0000 (13:48 -0700)
commit15f6e0aa56a85e3c7f4c45cd53928e1e02be865a
tree36d5c83ec523fab5d08c15847a22f4802699bc09
parent1d47359c01fe39bb31d45217a244c217b59d683d
btrfs: create sprout should rename fsid on the sysfs as well

Creating sprout will change the fsid of the mounted root.
do the same on the sysfs as well.

reproducer:
 mount /dev/sdb /btrfs (seed disk)
 btrfs dev add /dev/sdc /btrfs
 mount -o rw,remount /btrfs
 btrfs dev del /dev/sdb /btrfs
 mount /dev/sdb /btrfs

Error:
kobject_add_internal failed for fe350492-dc28-4051-a601-e017b17e6145 with -EEXIST, don't try to register things with the same name in the same directory.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/volumes.c
include/uapi/linux/btrfs.h