Lines Matching refs:kobj

35 static inline struct btrfs_fs_info *to_fs_info(struct kobject *kobj);
92 static ssize_t btrfs_feature_attr_show(struct kobject *kobj, in btrfs_feature_attr_show() argument
96 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_attr_show()
108 static ssize_t btrfs_feature_attr_store(struct kobject *kobj, in btrfs_feature_attr_store() argument
118 fs_info = to_fs_info(kobj); in btrfs_feature_attr_store()
173 static umode_t btrfs_feature_visible(struct kobject *kobj, in btrfs_feature_visible() argument
176 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_visible()
235 static ssize_t global_rsv_size_show(struct kobject *kobj, in global_rsv_size_show() argument
238 struct btrfs_fs_info *fs_info = to_fs_info(kobj->parent); in global_rsv_size_show()
244 static ssize_t global_rsv_reserved_show(struct kobject *kobj, in global_rsv_reserved_show() argument
247 struct btrfs_fs_info *fs_info = to_fs_info(kobj->parent); in global_rsv_reserved_show()
253 #define to_space_info(_kobj) container_of(_kobj, struct btrfs_space_info, kobj)
254 #define to_raid_kobj(_kobj) container_of(_kobj, struct raid_kobject, kobj)
256 static ssize_t raid_bytes_show(struct kobject *kobj,
261 static ssize_t raid_bytes_show(struct kobject *kobj, in raid_bytes_show() argument
265 struct btrfs_space_info *sinfo = to_space_info(kobj->parent); in raid_bytes_show()
267 int index = to_raid_kobj(kobj)->raid_type; in raid_bytes_show()
287 static void release_raid_kobj(struct kobject *kobj) in release_raid_kobj() argument
289 kfree(to_raid_kobj(kobj)); in release_raid_kobj()
299 static ssize_t btrfs_space_info_show_##field(struct kobject *kobj, \
303 struct btrfs_space_info *sinfo = to_space_info(kobj); \
308 static ssize_t btrfs_space_info_show_total_bytes_pinned(struct kobject *kobj, in btrfs_space_info_show_total_bytes_pinned() argument
312 struct btrfs_space_info *sinfo = to_space_info(kobj); in btrfs_space_info_show_total_bytes_pinned()
340 static void space_info_release(struct kobject *kobj) in space_info_release() argument
342 struct btrfs_space_info *sinfo = to_space_info(kobj); in space_info_release()
359 static ssize_t btrfs_label_show(struct kobject *kobj, in btrfs_label_show() argument
362 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_label_show()
367 static ssize_t btrfs_label_store(struct kobject *kobj, in btrfs_label_store() argument
371 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_label_store()
401 static ssize_t btrfs_nodesize_show(struct kobject *kobj, in btrfs_nodesize_show() argument
404 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_nodesize_show()
411 static ssize_t btrfs_sectorsize_show(struct kobject *kobj, in btrfs_sectorsize_show() argument
414 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_sectorsize_show()
421 static ssize_t btrfs_clone_alignment_show(struct kobject *kobj, in btrfs_clone_alignment_show() argument
424 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_clone_alignment_show()
439 static void btrfs_release_super_kobj(struct kobject *kobj) in btrfs_release_super_kobj() argument
441 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_release_super_kobj()
451 static inline struct btrfs_fs_info *to_fs_info(struct kobject *kobj) in to_fs_info() argument
453 if (kobj->ktype != &btrfs_ktype) in to_fs_info()
455 return container_of(kobj, struct btrfs_fs_info, super_kobj); in to_fs_info()
616 disk_kobj = &part_to_dev(disk)->kobj; in btrfs_kobj_rm_device()
650 disk_kobj = &part_to_dev(disk)->kobj; in btrfs_kobj_add_device()
739 ret = sysfs_create_group(&btrfs_kset->kobj, &btrfs_feature_attr_group); in btrfs_init_sysfs()
754 sysfs_remove_group(&btrfs_kset->kobj, &btrfs_feature_attr_group); in btrfs_exit_sysfs()