Lines Matching refs:fs_devs
1254 struct btrfs_fs_devices *fs_devs = to_fs_devs(kobj); in btrfs_release_fsid_kobj() local
1256 memset(&fs_devs->fsid_kobj, 0, sizeof(struct kobject)); in btrfs_release_fsid_kobj()
1257 complete(&fs_devs->kobj_unregister); in btrfs_release_fsid_kobj()
1346 static void __btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs) in __btrfs_sysfs_remove_fsid() argument
1348 if (fs_devs->devinfo_kobj) { in __btrfs_sysfs_remove_fsid()
1349 kobject_del(fs_devs->devinfo_kobj); in __btrfs_sysfs_remove_fsid()
1350 kobject_put(fs_devs->devinfo_kobj); in __btrfs_sysfs_remove_fsid()
1351 fs_devs->devinfo_kobj = NULL; in __btrfs_sysfs_remove_fsid()
1354 if (fs_devs->devices_kobj) { in __btrfs_sysfs_remove_fsid()
1355 kobject_del(fs_devs->devices_kobj); in __btrfs_sysfs_remove_fsid()
1356 kobject_put(fs_devs->devices_kobj); in __btrfs_sysfs_remove_fsid()
1357 fs_devs->devices_kobj = NULL; in __btrfs_sysfs_remove_fsid()
1360 if (fs_devs->fsid_kobj.state_initialized) { in __btrfs_sysfs_remove_fsid()
1361 kobject_del(&fs_devs->fsid_kobj); in __btrfs_sysfs_remove_fsid()
1362 kobject_put(&fs_devs->fsid_kobj); in __btrfs_sysfs_remove_fsid()
1363 wait_for_completion(&fs_devs->kobj_unregister); in __btrfs_sysfs_remove_fsid()
1368 void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs) in btrfs_sysfs_remove_fsid() argument
1372 if (fs_devs) { in btrfs_sysfs_remove_fsid()
1373 __btrfs_sysfs_remove_fsid(fs_devs); in btrfs_sysfs_remove_fsid()
1377 list_for_each_entry(fs_devs, fs_uuids, fs_list) { in btrfs_sysfs_remove_fsid()
1378 __btrfs_sysfs_remove_fsid(fs_devs); in btrfs_sysfs_remove_fsid()
1915 int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs) in btrfs_sysfs_add_fsid() argument
1919 init_completion(&fs_devs->kobj_unregister); in btrfs_sysfs_add_fsid()
1920 fs_devs->fsid_kobj.kset = btrfs_kset; in btrfs_sysfs_add_fsid()
1921 error = kobject_init_and_add(&fs_devs->fsid_kobj, &btrfs_ktype, NULL, in btrfs_sysfs_add_fsid()
1922 "%pU", fs_devs->fsid); in btrfs_sysfs_add_fsid()
1924 kobject_put(&fs_devs->fsid_kobj); in btrfs_sysfs_add_fsid()
1928 fs_devs->devices_kobj = kobject_create_and_add("devices", in btrfs_sysfs_add_fsid()
1929 &fs_devs->fsid_kobj); in btrfs_sysfs_add_fsid()
1930 if (!fs_devs->devices_kobj) { in btrfs_sysfs_add_fsid()
1931 btrfs_err(fs_devs->fs_info, in btrfs_sysfs_add_fsid()
1933 btrfs_sysfs_remove_fsid(fs_devs); in btrfs_sysfs_add_fsid()
1937 fs_devs->devinfo_kobj = kobject_create_and_add("devinfo", in btrfs_sysfs_add_fsid()
1938 &fs_devs->fsid_kobj); in btrfs_sysfs_add_fsid()
1939 if (!fs_devs->devinfo_kobj) { in btrfs_sysfs_add_fsid()
1940 btrfs_err(fs_devs->fs_info, in btrfs_sysfs_add_fsid()
1942 btrfs_sysfs_remove_fsid(fs_devs); in btrfs_sysfs_add_fsid()
1952 struct btrfs_fs_devices *fs_devs = fs_info->fs_devices; in btrfs_sysfs_add_mounted() local
1953 struct kobject *fsid_kobj = &fs_devs->fsid_kobj; in btrfs_sysfs_add_mounted()
1955 error = btrfs_sysfs_add_fs_devices(fs_devs); in btrfs_sysfs_add_mounted()
1961 btrfs_sysfs_remove_fs_devices(fs_devs); in btrfs_sysfs_add_mounted()
2276 struct btrfs_fs_devices *fs_devs; in btrfs_sysfs_feature_update() local
2291 fs_devs = fs_info->fs_devices; in btrfs_sysfs_feature_update()
2292 fsid_kobj = &fs_devs->fsid_kobj; in btrfs_sysfs_feature_update()