]> www.infradead.org Git - users/hch/block.git/commit
block: add special APIs for run-time disabling of discard and friends scsi-ulp-limits
authorChristoph Hellwig <hch@lst.de>
Thu, 30 May 2024 06:37:46 +0000 (08:37 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 14 Jun 2024 05:20:38 +0000 (07:20 +0200)
commit822428bbbc6f98e788dd23d2710d4067a134714a
tree7fd2f5f9191e01b959504eac622de187fd46ed47
parentc3619bc3a51d977badeb94eb5ceacde366007bdc
block: add special APIs for run-time disabling of discard and friends

A few drivers optimistically try to support discard, write zeroes and
secure erase and disable the features from the I/O completion handler
if the hardware can't support them.  This disable can't be done using
the atomic queue limits API because the I/O completion handlers can't
take sleeping locks or freeze the queue.  Keep the existing clearing
of the relevant field to zero, but replace the old blk_queue_max_*
APIs with new disable APIs that force the value to 0.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Nitesh Shetty <nj.shetty@samsung.com>
arch/um/drivers/ubd_kern.c
block/blk-settings.c
drivers/block/xen-blkfront.c
drivers/scsi/sd.c
include/linux/blkdev.h