Re: [PATCH 07/13] scsi: alua: Add scsi_alua_stpg_run()
From: Hannes Reinecke
Date: Wed Mar 18 2026 - 05:34:39 EST
On 3/18/26 09:59, John Garry wrote:
On 18/03/2026 07:57, Hannes Reinecke wrote:Gnaa. Misread that one (blame lack of coffee).
+static inline int scsi_alua_stpg_run(struct scsi_device *sdev, bool optimize)
+{
+ return 0;
+}
static inline int scsi_alua_sdev_init(struct scsi_device *sdev)
{
return 0;
No. STPG handling should be done in scsi_dh_alua _only_. We really
should not attempt this in the scsi core.
It's not so nice to have the functionality spread out. The way I see it is that drivers/scsi/scsi_alua.c is mostly a library, but also has functionality to "drive" ALUA for native SCSI multipathing.
Anyway, can you confirm which of the following do you think from this series should be in scsi_dh_alua.c:
- scsi_alua_stpg_run()
- scsi_alua_stpg()
- submit_stpg()
You already said scsi_alua_stpg_run() should be.
stpg should be handled in scsi_dh_alua. Arguable
we could move the utility functions (submit_stpg
and maybe scsi_alua_stpg) in the core alua code,
but scsi_alua_stpg_run() should be kept in
scsi_dh_alua.
If that makes sense ...
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@xxxxxxxx +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich