[PATCH 23/23] block: remove now unused queue limits helpers

2024-03-24 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- block/blk-settings.c | 245 - drivers/s390/block/dasd_eckd.c | 6 +- include/linux/blkdev.h | 13 -- include/linux/mmc/host.h | 4 +- 4 files changed, 5 insertions(+), 263 deletions(-) diff --git a/

[PATCH 22/23] uas: switch to using ->device_configure to configure queue limits

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_alloc and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Note that uas was the only driver setting these size limits from ->slave_alloc and not ->slave_configure and this makes it match ever

[PATCH 21/23] mpi3mr: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Note that mpi3mr also updates the limits from an event handler that iterates all SCSI devices. This is also updated to use the q

[PATCH 20/23] libata: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/ata/ahci.h | 2 +- drivers/ata/libata-sata.c | 1

[PATCH 19/23] pata_macio: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/ata/pata_macio.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) d

[PATCH 18/23] sata_nv: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/ata/sata_nv.c | 20 1 file changed, 12 insertions(+), 8 delet

[PATCH 17/23] usb-storage: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Also use the proper atomic queue limit update helpers and freeze the queue when updating max_hw_sectors from sysfs. Signed-off-b

[PATCH 16/23] pmcraid: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/scsi/pmcraid.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-)

[PATCH 15/23] ipr: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/scsi/ipr.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff

[PATCH 14/23] hptiop: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/scsi/hptiop.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 13/23] sbp2: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/firewire/sbp2.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

[PATCH 12/23] mpt3sas: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 18 -- 1 file changed, 8 insertions

[PATCH 11/23] megaraid_sas: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/scsi/megaraid/megaraid_sas.h| 2 +- drivers/scsi/megaraid/megaraid_sas_ba

[PATCH 10/23] scsi: add a device_configure method to the host template

2024-03-24 Thread Christoph Hellwig
This is a version of ->slave_configure that also takes a queue_limits structure that the caller applies, and thus allows drivers to reconfigure the queue using the atomic queue limits API. In the long run it should also replace ->slave_configure entirely as there is no need to have two different m

[PATCH 09/23] scsi: use the atomic queue limits API in scsi_add_lun

2024-03-24 Thread Christoph Hellwig
Switch scsi_add_lun to use the atomic queue limits API to update the max_hw_sectors for devices with quirks. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_scan.c | 49 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/drivers/scsi/s

[PATCH 08/23] ufs-exynos: move setting the the dma alignment to the init method

2024-03-24 Thread Christoph Hellwig
Use the SCSI host's dma_alignment field and set it in ->init and remove the now unused config_scsi_dev method. Signed-off-by: Christoph Hellwig --- drivers/ufs/core/ufshcd.c | 3 --- drivers/ufs/host/ufs-exynos.c | 8 ++-- include/ufs/ufshcd.h | 1 - 3 files changed, 2 insertion

[PATCH 07/23] scsi: add a dma_alignment field to the host and host template

2024-03-24 Thread Christoph Hellwig
Get drivers out of the business of having to call the block layer dma alignment limits helpers themselves. Signed-off-by: Christoph Hellwig --- drivers/firewire/sbp2.c | 6 -- drivers/message/fusion/mptfc.c| 1 + drivers/message/fusion/mptsas.c | 1 + drivers/message/fusio

[PATCH 06/23] scsi: add a no_highmem flag to struct Scsi_Host

2024-03-24 Thread Christoph Hellwig
While we really should be killing the block layer bounce buffering ASAP, I even more urgently need to stop the drivers to fiddle with the limits from ->slave_configure. Add a no_highmem flag to the Scsi_Host to centralize this setting and switch the remaining four drivers that use block layer boun

[PATCH 05/23] scsi_transport_fc: add a max_bsg_segments field to struct fc_function_template

2024-03-24 Thread Christoph Hellwig
ibmvfc only supports a single segment for BSG FC passthrough. Instead of having it set a queue limits after creating the BSD queues, add a field so that the FC transport can set it before allocating the queue. Signed-off-by: Christoph Hellwig --- drivers/scsi/ibmvscsi/ibmvfc.c | 5 + driv

[PATCH 04/23] scsi: initialize scsi midlayer limits before allocating the queue

2024-03-24 Thread Christoph Hellwig
Turn __scsi_init_queue into scsi_init_limits which initializes queue_limits structure that can be passed to blk_mq_alloc_queue. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_lib.c | 32 ++--- drivers/scsi/scsi_scan.c| 5 +++-- drivers/scs

[PATCH 02/23] bsg: pass queue_limits to bsg_setup_queue

2024-03-24 Thread Christoph Hellwig
This allows bsg_setup_queue to pass them to blk_mq_alloc_queue and thus set up the limits at queue allocation time. Signed-off-by: Christoph Hellwig --- block/bsg-lib.c | 6 -- drivers/scsi/mpi3mr/mpi3mr_app.c| 2 +- drivers/scsi/scsi_transport_fc.c| 6 +++--- dri

convert SCSI to atomic queue limits, part 1

2024-03-24 Thread Christoph Hellwig
Hi all, this series converts the SCSI midlayer and LLDDs to use atomic queue limits API. It is pretty straight forward, except for the mpt3mr driver which does really weird and probably already broken things by setting limits from unlocked device iteration callsbacks. The first patch is actually

[PATCH 03/23] mpi3mr: pass queue_limits to bsg_setup_queue

2024-03-24 Thread Christoph Hellwig
Pass the limits to bsg_setup_queue instead of setting them up on the live queue. Signed-off-by: Christoph Hellwig --- drivers/scsi/mpi3mr/mpi3mr_app.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_ap

[PATCH 01/23] block: don't reject too large max_user_setors in blk_validate_limits

2024-03-24 Thread Christoph Hellwig
We already cap down the actual max_sectors to the max of the hardware and user limit, so don't reject the configuration. Signed-off-by: Christoph Hellwig --- block/blk-settings.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blk-settings.c b/block/blk-settings.c ind