Lines Matching refs:fs_devs

442 	struct btrfs_fs_devices *fs_devs = to_fs_devs(kobj);  in btrfs_release_fsid_kobj()  local
444 memset(&fs_devs->fsid_kobj, 0, sizeof(struct kobject)); in btrfs_release_fsid_kobj()
445 complete(&fs_devs->kobj_unregister); in btrfs_release_fsid_kobj()
518 static void __btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs) in __btrfs_sysfs_remove_fsid() argument
520 if (fs_devs->device_dir_kobj) { in __btrfs_sysfs_remove_fsid()
521 kobject_del(fs_devs->device_dir_kobj); in __btrfs_sysfs_remove_fsid()
522 kobject_put(fs_devs->device_dir_kobj); in __btrfs_sysfs_remove_fsid()
523 fs_devs->device_dir_kobj = NULL; in __btrfs_sysfs_remove_fsid()
526 if (fs_devs->fsid_kobj.state_initialized) { in __btrfs_sysfs_remove_fsid()
527 kobject_del(&fs_devs->fsid_kobj); in __btrfs_sysfs_remove_fsid()
528 kobject_put(&fs_devs->fsid_kobj); in __btrfs_sysfs_remove_fsid()
529 wait_for_completion(&fs_devs->kobj_unregister); in __btrfs_sysfs_remove_fsid()
534 void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs) in btrfs_sysfs_remove_fsid() argument
538 if (fs_devs) { in btrfs_sysfs_remove_fsid()
539 __btrfs_sysfs_remove_fsid(fs_devs); in btrfs_sysfs_remove_fsid()
543 list_for_each_entry(fs_devs, fs_uuids, list) { in btrfs_sysfs_remove_fsid()
544 __btrfs_sysfs_remove_fsid(fs_devs); in btrfs_sysfs_remove_fsid()
674 int btrfs_sysfs_add_device(struct btrfs_fs_devices *fs_devs) in btrfs_sysfs_add_device() argument
676 if (!fs_devs->device_dir_kobj) in btrfs_sysfs_add_device()
677 fs_devs->device_dir_kobj = kobject_create_and_add("devices", in btrfs_sysfs_add_device()
678 &fs_devs->fsid_kobj); in btrfs_sysfs_add_device()
680 if (!fs_devs->device_dir_kobj) in btrfs_sysfs_add_device()
727 int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs, in btrfs_sysfs_add_fsid() argument
732 init_completion(&fs_devs->kobj_unregister); in btrfs_sysfs_add_fsid()
733 fs_devs->fsid_kobj.kset = btrfs_kset; in btrfs_sysfs_add_fsid()
734 error = kobject_init_and_add(&fs_devs->fsid_kobj, in btrfs_sysfs_add_fsid()
735 &btrfs_ktype, parent, "%pU", fs_devs->fsid); in btrfs_sysfs_add_fsid()
742 struct btrfs_fs_devices *fs_devs = fs_info->fs_devices; in btrfs_sysfs_add_mounted() local
743 struct kobject *fsid_kobj = &fs_devs->fsid_kobj; in btrfs_sysfs_add_mounted()
747 error = btrfs_sysfs_add_device_link(fs_devs, NULL); in btrfs_sysfs_add_mounted()
753 btrfs_sysfs_rm_device_link(fs_devs, NULL); in btrfs_sysfs_add_mounted()