]> www.infradead.org Git - nvme.git/commit
block: move the nonrot flag to queue_limits
authorChristoph Hellwig <hch@lst.de>
Mon, 17 Jun 2024 06:04:41 +0000 (08:04 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 19 Jun 2024 13:58:28 +0000 (07:58 -0600)
commitbd4a633b6f7c3c6b6ebc1a07317643270e751a94
treeb51e88fc2def6fe0e5e7d8e880b27f5cf666f525
parent1122c0c1cc71f740fa4d5f14f239194e06a1d5e7
block: move the nonrot flag to queue_limits

Move the nonrot flag into the queue_limits feature field so that it can
be set atomically with the queue frozen.

Use the chance to switch to defaulting to non-rotational and require
the driver to opt into rotational, which matches the polarity of the
sysfs interface.

For the z2ram, ps3vram, 2x memstick, ubiblock and dcssblk the new
rotational flag is not set as they clearly are not rotational despite
this being a behavior change.  There are some other drivers that
unconditionally set the rotational flag to keep the existing behavior
as they arguably can be used on rotational devices even if that is
probably not their main use today (e.g. virtio_blk and drbd).

The flag is automatically inherited in blk_stack_limits matching the
existing behavior in dm and md.

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-15-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
41 files changed:
arch/m68k/emu/nfblock.c
arch/um/drivers/ubd_kern.c
arch/xtensa/platforms/iss/simdisk.c
block/blk-mq-debugfs.c
block/blk-sysfs.c
drivers/block/amiflop.c
drivers/block/aoe/aoeblk.c
drivers/block/ataflop.c
drivers/block/brd.c
drivers/block/drbd/drbd_main.c
drivers/block/floppy.c
drivers/block/loop.c
drivers/block/mtip32xx/mtip32xx.c
drivers/block/n64cart.c
drivers/block/nbd.c
drivers/block/null_blk/main.c
drivers/block/pktcdvd.c
drivers/block/ps3disk.c
drivers/block/rbd.c
drivers/block/rnbd/rnbd-clt.c
drivers/block/sunvdc.c
drivers/block/swim.c
drivers/block/swim3.c
drivers/block/ublk_drv.c
drivers/block/virtio_blk.c
drivers/block/xen-blkfront.c
drivers/block/zram/zram_drv.c
drivers/cdrom/gdrom.c
drivers/md/bcache/super.c
drivers/md/dm-table.c
drivers/md/md.c
drivers/mmc/core/queue.c
drivers/mtd/mtd_blkdevs.c
drivers/nvdimm/btt.c
drivers/nvdimm/pmem.c
drivers/nvme/host/core.c
drivers/nvme/host/multipath.c
drivers/s390/block/dasd_genhd.c
drivers/s390/block/scm_blk.c
drivers/scsi/sd.c
include/linux/blkdev.h