mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
nbd: switch to using blk_queue_write_cache()
Signed-off-by: Jens Axboe <axboe@fb.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
17fe95f460
commit
aafb1eecbb
@ -693,9 +693,9 @@ static void nbd_parse_flags(struct nbd_device *nbd, struct block_device *bdev)
|
||||
if (nbd->flags & NBD_FLAG_SEND_TRIM)
|
||||
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, nbd->disk->queue);
|
||||
if (nbd->flags & NBD_FLAG_SEND_FLUSH)
|
||||
blk_queue_flush(nbd->disk->queue, REQ_FLUSH);
|
||||
blk_queue_write_cache(nbd->disk->queue, true, false);
|
||||
else
|
||||
blk_queue_flush(nbd->disk->queue, 0);
|
||||
blk_queue_write_cache(nbd->disk->queue, false, false);
|
||||
}
|
||||
|
||||
static int nbd_dev_dbg_init(struct nbd_device *nbd);
|
||||
|
Loading…
Reference in New Issue
Block a user