[systemd-devel] [PATCH] udev: always resolve correctly database names on 'change' event

Robert Milasan rmilasan at suse.com
Mon Sep 15 05:03:50 PDT 2014


On Sat, 13 Sep 2014 15:29:23 +0200
"Robert Milasan" <RMilasan at suse.com> wrote:

> 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 :)
> 

Will anybody be so kind and push the patch to systemd git.

-- 
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


More information about the systemd-devel mailing list