diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2015-03-24 16:15:17 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-04-20 18:55:38 +0300 |
commit | d8a2c89c8636405ad0b234f111d22c00c37e452b (patch) | |
tree | 7452f5e3d0c623bfe10feeb0aeabb699be56d620 /drivers/block | |
parent | 67c64eb742a49d3d3f5dcef75d0c32a3394e5519 (diff) | |
download | linux-d8a2c89c8636405ad0b234f111d22c00c37e452b.tar.xz |
rbd: mark block queue as non-rotational
Set QUEUE_FLAG_NONROT. Following commit b277da0a8a59 ("block: disable
entropy contributions for nonrot devices") we should also clear
QUEUE_FLAG_ADD_RANDOM, but it's off by default for blk-mq drivers, so
just note it in the comment.
Also remove physical block size assignment - no sense in repeating
defaults that are not going to change.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 83f5733f1a7a..2002d28c5d5b 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -3762,8 +3762,8 @@ static int rbd_init_disk(struct rbd_device *rbd_dev) goto out_tag_set; } - /* We use the default size, but let's be explicit about it. */ - blk_queue_physical_block_size(q, SECTOR_SIZE); + queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q); + /* QUEUE_FLAG_ADD_RANDOM is off by default for blk-mq */ /* set io sizes to object size */ segment_size = rbd_obj_bytes(&rbd_dev->header); |