Skip to content

scsi: add attribute to set lun queue depth on all luns on shost

James Smart linux-scsi 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 5 repliesIn review
  2. v23 patches 3 repliesSuperseded
  3. v11 patch 2 repliesSuperseded

Changes in v3 from the cover letter

Revert use of -ENOTSUPP. Use -EINVAL or -ENXIO instead. Clean up spacing and unnecessary parens.
Use kstrtouint
Specify attribute permissions in octl

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3scsi: refactor sdev lun queue depth setting via sysfsdrivers/scsi/scsi.c drivers/scsi/scsi_priv.h drivers/scsi/scsi_sysfs.c+25 -51 reply
2/3scsi: add shost helper to set max queue depth on all of its devicesdrivers/scsi/scsi.c include/scsi/scsi_device.h+33 -01 reply
3/3scsi: add shost attribute to set max queue depth on all devices on the shostdrivers/scsi/scsi_sysfs.c+21 -01 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchBart Van Assche
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] scsi: add attribute to set lun queue depth on all luns on shost

There has been a desire to set the lun queue depth on all luns on an shost. Today that is done by an external script looping through discovered sdevs and set an sdev attribute. The desire is to have a single shost attribute that performs this work removing the requirement for scripting.

This patch:
- Refactors the existing sdev change max queue depth attribute so the meat of it becomes a service routine.
- Creates a shost helper routine, lldd callable, which cycles though all sdevs on the shost and changes their max queue depth. Uses the new service routine.
- Adds a new shost attribute which calls the new shost helper routine.

v2:
Reworked the patch with recommendations on error returns and breaking into smaller patches. I also had a request to make the shost change routine to be lldd callable. So switched up how that was implemented as well.

v3:
Revert use of -ENOTSUPP. Use -EINVAL or -ENXIO instead. Clean up spacing and unnecessary parens.
Use kstrtouint
Specify attribute permissions in octl

-- james

James Smart (3):
scsi: refactor sdev lun queue depth setting via sysfs
scsi: add shost helper to set max queue depth on all of its devices
scsi: add shost attribute to set max queue depth on all devices on the
shost

 drivers/scsi/scsi.c        | 54 ++++++++++++++++++++++++++++++++++++++++++++++
 drivers/scsi/scsi_priv.h   |  1 +
 drivers/scsi/scsi_sysfs.c  | 28 +++++++++++++++++++-----
 include/scsi/scsi_device.h |  1 +
 4 files changed, 79 insertions(+), 5 deletions(-)
Signature · 1 line
2.13.7