]> 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, 31 May 2024 07:29:22 +0000 (09:29 +0200)
commita07cc657bd6a4577d0b92fc6805838876e94a873
tree7d720b9ab9cc0ba84c840cb604beb082910ed0b6
parent40b3388a35b4b99a07f420c02c1b084077d7bb8c
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>
drivers/scsi/sd.c