Lines Matching refs:kobj

20 static inline struct btrfs_fs_info *to_fs_info(struct kobject *kobj);
21 static inline struct btrfs_fs_devices *to_fs_devs(struct kobject *kobj);
78 static ssize_t btrfs_feature_attr_show(struct kobject *kobj, in btrfs_feature_attr_show() argument
82 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_attr_show()
94 static ssize_t btrfs_feature_attr_store(struct kobject *kobj, in btrfs_feature_attr_store() argument
104 fs_info = to_fs_info(kobj); in btrfs_feature_attr_store()
162 static umode_t btrfs_feature_visible(struct kobject *kobj, in btrfs_feature_visible() argument
165 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_visible()
224 static ssize_t rmdir_subvol_show(struct kobject *kobj, in rmdir_subvol_show() argument
258 static ssize_t global_rsv_size_show(struct kobject *kobj, in global_rsv_size_show() argument
261 struct btrfs_fs_info *fs_info = to_fs_info(kobj->parent); in global_rsv_size_show()
267 static ssize_t global_rsv_reserved_show(struct kobject *kobj, in global_rsv_reserved_show() argument
270 struct btrfs_fs_info *fs_info = to_fs_info(kobj->parent); in global_rsv_reserved_show()
276 #define to_space_info(_kobj) container_of(_kobj, struct btrfs_space_info, kobj)
277 #define to_raid_kobj(_kobj) container_of(_kobj, struct raid_kobject, kobj)
279 static ssize_t raid_bytes_show(struct kobject *kobj,
284 static ssize_t raid_bytes_show(struct kobject *kobj, in raid_bytes_show() argument
288 struct btrfs_space_info *sinfo = to_space_info(kobj->parent); in raid_bytes_show()
290 int index = btrfs_bg_flags_to_raid_index(to_raid_kobj(kobj)->flags); in raid_bytes_show()
310 static void release_raid_kobj(struct kobject *kobj) in release_raid_kobj() argument
312 kfree(to_raid_kobj(kobj)); in release_raid_kobj()
322 static ssize_t btrfs_space_info_show_##field(struct kobject *kobj, \
326 struct btrfs_space_info *sinfo = to_space_info(kobj); \
331 static ssize_t btrfs_space_info_show_total_bytes_pinned(struct kobject *kobj, in btrfs_space_info_show_total_bytes_pinned() argument
335 struct btrfs_space_info *sinfo = to_space_info(kobj); in btrfs_space_info_show_total_bytes_pinned()
366 static void space_info_release(struct kobject *kobj) in space_info_release() argument
368 struct btrfs_space_info *sinfo = to_space_info(kobj); in space_info_release()
385 static ssize_t btrfs_label_show(struct kobject *kobj, in btrfs_label_show() argument
388 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_label_show()
399 static ssize_t btrfs_label_store(struct kobject *kobj, in btrfs_label_store() argument
403 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_label_store()
436 static ssize_t btrfs_nodesize_show(struct kobject *kobj, in btrfs_nodesize_show() argument
439 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_nodesize_show()
446 static ssize_t btrfs_sectorsize_show(struct kobject *kobj, in btrfs_sectorsize_show() argument
449 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_sectorsize_show()
457 static ssize_t btrfs_clone_alignment_show(struct kobject *kobj, in btrfs_clone_alignment_show() argument
460 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_clone_alignment_show()
468 static ssize_t quota_override_show(struct kobject *kobj, in quota_override_show() argument
471 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in quota_override_show()
478 static ssize_t quota_override_store(struct kobject *kobj, in quota_override_store() argument
482 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in quota_override_store()
517 static void btrfs_release_fsid_kobj(struct kobject *kobj) in btrfs_release_fsid_kobj() argument
519 struct btrfs_fs_devices *fs_devs = to_fs_devs(kobj); in btrfs_release_fsid_kobj()
530 static inline struct btrfs_fs_devices *to_fs_devs(struct kobject *kobj) in to_fs_devs() argument
532 if (kobj->ktype != &btrfs_ktype) in to_fs_devs()
534 return container_of(kobj, struct btrfs_fs_devices, fsid_kobj); in to_fs_devs()
537 static inline struct btrfs_fs_info *to_fs_info(struct kobject *kobj) in to_fs_info() argument
539 if (kobj->ktype != &btrfs_ktype) in to_fs_info()
541 return to_fs_devs(kobj)->fs_info; in to_fs_info()
729 disk_kobj = &part_to_dev(disk)->kobj; in btrfs_sysfs_rm_device_link()
743 disk_kobj = &part_to_dev(disk)->kobj; in btrfs_sysfs_rm_device_link()
781 disk_kobj = &part_to_dev(disk)->kobj; in btrfs_sysfs_add_device_link()
929 ret = sysfs_create_group(&btrfs_kset->kobj, &btrfs_feature_attr_group); in btrfs_init_sysfs()
932 ret = sysfs_merge_group(&btrfs_kset->kobj, in btrfs_init_sysfs()
940 sysfs_remove_group(&btrfs_kset->kobj, &btrfs_feature_attr_group); in btrfs_init_sysfs()
951 sysfs_unmerge_group(&btrfs_kset->kobj, in btrfs_exit_sysfs()
953 sysfs_remove_group(&btrfs_kset->kobj, &btrfs_feature_attr_group); in btrfs_exit_sysfs()