[Pkg-utopia-maintainers] Bug#545032: Bug#545032: Bug#545032: Bug#545032: devicekit-disks - Handles add actions of dm devices

Michael Biebl biebl at debian.org
Tue Oct 13 15:45:27 UTC 2009


Bastian Blank schrieb:
> On Sun, Oct 11, 2009 at 09:04:09PM +0200, Andreas Barth wrote:
>> As what I read from the bug report, Bastian prefers to have all udev
>> rules in dmsetup.
> 
> Not in dmsetup, but in the package that controls that sort of device. So
> dmsetup for the core rules, lvm2 for the lvm specific rules, cryptsetup
> for their rules (if necessary, I don't know). Because they control there
> own devices, they may also break it.
> 
>> Bastian, same questions to you: Is there any reason why we can't at
>> all have a working set of udev rules in devicekit-disks? (I'm not
>> necessarily speaking about the current rules, but why it is impossible
>> to have any udev rules in the package at all.)
> 
> As long as the rules only change the behaviour of the tools in this
> package, but not just copy other rules and also follow the other rules
> about introspection, I don't see a general problem.
> 
> However, the current rules file does the following.
> - Probe for partitions, aka open, on all block devices with a (small)
>   blacklist. This can be only allowed with a whitelist, as several
>   device types may not be queried from add events or not at all, like
>   several dm subtypes.
> - Try to get informations about dm devices from add events.
> - Use blkid on dm devices even if this are hidden devices that must not
>   show up via filesystem infos. Also done from add events, something
>   that can never be allowed.
> - Examine linux raid devices with mdadm. This is the sole responsibility
>   of the mdadm package.
> - Examine SMART state, only set informations.
> - Tag devices without known prefix and with an undocumented list of
>   devices.
> 
> The first point needs to be changed to a whitelist. The second only
> provides information used by them but it is undetermined if it will
> work and newer kernels change the way to actually get the information in
> this state. The third one needs to go. The forth is not my problem but I don't
> like it. The fifth is okay. The informations set in the sixth should get
> a known prefix.
> 

We can safely remove the call to "/sbin/mdadm --examine --export
$tempnode" in the mdadm section of 95-devkit-disks.rules (actually the
complete mdadm section) as the mdadm udev rules handle that for us.

We can also safely remove the call to "/sbin/blkid -o udev -p $tempnode"
in the device-mapper section, as the dmsetup udev rules will do that for us.
What we can not remove currently, is the call to devkit-disks-dm-export,
as it makes additional information available like (DKM_)DM_TARGET_TYPES,
which is used inside the dk-disks code.

So, before we can remove the call to devkit-disks-dm-export, dmsetup
needs to be fixed to export that information. It seems you just removed
this kind of information in commit r730.

If you readd the dmsetup-export.patch, I could patch the dk-disks code
to use DM_TARGET_TYPES and DM_NAME instead of DKD_DM_TARGET_TYPES and
DKD_DM_NAME.

Does that sound like a plan to you?


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-utopia-maintainers/attachments/20091013/af83b50a/attachment-0001.pgp>


More information about the Pkg-utopia-maintainers mailing list