diff mbox series

[2/2] multipathd: try SCSI persistent reservations for SCSI only

Message ID 20181001184507.4162-3-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series multipath-tools: avoid error messages with NVMe | expand

Commit Message

Martin Wilck Oct. 1, 2018, 6:45 p.m. UTC
This avoids error messages when PERSISTENT RESERVE IN ioctls
are tried on non-SCSI devices.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 multipathd/main.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Christoph Hellwig Oct. 1, 2018, 8:19 p.m. UTC | #1
On Mon, Oct 01, 2018 at 08:45:07PM +0200, Martin Wilck wrote:
> This avoids error messages when PERSISTENT RESERVE IN ioctls
> are tried on non-SCSI devices.

FYI, the right long term solution is to use the kernel ioctls for PRs, as
they abstract out the underlying transport.  But for this looks good
enough.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox series

Patch

diff --git a/multipathd/main.c b/multipathd/main.c
index cc493c18..43e255e0 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -3129,6 +3129,9 @@  int mpath_pr_event_handle(struct path *pp)
 	pthread_attr_t attr;
 	struct multipath * mpp;
 
+	if (pp->bus != SYSFS_BUS_SCSI)
+		return 0;
+
 	mpp = pp->mpp;
 
 	if (!get_be64(mpp->reservation_key))