diff options
| author | Christoph Hellwig <hch@lst.de> | 2024-06-17 08:04:45 +0200 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2024-06-19 07:58:28 -0600 |
| commit | aadd5c59c910427c0464c217d5ed588ff14e2502 (patch) | |
| tree | c6f7953fefc160775bbda4958de658663fa1c0ed /drivers/nvdimm/btt.c | |
| parent | 1a02f3a73f8c670eddeb44bf52a75ae7f67cfc11 (diff) | |
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/nvdimm/btt.c')
| -rw-r--r-- | drivers/nvdimm/btt.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index e474afa8e9f6..e79c06d65bb7 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c @@ -1501,6 +1501,7 @@ static int btt_blk_init(struct btt *btt) .logical_block_size = btt->sector_size, .max_hw_sectors = UINT_MAX, .max_integrity_segments = 1, + .features = BLK_FEAT_SYNCHRONOUS, }; int rc; @@ -1518,8 +1519,6 @@ static int btt_blk_init(struct btt *btt) btt->btt_disk->fops = &btt_fops; btt->btt_disk->private_data = btt; - blk_queue_flag_set(QUEUE_FLAG_SYNCHRONOUS, btt->btt_disk->queue); - set_capacity(btt->btt_disk, btt->nlba * btt->sector_size >> 9); rc = device_add_disk(&btt->nd_btt->dev, btt->btt_disk, NULL); if (rc) |