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

David Herrmann dh.herrmann at gmail.com
Thu Sep 18 06:32:36 PDT 2014


Hi

On Mon, Sep 15, 2014 at 2:03 PM, Robert Milasan <rmilasan at suse.com> wrote:
> 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.

I added a commit-message based on your email and then applied this patch.

Thanks
David


More information about the systemd-devel mailing list