aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-sysfs.c
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2009-05-22 17:17:52 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-05-22 17:22:55 -0400
commitcd43e26f071524647e660706b784ebcbefbd2e44 (patch)
tree11625a25ba8a7c5cd4fe41b54d53506a7982433b /block/blk-sysfs.c
parent025146e13b63483add912706c101fb0fb6f015cc (diff)
block: Expose stacked device queues in sysfs
Currently stacking devices do not have a queue directory in sysfs. However, many of the I/O characteristics like sector size, maximum request size, etc. are queue properties. This patch enables the queue directory for MD/DM devices. The elevator code has been modified to deal with queues that do not have an I/O scheduler. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r--block/blk-sysfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 142a4acddd43..3ccdadb8e204 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -395,9 +395,6 @@ int blk_register_queue(struct gendisk *disk)
395 if (WARN_ON(!q)) 395 if (WARN_ON(!q))
396 return -ENXIO; 396 return -ENXIO;
397 397
398 if (!q->request_fn)
399 return 0;
400
401 ret = kobject_add(&q->kobj, kobject_get(&disk_to_dev(disk)->kobj), 398 ret = kobject_add(&q->kobj, kobject_get(&disk_to_dev(disk)->kobj),
402 "%s", "queue"); 399 "%s", "queue");
403 if (ret < 0) 400 if (ret < 0)
@@ -405,6 +402,9 @@ int blk_register_queue(struct gendisk *disk)
405 402
406 kobject_uevent(&q->kobj, KOBJ_ADD); 403 kobject_uevent(&q->kobj, KOBJ_ADD);
407 404
405 if (!q->request_fn)
406 return 0;
407
408 ret = elv_register_queue(q); 408 ret = elv_register_queue(q);
409 if (ret) { 409 if (ret) {
410 kobject_uevent(&q->kobj, KOBJ_REMOVE); 410 kobject_uevent(&q->kobj, KOBJ_REMOVE);