public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* (no subject)
@ 2025-06-03 18:21 Nihar Panda
  2025-06-03 18:21 ` [PATCH] s390/zfcp: Ensure synchronous unit_add Nihar Panda
  0 siblings, 1 reply; 4+ messages in thread
From: Nihar Panda @ 2025-06-03 18:21 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen
  Cc: linux-scsi, linux-s390, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Christian Borntraeger, Nihar Panda

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] s390/zfcp: Ensure synchronous unit_add
  2025-06-03 18:21 Nihar Panda
@ 2025-06-03 18:21 ` Nihar Panda
  2025-06-04  2:19   ` Martin K. Petersen
  2025-06-10  2:06   ` Martin K. Petersen
  0 siblings, 2 replies; 4+ messages in thread
From: Nihar Panda @ 2025-06-03 18:21 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen
  Cc: linux-scsi, linux-s390, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Christian Borntraeger, Nihar Panda

From: Peter Oberparleiter <oberpar@linux.ibm.com>

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.

Cc: stable@vger.kernel.org
Reviewed-by: M Nikhil <nikh1092@linux.ibm.com>
Reviewed-by: Nihar Panda <niharp@linux.ibm.com>
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Nihar Panda <niharp@linux.ibm.com>
---
 drivers/s390/scsi/zfcp_sysfs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/s390/scsi/zfcp_sysfs.c b/drivers/s390/scsi/zfcp_sysfs.c
index 41e36af35488..90a84ae98b97 100644
--- a/drivers/s390/scsi/zfcp_sysfs.c
+++ b/drivers/s390/scsi/zfcp_sysfs.c
@@ -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
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] s390/zfcp: Ensure synchronous unit_add
  2025-06-03 18:21 ` [PATCH] s390/zfcp: Ensure synchronous unit_add Nihar Panda
@ 2025-06-04  2:19   ` Martin K. Petersen
  2025-06-10  2:06   ` Martin K. Petersen
  1 sibling, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2025-06-04  2:19 UTC (permalink / raw)
  To: Nihar Panda
  Cc: James E . J . Bottomley, Martin K . Petersen, linux-scsi,
	linux-s390, Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Nihar Panda


Nihar,

> 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!

-- 
Martin K. Petersen

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] s390/zfcp: Ensure synchronous unit_add
  2025-06-03 18:21 ` [PATCH] s390/zfcp: Ensure synchronous unit_add Nihar Panda
  2025-06-04  2:19   ` Martin K. Petersen
@ 2025-06-10  2:06   ` Martin K. Petersen
  1 sibling, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2025-06-10  2:06 UTC (permalink / raw)
  To: James E . J . Bottomley, Nihar Panda
  Cc: Martin K . Petersen, linux-scsi, linux-s390, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Nihar Panda,
	Christian Borntraeger

On Tue, 03 Jun 2025 20:21:56 +0200, Nihar Panda wrote:

> 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.
> 
> [...]

Applied to 6.16/scsi-fixes, thanks!

[1/1] s390/zfcp: Ensure synchronous unit_add
      https://git.kernel.org/mkp/scsi/c/9697ca0d53e3

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-10  2:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-03 18:21 Nihar Panda
2025-06-03 18:21 ` [PATCH] s390/zfcp: Ensure synchronous unit_add Nihar Panda
2025-06-04  2:19   ` Martin K. Petersen
2025-06-10  2:06   ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox