Skip to content

Commit 31c2a78

Browse files
author
CKI KWF Bot
committed
Merge: scsi: s390: zfcp: Ensure synchronous unit_add
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1783 JIRA: https://issues.redhat.com/browse/RHEL-129200 ``` commit 9697ca0 Author: Peter Oberparleiter <oberpar@linux.ibm.com> Date: Tue Jun 3 20:21:56 2025 +0200 scsi: s390: zfcp: Ensure synchronous unit_add 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. 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> Link: https://lore.kernel.org/r/20250603182252.2287285-2-niharp@linux.ibm.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> ``` Signed-off-by: Nihar Panda <niharp@linux.ibm.com> Signed-off-by: Mete Durlu <mdurlu@redhat.com> Approved-by: Steve Best <sbest@redhat.com> Approved-by: Tony Camuso <tcamuso@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents d4fbd68 + 03d0c5a commit 31c2a78

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/s390/scsi/zfcp_sysfs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,8 @@ static ssize_t zfcp_sysfs_unit_add_store(struct device *dev,
449449
if (kstrtoull(buf, 0, (unsigned long long *) &fcp_lun))
450450
return -EINVAL;
451451

452+
flush_work(&port->rport_work);
453+
452454
retval = zfcp_unit_add(port, fcp_lun);
453455
if (retval)
454456
return retval;

0 commit comments

Comments
 (0)