]> git.baikalelectronics.ru Git - kernel.git/commit
block: remove QUEUE_FLAG_DISCARD
authorChristoph Hellwig <hch@lst.de>
Fri, 15 Apr 2022 04:52:55 +0000 (06:52 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Apr 2022 01:49:59 +0000 (19:49 -0600)
commit5900b0014b161a0f8727c4015160339a7c10422d
tree07398810532d1e075f413bb4771d7b90b40b1226
parentbbcd4f65901567fe50427c59e0d5a5b5855342a3
block: remove QUEUE_FLAG_DISCARD

Just use a non-zero max_discard_sectors as an indicator for discard
support, similar to what is done for write zeroes.

The only places where needs special attention is the RAID5 driver,
which must clear discard support for security reasons by default,
even if the default stacking rules would allow for it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com> [drbd]
Acked-by: Jan Höppner <hoeppner@linux.ibm.com> [s390]
Acked-by: Coly Li <colyli@suse.de> [bcache]
Acked-by: David Sterba <dsterba@suse.com> [btrfs]
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20220415045258.199825-25-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
61 files changed:
arch/um/drivers/ubd_kern.c
block/blk-core.c
block/blk-lib.c
block/blk-mq-debugfs.c
block/ioctl.c
drivers/block/drbd/drbd_main.c
drivers/block/drbd/drbd_nl.c
drivers/block/drbd/drbd_receiver.c
drivers/block/loop.c
drivers/block/nbd.c
drivers/block/null_blk/main.c
drivers/block/rbd.c
drivers/block/rnbd/rnbd-clt.c
drivers/block/rnbd/rnbd-srv-dev.h
drivers/block/virtio_blk.c
drivers/block/xen-blkback/xenbus.c
drivers/block/xen-blkfront.c
drivers/block/zram/zram_drv.c
drivers/md/bcache/request.c
drivers/md/bcache/super.c
drivers/md/bcache/sysfs.c
drivers/md/dm-cache-target.c
drivers/md/dm-clone-target.c
drivers/md/dm-log-writes.c
drivers/md/dm-raid.c
drivers/md/dm-table.c
drivers/md/dm-thin.c
drivers/md/dm.c
drivers/md/md-linear.c
drivers/md/raid0.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5-cache.c
drivers/md/raid5.c
drivers/mmc/core/queue.c
drivers/mtd/mtd_blkdevs.c
drivers/nvme/host/core.c
drivers/s390/block/dasd_fba.c
drivers/scsi/sd.c
drivers/target/target_core_device.c
fs/btrfs/extent-tree.c
fs/btrfs/ioctl.c
fs/exfat/file.c
fs/exfat/super.c
fs/ext4/ioctl.c
fs/ext4/super.c
fs/f2fs/f2fs.h
fs/fat/file.c
fs/fat/inode.c
fs/gfs2/rgrp.c
fs/jbd2/journal.c
fs/jfs/ioctl.c
fs/jfs/super.c
fs/nilfs2/ioctl.c
fs/ntfs3/file.c
fs/ntfs3/super.c
fs/ocfs2/ioctl.c
fs/xfs/xfs_discard.c
fs/xfs/xfs_super.c
include/linux/blkdev.h
mm/swapfile.c