[systemd-devel] [PATCH] udev: always resolve correctly database names on 'change' event
Robert Milasan
rmilasan at suse.com
Sat Sep 13 06:29:23 PDT 2014
Hello, I've found a lingering bug in udev since udev changed it's
database name from long names to short names 'ex: b9:1'.
The bug is more visible or reproducible on s390(x) has there, we can
remove and add dasd disk/partitions.
The outcome of the bug is that when removing and re-adding a
disk/partition, most or some of the links are not removed correctly or
at all. This leads to multiple UUID links for a single partition or
stale links in /dev/disk/{by-uuid,by-id}.
How to reproduce:
dasdfmt -b 4096 -v -y -f /dev/dasdb
fdasd -a /dev/dasdb
mke2fs /dev/dasdb1
repeat this again and you will notice that /dev/dasdb1 has 2 or more
UUID links in /dev/disk/by-uuid.
If you do not repeat this, just do 'dasdfmt -b 4096 -v -y
-f /dev/dasdb' the UUID link to /dev/dasdb1 will be stale, just the
same as /dev/disk/by-id links.
NOTE: this bug might affect x86 machines too, but it might not be
visible (not sure).
The issue is due to when there is a change event before the remove
event for dasdb/dasdb1, we are trying to resolve the database name into
'<block><major>:<minor>', but event->dev_db doesn't get fill-up with
devnum (<major>:<minor>) information, resulting in a database name
"+block:dasdb1", which doesn't exist.
I've attached the patch, please review it and push it if there is no
complains :)
--
Robert Milasan
L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmilasan at suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402 6FE7 2F64 167C 1909 6D1A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-udev-always-resolve-correctly-database-names-on-chan.patch
Type: text/x-patch
Size: 2504 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140913/12d1de75/attachment.bin>
More information about the systemd-devel
mailing list