Skip to content

Commit

Permalink
Udev rules: remove zvol compat symlinks (without the leading zvol/)
Browse files Browse the repository at this point in the history
NOTE: this version of the patch is based on the current git master as of
20210630, and omits some other fixes to the exact same line of the udev
rules file from PR #12302 that would otherwise conflict.

This is a potentially arguable change, because it removes some
compatibility cruft that certain systems or people may have come to rely
on (either a very long time ago, or unwisely in recent times).

On the other hand, it's been literally over a decade since OpenZFS
switched to the strategy of using opaque numbered /dev/zd* device nodes,
with the canonical zvol access path being a directory tree of symlinks
created by udev rules inside /dev/zvol/*. (See #102.) Even at the time,
the /dev/* scheme was labeled as being for "compatibility".

This commit removes the second tree of symlinks located directly at
/dev/*, under the assumption that anybody with any sense has been using
the intended /dev/zvol/* path for a very very long time now.

(The more I think about this, the more I anticipate that some large
fraction of people will have been blissfully unaware that the intention
has been for them to use the /dev/zvol/* tree all along, and they will
have come to rely upon the /dev/* tree simply because it's been there
this whole time despite being a compat thing.)

Signed-off-by: Justin Gottula <justin@jgottula.com>
  • Loading branch information
jgottula committed Jul 1, 2021
1 parent cfc564f commit 8cc1e5b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions udev/rules.d/60-zvol.rules.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Persistent links for zvol
#
# persistent disk links: /dev/zvol/dataset_name
# also creates compatibility symlink of /dev/dataset_name

KERNEL=="zd*" SUBSYSTEM=="block" ACTION=="add|change" PROGRAM="@udevdir@/zvol_id $tempnode" SYMLINK+="zvol/%c %c"
KERNEL=="zd*" SUBSYSTEM=="block" ACTION=="add|change" PROGRAM="@udevdir@/zvol_id $tempnode" SYMLINK+="zvol/%c"

0 comments on commit 8cc1e5b

Please sign in to comment.