summaryrefslogtreecommitdiffstats
path: root/drivers/block/brd.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-06-17 08:04:45 +0200
committerJens Axboe <axboe@kernel.dk>2024-06-19 15:58:28 +0200
commitaadd5c59c910427c0464c217d5ed588ff14e2502 (patch)
treec6f7953fefc160775bbda4958de658663fa1c0ed /drivers/block/brd.c
parentblock: move the stable_writes flag to queue_limits (diff)
downloadlinux-aadd5c59c910427c0464c217d5ed588ff14e2502.tar.xz
linux-aadd5c59c910427c0464c217d5ed588ff14e2502.zip
block: move the synchronous flag to queue_limits
Move the synchronous flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20240617060532.127975-19-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/brd.c')
-rw-r--r--drivers/block/brd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index b25dc463b5e3..d77deb571dbd 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -335,6 +335,7 @@ static int brd_alloc(int i)
.max_hw_discard_sectors = UINT_MAX,
.max_discard_segments = 1,
.discard_granularity = PAGE_SIZE,
+ .features = BLK_FEAT_SYNCHRONOUS,
};
list_for_each_entry(brd, &brd_devices, brd_list)
@@ -366,7 +367,6 @@ static int brd_alloc(int i)
strscpy(disk->disk_name, buf, DISK_NAME_LEN);
set_capacity(disk, rd_size * 2);
- blk_queue_flag_set(QUEUE_FLAG_SYNCHRONOUS, disk->queue);
blk_queue_flag_set(QUEUE_FLAG_NOWAIT, disk->queue);
err = add_disk(disk);
if (err)