Lines Matching refs:q
37 struct request_queue *q; in blk_mq_sysfs_show() local
42 q = ctx->queue; in blk_mq_sysfs_show()
48 mutex_lock(&q->sysfs_lock); in blk_mq_sysfs_show()
49 if (!blk_queue_dying(q)) in blk_mq_sysfs_show()
51 mutex_unlock(&q->sysfs_lock); in blk_mq_sysfs_show()
60 struct request_queue *q; in blk_mq_sysfs_store() local
65 q = ctx->queue; in blk_mq_sysfs_store()
71 mutex_lock(&q->sysfs_lock); in blk_mq_sysfs_store()
72 if (!blk_queue_dying(q)) in blk_mq_sysfs_store()
74 mutex_unlock(&q->sysfs_lock); in blk_mq_sysfs_store()
83 struct request_queue *q; in blk_mq_hw_sysfs_show() local
88 q = hctx->queue; in blk_mq_hw_sysfs_show()
94 mutex_lock(&q->sysfs_lock); in blk_mq_hw_sysfs_show()
95 if (!blk_queue_dying(q)) in blk_mq_hw_sysfs_show()
97 mutex_unlock(&q->sysfs_lock); in blk_mq_hw_sysfs_show()
107 struct request_queue *q; in blk_mq_hw_sysfs_store() local
112 q = hctx->queue; in blk_mq_hw_sysfs_store()
118 mutex_lock(&q->sysfs_lock); in blk_mq_hw_sysfs_store()
119 if (!blk_queue_dying(q)) in blk_mq_hw_sysfs_store()
121 mutex_unlock(&q->sysfs_lock); in blk_mq_hw_sysfs_store()
368 struct request_queue *q = hctx->queue; in blk_mq_register_hctx() local
375 ret = kobject_add(&hctx->kobj, &q->mq_kobj, "%u", hctx->queue_num); in blk_mq_register_hctx()
390 struct request_queue *q = disk->queue; in blk_mq_unregister_disk() local
397 queue_for_each_hw_ctx(q, hctx, i) { in blk_mq_unregister_disk()
406 kobject_uevent(&q->mq_kobj, KOBJ_REMOVE); in blk_mq_unregister_disk()
407 kobject_del(&q->mq_kobj); in blk_mq_unregister_disk()
408 kobject_put(&q->mq_kobj); in blk_mq_unregister_disk()
412 q->mq_sysfs_init_done = false; in blk_mq_unregister_disk()
416 static void blk_mq_sysfs_init(struct request_queue *q) in blk_mq_sysfs_init() argument
422 kobject_init(&q->mq_kobj, &blk_mq_ktype); in blk_mq_sysfs_init()
424 queue_for_each_hw_ctx(q, hctx, i) in blk_mq_sysfs_init()
427 queue_for_each_ctx(q, ctx, i) in blk_mq_sysfs_init()
434 struct request_queue *q = disk->queue; in blk_mq_register_disk() local
440 blk_mq_sysfs_init(q); in blk_mq_register_disk()
442 ret = kobject_add(&q->mq_kobj, kobject_get(&dev->kobj), "%s", "mq"); in blk_mq_register_disk()
446 kobject_uevent(&q->mq_kobj, KOBJ_ADD); in blk_mq_register_disk()
448 queue_for_each_hw_ctx(q, hctx, i) { in blk_mq_register_disk()
457 q->mq_sysfs_init_done = true; in blk_mq_register_disk()
465 void blk_mq_sysfs_unregister(struct request_queue *q) in blk_mq_sysfs_unregister() argument
470 if (!q->mq_sysfs_init_done) in blk_mq_sysfs_unregister()
473 queue_for_each_hw_ctx(q, hctx, i) in blk_mq_sysfs_unregister()
477 int blk_mq_sysfs_register(struct request_queue *q) in blk_mq_sysfs_register() argument
482 if (!q->mq_sysfs_init_done) in blk_mq_sysfs_register()
485 queue_for_each_hw_ctx(q, hctx, i) { in blk_mq_sysfs_register()