Commit 44e1ebe2 authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe

bcache: Use the blk_queue_flag_{set,clear}() functions

Use the blk_queue_flag_{set,clear}() functions instead of open-coding
these.

Cc: Kent Overstreet <kent.overstreet@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Ming Lei <ming.lei@redhat.com>
Reviewed-by: default avatarMichael Lyle <mlyle@lyle.org>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 4e699cb9
...@@ -833,9 +833,9 @@ static int bcache_device_init(struct bcache_device *d, unsigned block_size, ...@@ -833,9 +833,9 @@ static int bcache_device_init(struct bcache_device *d, unsigned block_size,
q->limits.io_min = block_size; q->limits.io_min = block_size;
q->limits.logical_block_size = block_size; q->limits.logical_block_size = block_size;
q->limits.physical_block_size = block_size; q->limits.physical_block_size = block_size;
set_bit(QUEUE_FLAG_NONROT, &d->disk->queue->queue_flags); blk_queue_flag_set(QUEUE_FLAG_NONROT, d->disk->queue);
clear_bit(QUEUE_FLAG_ADD_RANDOM, &d->disk->queue->queue_flags); blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, d->disk->queue);
set_bit(QUEUE_FLAG_DISCARD, &d->disk->queue->queue_flags); blk_queue_flag_set(QUEUE_FLAG_DISCARD, d->disk->queue);
blk_queue_write_cache(q, true, true); blk_queue_write_cache(q, true, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment