-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose DM udev visibility controls to clients #846
Comments
This is relatively straightforward: adding the
The changes in Stratis to make use of this are also smaller than I'd anticipated:
I.e. if users pass |
The device-mapper udev rules define several environment variables that can be used to control udev rule processing and device visibility for DM devices. These are exposed in
DmUdevFlags
and are used internally to control udev processing of devices managed with devicemapper-rs:Historically
ThinDev
devices are the only devices for whichDM_UDEV_PRIMARY_SOURCE_FLAG
is set. This is a design decision that supports Stratis' needs: only the leaf thin devices are exposed. Other device types (CacheDev
,LinearDev
, andThinPoolDev
) did not set this flag and hence were "hidden" devices.The changes to add Udev synchronization inadvertently changed the default for all device types, since
DM_UDEV_PRIMARY_SOURCE_FLAG
is now set automatically for ioctl operations that generate uevents. This is a user visible change in behaviour and causes problems for other subsystems, for e.g. Udisks:The immediate issue is addressed in #845 by explicitly setting three
DmUdevFlags
values for these device types:This restores the historical behaviour of devicemapper-rs 0.32.3 and earlier as expected by Stratis.
For a general purpose library this behaviour should be optional and under the control of users of the crate. This requires breaking changes to the library API to allow callers to specify
create_options
that govern the visibility of the objects being managed as discussed in stratis-storage/project#389The text was updated successfully, but these errors were encountered: