[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 23/27] block: add a bdev_max_discard_sectors helper
- To: Christoph Hellwig <hch@xxxxxx>
- From: David Sterba <dsterba@xxxxxxx>
- Date: Thu, 7 Apr 2022 17:22:43 +0200
- Cc: Jens Axboe <axboe@xxxxxxxxx>, dm-devel@xxxxxxxxxx, linux-xfs@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-um@xxxxxxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxxx, nbd@xxxxxxxxxxxxxxxx, ceph-devel@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-bcache@xxxxxxxxxxxxxxx, linux-raid@xxxxxxxxxxxxxxx, linux-mmc@xxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx, linux-nvme@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, target-devel@xxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx, cluster-devel@xxxxxxxxxx, jfs-discussion@xxxxxxxxxxxxxxxxxxxxx, linux-nilfs@xxxxxxxxxxxxxxx, ntfs3@xxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx, linux-mm@xxxxxxxxx
- Delivery-date: Thu, 07 Apr 2022 15:26:53 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Mail-followup-to: dsterba@xxxxxxx, Christoph Hellwig <hch@xxxxxx>, Jens Axboe <axboe@xxxxxxxxx>, dm-devel@xxxxxxxxxx, linux-xfs@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-um@xxxxxxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxxx, nbd@xxxxxxxxxxxxxxxx, ceph-devel@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-bcache@xxxxxxxxxxxxxxx, linux-raid@xxxxxxxxxxxxxxx, linux-mmc@xxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx, linux-nvme@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, target-devel@xxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx, cluster-devel@xxxxxxxxxx, jfs-discussion@xxxxxxxxxxxxxxxxxxxxx, linux-nilfs@xxxxxxxxxxxxxxx, ntfs3@xxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx, linux-mm@xxxxxxxxx
On Wed, Apr 06, 2022 at 08:05:12AM +0200, Christoph Hellwig wrote:
> Add a helper to query the number of sectors support per each discard bio
> based on the block device and use this helper to stop various places from
> poking into the request_queue to see if discard is supported and if so how
> much. This mirrors what is done e.g. for write zeroes as well.
>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
> block/blk-core.c | 2 +-
> block/blk-lib.c | 2 +-
> block/ioctl.c | 3 +--
> drivers/block/drbd/drbd_main.c | 2 +-
> drivers/block/drbd/drbd_nl.c | 12 +++++++-----
> drivers/block/drbd/drbd_receiver.c | 5 ++---
> drivers/block/loop.c | 9 +++------
> drivers/block/rnbd/rnbd-srv-dev.h | 6 +-----
> drivers/block/xen-blkback/xenbus.c | 2 +-
> drivers/md/bcache/request.c | 4 ++--
> drivers/md/bcache/super.c | 2 +-
> drivers/md/bcache/sysfs.c | 2 +-
> drivers/md/dm-cache-target.c | 9 +--------
> drivers/md/dm-clone-target.c | 9 +--------
> drivers/md/dm-io.c | 2 +-
> drivers/md/dm-log-writes.c | 3 +--
> drivers/md/dm-raid.c | 9 ++-------
> drivers/md/dm-table.c | 4 +---
> drivers/md/dm-thin.c | 9 +--------
> drivers/md/dm.c | 2 +-
> drivers/md/md-linear.c | 4 ++--
> drivers/md/raid0.c | 2 +-
> drivers/md/raid1.c | 6 +++---
> drivers/md/raid10.c | 8 ++++----
> drivers/md/raid5-cache.c | 2 +-
> drivers/target/target_core_device.c | 8 +++-----
For
> fs/btrfs/extent-tree.c | 4 ++--
> fs/btrfs/ioctl.c | 2 +-
Acked-by: David Sterba <dsterba@xxxxxxxx>
|