Compare commits
3 Commits
5eb79a8b2d
...
87e16c21fa
Author | SHA1 | Date |
---|---|---|
Bryan Gurney | 87e16c21fa | |
Bryan Gurney | 95bac06010 | |
Bryan Gurney | 8f2e74aa3e |
|
@ -43,12 +43,6 @@ ATTRS{nsid}=="?*", ENV{ID_NSID}="$attr{nsid}"
|
|||
|
||||
ENV{ID_WWN}=="?*", SYMLINK+="disk/by-id/nvme-$env{ID_WWN}$env{.PART_SUFFIX}"
|
||||
|
||||
# obsolete symlink with non-escaped characters, kept for backward compatibility
|
||||
ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", ENV{ID_MODEL}!="*/*", ENV{ID_SERIAL_SHORT}!="*/*", \
|
||||
ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}$env{.PART_SUFFIX}"
|
||||
# obsolete symlink that might get overridden on adding a new nvme controller, kept for backward compatibility
|
||||
ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", OPTIONS="string_escape=replace", \
|
||||
ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}$env{.PART_SUFFIX}"
|
||||
ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", ENV{ID_NSID}=="?*", OPTIONS="string_escape=replace", \
|
||||
ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}_$env{ID_NSID}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}$env{.PART_SUFFIX}"
|
||||
|
||||
|
|
|
@ -179,36 +179,24 @@ testcase_nvme_basic() {
|
|||
|
||||
for (( i = 0; i < 5; i++ )); do
|
||||
expected_symlinks+=(
|
||||
# both replace mode provides the same devlink
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_deadbeef"$i"
|
||||
# with nsid
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_deadbeef"$i"_1
|
||||
)
|
||||
done
|
||||
for (( i = 5; i < 10; i++ )); do
|
||||
expected_symlinks+=(
|
||||
# old replace mode
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl__deadbeef_"$i"
|
||||
# newer replace mode
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_____deadbeef__"$i"
|
||||
# with nsid
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_____deadbeef__"$i"_1
|
||||
)
|
||||
done
|
||||
for (( i = 10; i < 15; i++ )); do
|
||||
expected_symlinks+=(
|
||||
# old replace mode does not provide devlink, as serial contains "/"
|
||||
# newer replace mode
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_____dead_beef_"$i"
|
||||
# with nsid
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_____dead_beef_"$i"_1
|
||||
)
|
||||
done
|
||||
for (( i = 15; i < 20; i++ )); do
|
||||
expected_symlinks+=(
|
||||
# old replace mode does not provide devlink, as serial contains "/"
|
||||
# newer replace mode
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_dead_.._.._beef_"$i"
|
||||
# with nsid
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_dead_.._.._beef_"$i"_1
|
||||
)
|
||||
|
@ -227,7 +215,6 @@ testcase_nvme_basic() {
|
|||
testcase_nvme_subsystem() {
|
||||
local expected_symlinks=(
|
||||
# Controller(s)
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_deadbeef
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_deadbeef_16
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_deadbeef_17
|
||||
# Shared namespaces
|
||||
|
|
Loading…
Reference in New Issue