summaryrefslogtreecommitdiffstats
path: root/staslib/udev.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-06 07:51:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-06 07:51:39 +0000
commit593ffd6b9dc008e81ed95579a0f56c49bf3e782f (patch)
treeb3a10caf7583dc08b7beed1a329f3b65a1dffe33 /staslib/udev.py
parentAdding upstream version 2.3~rc2. (diff)
downloadnvme-stas-593ffd6b9dc008e81ed95579a0f56c49bf3e782f.tar.xz
nvme-stas-593ffd6b9dc008e81ed95579a0f56c49bf3e782f.zip
Adding upstream version 2.3~rc3.upstream/2.3_rc3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'staslib/udev.py')
-rw-r--r--staslib/udev.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/staslib/udev.py b/staslib/udev.py
index 80555dd..b9bd258 100644
--- a/staslib/udev.py
+++ b/staslib/udev.py
@@ -259,8 +259,13 @@ class Udev:
cid.src_addr can only be read from the sysfs starting with kernel
6.1.
'''
- # 'transport', 'traddr', 'trsvcid', and 'subsysnqn' must exactly match.
- if cid['transport'] != tid.transport or cid['trsvcid'] != tid.trsvcid or cid['subsysnqn'] != tid.subsysnqn:
+ # 'transport', 'traddr', 'trsvcid', 'subsysnqn', and 'host-nqn' must exactly match.
+ if (
+ cid['transport'] != tid.transport
+ or cid['trsvcid'] != tid.trsvcid
+ or cid['subsysnqn'] != tid.subsysnqn
+ or cid['host-nqn'] != tid.host_nqn
+ ):
return False
if tid.transport in ('tcp', 'rdma'):
@@ -489,6 +494,7 @@ class Udev:
'host-iface': Udev._get_property(device, 'NVME_HOST_IFACE'),
'subsysnqn': Udev._get_attribute(device, 'subsysnqn'),
'src-addr': Udev.get_key_from_attr(device, 'address', 'src_addr='),
+ 'host-nqn': Udev._get_attribute(device, 'hostnqn'),
}
return cid