btrfs: sysfs, move device id directories to UUID/devinfo
authorAnand Jain <anand.jain@oracle.com>
Wed, 12 Feb 2020 09:28:11 +0000 (17:28 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 12 Feb 2020 17:28:22 +0000 (18:28 +0100)
Originally it was planned to create device id directories under
UUID/devinfo, but it got under UUID/devices by mistake. We really want
it under definfo so the bare device node names are not mixed with device
ids and are easy to enumerate.

Fixes: 668e48af7a94 ("btrfs: sysfs, add devid/dev_state kobject and device attributes")
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/sysfs.c

index 6bac61c42c05cc596da27f65742e8db1e09f52de..3c10e78924d04db95ad6c70c5f9e194557be5100 100644 (file)
@@ -1295,7 +1295,7 @@ int btrfs_sysfs_add_device_link(struct btrfs_fs_devices *fs_devices,
 
                init_completion(&dev->kobj_unregister);
                error = kobject_init_and_add(&dev->devid_kobj, &devid_ktype,
-                                            fs_devices->devices_kobj, "%llu",
+                                            fs_devices->devinfo_kobj, "%llu",
                                             dev->devid);
                if (error) {
                        kobject_put(&dev->devid_kobj);