Skip to content

Commit

Permalink
rbd: mark block queue as non-rotational
Browse files Browse the repository at this point in the history
Set QUEUE_FLAG_NONROT.  Following commit b277da0 ("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>
  • Loading branch information
Ilya Dryomov committed Apr 20, 2015
1 parent 67c64eb commit d8a2c89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d8a2c89

Please sign in to comment.