• Home
  • Raw
  • Download

Lines Matching refs:q

65 	struct request_queue *q;  in blk_mq_sysfs_show()  local
70 q = ctx->queue; in blk_mq_sysfs_show()
75 mutex_lock(&q->sysfs_lock); in blk_mq_sysfs_show()
77 mutex_unlock(&q->sysfs_lock); in blk_mq_sysfs_show()
86 struct request_queue *q; in blk_mq_sysfs_store() local
91 q = ctx->queue; in blk_mq_sysfs_store()
96 mutex_lock(&q->sysfs_lock); in blk_mq_sysfs_store()
98 mutex_unlock(&q->sysfs_lock); in blk_mq_sysfs_store()
107 struct request_queue *q; in blk_mq_hw_sysfs_show() local
112 q = hctx->queue; in blk_mq_hw_sysfs_show()
117 mutex_lock(&q->sysfs_lock); in blk_mq_hw_sysfs_show()
119 mutex_unlock(&q->sysfs_lock); in blk_mq_hw_sysfs_show()
129 struct request_queue *q; in blk_mq_hw_sysfs_store() local
134 q = hctx->queue; in blk_mq_hw_sysfs_store()
139 mutex_lock(&q->sysfs_lock); in blk_mq_hw_sysfs_store()
141 mutex_unlock(&q->sysfs_lock); in blk_mq_hw_sysfs_store()
243 struct request_queue *q = hctx->queue; in blk_mq_register_hctx() local
250 ret = kobject_add(&hctx->kobj, q->mq_kobj, "%u", hctx->queue_num); in blk_mq_register_hctx()
270 void blk_mq_unregister_dev(struct device *dev, struct request_queue *q) in blk_mq_unregister_dev() argument
275 lockdep_assert_held(&q->sysfs_dir_lock); in blk_mq_unregister_dev()
277 queue_for_each_hw_ctx(q, hctx, i) in blk_mq_unregister_dev()
280 kobject_uevent(q->mq_kobj, KOBJ_REMOVE); in blk_mq_unregister_dev()
281 kobject_del(q->mq_kobj); in blk_mq_unregister_dev()
284 q->mq_sysfs_init_done = false; in blk_mq_unregister_dev()
292 void blk_mq_sysfs_deinit(struct request_queue *q) in blk_mq_sysfs_deinit() argument
298 ctx = per_cpu_ptr(q->queue_ctx, cpu); in blk_mq_sysfs_deinit()
301 kobject_put(q->mq_kobj); in blk_mq_sysfs_deinit()
304 void blk_mq_sysfs_init(struct request_queue *q) in blk_mq_sysfs_init() argument
309 kobject_init(q->mq_kobj, &blk_mq_ktype); in blk_mq_sysfs_init()
312 ctx = per_cpu_ptr(q->queue_ctx, cpu); in blk_mq_sysfs_init()
314 kobject_get(q->mq_kobj); in blk_mq_sysfs_init()
319 int __blk_mq_register_dev(struct device *dev, struct request_queue *q) in __blk_mq_register_dev() argument
324 WARN_ON_ONCE(!q->kobj.parent); in __blk_mq_register_dev()
325 lockdep_assert_held(&q->sysfs_dir_lock); in __blk_mq_register_dev()
327 ret = kobject_add(q->mq_kobj, kobject_get(&dev->kobj), "%s", "mq"); in __blk_mq_register_dev()
331 kobject_uevent(q->mq_kobj, KOBJ_ADD); in __blk_mq_register_dev()
333 queue_for_each_hw_ctx(q, hctx, i) { in __blk_mq_register_dev()
339 q->mq_sysfs_init_done = true; in __blk_mq_register_dev()
346 blk_mq_unregister_hctx(q->queue_hw_ctx[i]); in __blk_mq_register_dev()
348 kobject_uevent(q->mq_kobj, KOBJ_REMOVE); in __blk_mq_register_dev()
349 kobject_del(q->mq_kobj); in __blk_mq_register_dev()
354 void blk_mq_sysfs_unregister(struct request_queue *q) in blk_mq_sysfs_unregister() argument
359 mutex_lock(&q->sysfs_dir_lock); in blk_mq_sysfs_unregister()
360 if (!q->mq_sysfs_init_done) in blk_mq_sysfs_unregister()
363 queue_for_each_hw_ctx(q, hctx, i) in blk_mq_sysfs_unregister()
367 mutex_unlock(&q->sysfs_dir_lock); in blk_mq_sysfs_unregister()
370 int blk_mq_sysfs_register(struct request_queue *q) in blk_mq_sysfs_register() argument
375 mutex_lock(&q->sysfs_dir_lock); in blk_mq_sysfs_register()
376 if (!q->mq_sysfs_init_done) in blk_mq_sysfs_register()
379 queue_for_each_hw_ctx(q, hctx, i) { in blk_mq_sysfs_register()
386 mutex_unlock(&q->sysfs_dir_lock); in blk_mq_sysfs_register()