Lines Matching refs:fs_devs

1310 	struct btrfs_fs_devices *fs_devs = to_fs_devs(kobj);  in btrfs_release_fsid_kobj()  local
1312 memset(&fs_devs->fsid_kobj, 0, sizeof(struct kobject)); in btrfs_release_fsid_kobj()
1313 complete(&fs_devs->kobj_unregister); in btrfs_release_fsid_kobj()
1402 static void __btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs) in __btrfs_sysfs_remove_fsid() argument
1404 if (fs_devs->devinfo_kobj) { in __btrfs_sysfs_remove_fsid()
1405 kobject_del(fs_devs->devinfo_kobj); in __btrfs_sysfs_remove_fsid()
1406 kobject_put(fs_devs->devinfo_kobj); in __btrfs_sysfs_remove_fsid()
1407 fs_devs->devinfo_kobj = NULL; in __btrfs_sysfs_remove_fsid()
1410 if (fs_devs->devices_kobj) { in __btrfs_sysfs_remove_fsid()
1411 kobject_del(fs_devs->devices_kobj); in __btrfs_sysfs_remove_fsid()
1412 kobject_put(fs_devs->devices_kobj); in __btrfs_sysfs_remove_fsid()
1413 fs_devs->devices_kobj = NULL; in __btrfs_sysfs_remove_fsid()
1416 if (fs_devs->fsid_kobj.state_initialized) { in __btrfs_sysfs_remove_fsid()
1417 kobject_del(&fs_devs->fsid_kobj); in __btrfs_sysfs_remove_fsid()
1418 kobject_put(&fs_devs->fsid_kobj); in __btrfs_sysfs_remove_fsid()
1419 wait_for_completion(&fs_devs->kobj_unregister); in __btrfs_sysfs_remove_fsid()
1424 void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs) in btrfs_sysfs_remove_fsid() argument
1428 if (fs_devs) { in btrfs_sysfs_remove_fsid()
1429 __btrfs_sysfs_remove_fsid(fs_devs); in btrfs_sysfs_remove_fsid()
1433 list_for_each_entry(fs_devs, fs_uuids, fs_list) { in btrfs_sysfs_remove_fsid()
1434 __btrfs_sysfs_remove_fsid(fs_devs); in btrfs_sysfs_remove_fsid()
1975 int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs) in btrfs_sysfs_add_fsid() argument
1979 init_completion(&fs_devs->kobj_unregister); in btrfs_sysfs_add_fsid()
1980 fs_devs->fsid_kobj.kset = btrfs_kset; in btrfs_sysfs_add_fsid()
1981 error = kobject_init_and_add(&fs_devs->fsid_kobj, &btrfs_ktype, NULL, in btrfs_sysfs_add_fsid()
1982 "%pU", fs_devs->fsid); in btrfs_sysfs_add_fsid()
1984 kobject_put(&fs_devs->fsid_kobj); in btrfs_sysfs_add_fsid()
1988 fs_devs->devices_kobj = kobject_create_and_add("devices", in btrfs_sysfs_add_fsid()
1989 &fs_devs->fsid_kobj); in btrfs_sysfs_add_fsid()
1990 if (!fs_devs->devices_kobj) { in btrfs_sysfs_add_fsid()
1991 btrfs_err(fs_devs->fs_info, in btrfs_sysfs_add_fsid()
1993 btrfs_sysfs_remove_fsid(fs_devs); in btrfs_sysfs_add_fsid()
1997 fs_devs->devinfo_kobj = kobject_create_and_add("devinfo", in btrfs_sysfs_add_fsid()
1998 &fs_devs->fsid_kobj); in btrfs_sysfs_add_fsid()
1999 if (!fs_devs->devinfo_kobj) { in btrfs_sysfs_add_fsid()
2000 btrfs_err(fs_devs->fs_info, in btrfs_sysfs_add_fsid()
2002 btrfs_sysfs_remove_fsid(fs_devs); in btrfs_sysfs_add_fsid()
2012 struct btrfs_fs_devices *fs_devs = fs_info->fs_devices; in btrfs_sysfs_add_mounted() local
2013 struct kobject *fsid_kobj = &fs_devs->fsid_kobj; in btrfs_sysfs_add_mounted()
2015 error = btrfs_sysfs_add_fs_devices(fs_devs); in btrfs_sysfs_add_mounted()
2021 btrfs_sysfs_remove_fs_devices(fs_devs); in btrfs_sysfs_add_mounted()