Lines Matching refs:sess_dev

88 	struct rnbd_srv_sess_dev *sess_dev;  in read_only_show()  local
90 sess_dev = container_of(kobj, struct rnbd_srv_sess_dev, kobj); in read_only_show()
92 return sysfs_emit(page, "%d\n", sess_dev->readonly); in read_only_show()
102 struct rnbd_srv_sess_dev *sess_dev; in access_mode_show() local
104 sess_dev = container_of(kobj, struct rnbd_srv_sess_dev, kobj); in access_mode_show()
107 rnbd_access_modes[sess_dev->access_mode].str); in access_mode_show()
116 struct rnbd_srv_sess_dev *sess_dev; in mapping_path_show() local
118 sess_dev = container_of(kobj, struct rnbd_srv_sess_dev, kobj); in mapping_path_show()
120 return sysfs_emit(page, "%s\n", sess_dev->pathname); in mapping_path_show()
137 struct rnbd_srv_sess_dev *sess_dev; in rnbd_srv_dev_session_force_close_store() local
139 sess_dev = container_of(kobj, struct rnbd_srv_sess_dev, kobj); in rnbd_srv_dev_session_force_close_store()
142 rnbd_srv_err(sess_dev, "%s: invalid value: '%s'\n", in rnbd_srv_dev_session_force_close_store()
147 rnbd_srv_info(sess_dev, "force close requested\n"); in rnbd_srv_dev_session_force_close_store()
148 rnbd_srv_sess_dev_force_close(sess_dev, attr); in rnbd_srv_dev_session_force_close_store()
170 void rnbd_srv_destroy_dev_session_sysfs(struct rnbd_srv_sess_dev *sess_dev) in rnbd_srv_destroy_dev_session_sysfs() argument
172 sysfs_remove_group(&sess_dev->kobj, in rnbd_srv_destroy_dev_session_sysfs()
175 kobject_del(&sess_dev->kobj); in rnbd_srv_destroy_dev_session_sysfs()
176 kobject_put(&sess_dev->kobj); in rnbd_srv_destroy_dev_session_sysfs()
181 struct rnbd_srv_sess_dev *sess_dev; in rnbd_srv_sess_dev_release() local
183 sess_dev = container_of(kobj, struct rnbd_srv_sess_dev, kobj); in rnbd_srv_sess_dev_release()
184 rnbd_destroy_sess_dev(sess_dev, sess_dev->keep_id); in rnbd_srv_sess_dev_release()
192 int rnbd_srv_create_dev_session_sysfs(struct rnbd_srv_sess_dev *sess_dev) in rnbd_srv_create_dev_session_sysfs() argument
196 ret = kobject_init_and_add(&sess_dev->kobj, &rnbd_srv_sess_dev_ktype, in rnbd_srv_create_dev_session_sysfs()
197 sess_dev->dev->dev_sessions_kobj, "%s", in rnbd_srv_create_dev_session_sysfs()
198 sess_dev->sess->sessname); in rnbd_srv_create_dev_session_sysfs()
200 kobject_put(&sess_dev->kobj); in rnbd_srv_create_dev_session_sysfs()
204 ret = sysfs_create_group(&sess_dev->kobj, in rnbd_srv_create_dev_session_sysfs()
207 kobject_del(&sess_dev->kobj); in rnbd_srv_create_dev_session_sysfs()
208 kobject_put(&sess_dev->kobj); in rnbd_srv_create_dev_session_sysfs()