Lines Matching refs:fs_devs
1461 struct btrfs_fs_devices *fs_devs = to_fs_devs(kobj); in btrfs_release_fsid_kobj() local
1463 memset(&fs_devs->fsid_kobj, 0, sizeof(struct kobject)); in btrfs_release_fsid_kobj()
1464 complete(&fs_devs->kobj_unregister); in btrfs_release_fsid_kobj()
1553 static void __btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs) in __btrfs_sysfs_remove_fsid() argument
1555 if (fs_devs->devinfo_kobj) { in __btrfs_sysfs_remove_fsid()
1556 kobject_del(fs_devs->devinfo_kobj); in __btrfs_sysfs_remove_fsid()
1557 kobject_put(fs_devs->devinfo_kobj); in __btrfs_sysfs_remove_fsid()
1558 fs_devs->devinfo_kobj = NULL; in __btrfs_sysfs_remove_fsid()
1561 if (fs_devs->devices_kobj) { in __btrfs_sysfs_remove_fsid()
1562 kobject_del(fs_devs->devices_kobj); in __btrfs_sysfs_remove_fsid()
1563 kobject_put(fs_devs->devices_kobj); in __btrfs_sysfs_remove_fsid()
1564 fs_devs->devices_kobj = NULL; in __btrfs_sysfs_remove_fsid()
1567 if (fs_devs->fsid_kobj.state_initialized) { in __btrfs_sysfs_remove_fsid()
1568 kobject_del(&fs_devs->fsid_kobj); in __btrfs_sysfs_remove_fsid()
1569 kobject_put(&fs_devs->fsid_kobj); in __btrfs_sysfs_remove_fsid()
1570 wait_for_completion(&fs_devs->kobj_unregister); in __btrfs_sysfs_remove_fsid()
1575 void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs) in btrfs_sysfs_remove_fsid() argument
1579 if (fs_devs) { in btrfs_sysfs_remove_fsid()
1580 __btrfs_sysfs_remove_fsid(fs_devs); in btrfs_sysfs_remove_fsid()
1584 list_for_each_entry(fs_devs, fs_uuids, fs_list) { in btrfs_sysfs_remove_fsid()
1585 __btrfs_sysfs_remove_fsid(fs_devs); in btrfs_sysfs_remove_fsid()
2126 int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs) in btrfs_sysfs_add_fsid() argument
2130 init_completion(&fs_devs->kobj_unregister); in btrfs_sysfs_add_fsid()
2131 fs_devs->fsid_kobj.kset = btrfs_kset; in btrfs_sysfs_add_fsid()
2132 error = kobject_init_and_add(&fs_devs->fsid_kobj, &btrfs_ktype, NULL, in btrfs_sysfs_add_fsid()
2133 "%pU", fs_devs->fsid); in btrfs_sysfs_add_fsid()
2135 kobject_put(&fs_devs->fsid_kobj); in btrfs_sysfs_add_fsid()
2139 fs_devs->devices_kobj = kobject_create_and_add("devices", in btrfs_sysfs_add_fsid()
2140 &fs_devs->fsid_kobj); in btrfs_sysfs_add_fsid()
2141 if (!fs_devs->devices_kobj) { in btrfs_sysfs_add_fsid()
2142 btrfs_err(fs_devs->fs_info, in btrfs_sysfs_add_fsid()
2144 btrfs_sysfs_remove_fsid(fs_devs); in btrfs_sysfs_add_fsid()
2148 fs_devs->devinfo_kobj = kobject_create_and_add("devinfo", in btrfs_sysfs_add_fsid()
2149 &fs_devs->fsid_kobj); in btrfs_sysfs_add_fsid()
2150 if (!fs_devs->devinfo_kobj) { in btrfs_sysfs_add_fsid()
2151 btrfs_err(fs_devs->fs_info, in btrfs_sysfs_add_fsid()
2153 btrfs_sysfs_remove_fsid(fs_devs); in btrfs_sysfs_add_fsid()
2163 struct btrfs_fs_devices *fs_devs = fs_info->fs_devices; in btrfs_sysfs_add_mounted() local
2164 struct kobject *fsid_kobj = &fs_devs->fsid_kobj; in btrfs_sysfs_add_mounted()
2166 error = btrfs_sysfs_add_fs_devices(fs_devs); in btrfs_sysfs_add_mounted()
2172 btrfs_sysfs_remove_fs_devices(fs_devs); in btrfs_sysfs_add_mounted()