Lines Matching refs:md
25 struct mapped_device *md; in dm_attr_show() local
32 md = dm_get_from_kobject(kobj); in dm_attr_show()
33 if (!md) in dm_attr_show()
36 ret = dm_attr->show(md, page); in dm_attr_show()
37 dm_put(md); in dm_attr_show()
50 struct mapped_device *md; in dm_attr_store() local
57 md = dm_get_from_kobject(kobj); in dm_attr_store()
58 if (!md) in dm_attr_store()
61 ret = dm_attr->store(md, page, count); in dm_attr_store()
62 dm_put(md); in dm_attr_store()
67 static ssize_t dm_attr_name_show(struct mapped_device *md, char *buf) in dm_attr_name_show() argument
69 if (dm_copy_name_and_uuid(md, buf, NULL)) in dm_attr_name_show()
76 static ssize_t dm_attr_uuid_show(struct mapped_device *md, char *buf) in dm_attr_uuid_show() argument
78 if (dm_copy_name_and_uuid(md, NULL, buf)) in dm_attr_uuid_show()
85 static ssize_t dm_attr_suspended_show(struct mapped_device *md, char *buf) in dm_attr_suspended_show() argument
87 sprintf(buf, "%d\n", dm_suspended_md(md)); in dm_attr_suspended_show()
92 static ssize_t dm_attr_use_blk_mq_show(struct mapped_device *md, char *buf) in dm_attr_use_blk_mq_show() argument
94 sprintf(buf, "%d\n", dm_use_blk_mq(md)); in dm_attr_use_blk_mq_show()
129 int dm_sysfs_init(struct mapped_device *md) in dm_sysfs_init() argument
131 return kobject_init_and_add(dm_kobject(md), &dm_ktype, in dm_sysfs_init()
132 &disk_to_dev(dm_disk(md))->kobj, in dm_sysfs_init()
139 void dm_sysfs_exit(struct mapped_device *md) in dm_sysfs_exit() argument
141 struct kobject *kobj = dm_kobject(md); in dm_sysfs_exit()