Message ID | 20240506042027.2289826-2-hch@lst.de (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/6] block: remove the discard_granularity check in __blkdev_issue_discard | expand |
On Mon, 06 May 2024 06:20:22 +0200, Christoph Hellwig wrote: > We now set a default granularity in the queue limits API, so don't > bother with this extra check. > > Applied, thanks! [1/6] block: remove the discard_granularity check in __blkdev_issue_discard commit: 0942592045782e76a9d52c409955c2dc313cbd30 [2/6] block: move discard checks into the ioctl handler commit: 30f1e724142242a453f92d90b33e030014900bf0 [3/6] block: add a bio_chain_and_submit helper commit: 81c2168c229bab0665e862937bb476f18cff056d [4/6] block: add a blk_alloc_discard_bio helper commit: e8b4869bc78da1a71f2a2ab476caf50c1dcfeed0 [5/6] block: add a bio_await_chain helper commit: 0f8e9ecc4636e3abb4f3cf1ead14c94cce7dfde8 [6/6] blk-lib: check for kill signal in ioctl BLKDISCARD commit: 719c15a75ebf3bda3ca718fe8e0ce63d262ec7ae Best regards,
diff --git a/block/blk-lib.c b/block/blk-lib.c index a6954eafb8c8af..7ec3e170e7f629 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -46,13 +46,6 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector, if (!bdev_max_discard_sectors(bdev)) return -EOPNOTSUPP; - /* In case the discard granularity isn't set by buggy device driver */ - if (WARN_ON_ONCE(!bdev_discard_granularity(bdev))) { - pr_err_ratelimited("%pg: Error: discard_granularity is 0.\n", - bdev); - return -EOPNOTSUPP; - } - bs_mask = (bdev_logical_block_size(bdev) >> 9) - 1; if ((sector | nr_sects) & bs_mask) return -EINVAL;
We now set a default granularity in the queue limits API, so don't bother with this extra check. Signed-off-by: Christoph Hellwig <hch@lst.de> --- block/blk-lib.c | 7 ------- 1 file changed, 7 deletions(-)