Skip to contentSkip to conversation

PATCH Applied Nihar Panda 2 participants 4 messages Jun 3, 2025 – Jun 10, 2025

Subsystems (3)
lore
Share & tools
lore

Nihar Panda

author maintainer
#0 lore raw

Hi Martin, James, we have a small zfcp bugfix. Would be nice if it could still make it into v6.15

author maintainer
#1 lore raw

PATCH 1/1 s390/zfcp: Ensure synchronous unit_add

From: Peter Oberparleiter <[email protected]>

Improve the usability of the unit_add sysfs attribute by ensuring that the associated FCP LUN scan processing is completed synchronously. This enables configuration tooling to consistently determine the end of the scan process to allow for serialization of follow-on actions.

While the scan process associated with unit_add typically completes synchronously, it is deferred to an asynchronous background process if unit_add is used before initial remote port scanning has completed. This occurs when unit_add is used immediately after setting the associated FCP device online.

To ensure synchronous unit_add processing, wait for remote port scanning to complete before initiating the FCP LUN scan.

Note: Adding Cc: stable since this commit addresses a usability bug
of the unit_add sysfs attribute.

---
 drivers/s390/scsi/zfcp_sysfs.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/s390/scsi/zfcp_sysfs.c +2 -0
index 41e36af35488..90a84ae98b97 100644
@@ -449,6 +449,8 @@ static ssize_t zfcp_sysfs_unit_add_store(struct device *dev,
 	if (kstrtoull(buf, 0, (unsigned long long *) &fcp_lun))
 		return -EINVAL;
 
+	flush_work(&port->rport_work);
+
 	retval = zfcp_unit_add(port, fcp_lun);
 	if (retval)
 		return retval;

base-commit: e8007fad5457ea547ca63bb011fdb03213571c7e

Signature · 1 line
2.45.2
#2 lore raw

Re: [PATCH] s390/zfcp: Ensure synchronous unit_add

Nihar,

Quoted 5 lines

To ensure synchronous unit_add processing, wait for remote port scanning to complete before initiating the FCP LUN scan.

Note: Adding Cc: stable since this commit addresses a usability bug
of the unit_add sysfs attribute.

Applied to 6.16/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen
#3 lore raw

Re: [PATCH] s390/zfcp: Ensure synchronous unit_add

In reply to Nihar Panda
Quoted 5 lines · Nihar Panda

Improve the usability of the unit_add sysfs attribute by ensuring that the associated FCP LUN scan processing is completed synchronously. This enables configuration tooling to consistently determine the end of the scan process to allow for serialization of follow-on actions.

Quoted 7 lines

While the scan process associated with unit_add typically completes synchronously, it is deferred to an asynchronous background process if unit_add is used before initial remote port scanning has completed. This occurs when unit_add is used immediately after setting the associated FCP device online.

[...]

Applied to 6.16/scsi-fixes, thanks!

[1/1] s390/zfcp: Ensure synchronous unit_add

      https://git.kernel.org/mkp/scsi/c/9697ca0d53e3
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering