]> www.infradead.org Git - users/hch/block.git/commit
sd: add a sd_disable_discard helper
authorChristoph Hellwig <hch@lst.de>
Tue, 21 May 2024 19:53:24 +0000 (12:53 -0700)
committerChristoph Hellwig <hch@lst.de>
Fri, 14 Jun 2024 05:20:07 +0000 (07:20 +0200)
commitace0ee8462c63eac44d4f67e73a7a1bc56a42330
treecd2ed13ab6f03f04eb936eed33f3dc56408c2661
parent5248f60b76340c394cafad471d9044d6990447e7
sd: add a sd_disable_discard helper

Add helper to disable discard when it is not supported and use it
instead of sd_config_discard in the I/O completion handler.  This avoids
touching more fields than required in the I/O completion handler and
prepares for converting sd to use the atomic queue limits API.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sd.c