.comment-link {margin-left:.6em;}

Linux stories... and more

Thursday, January 26, 2006

blkid bug

I've encountered blkid utility being stuck on the following scenario:

I use kernel 2.6.15 with udev for hotplug and device nodes management.Suppose I load storage module (say ata_piix + sd_mod), then after some time (say A), /proc/partitions is updated. After a bit more time (say B), udev will create corresponding device nodes. Now the problem:

If you run blkid between time A and time A+B, it will scan /dev recursivly trying to find device node with appropriate major/minor to match /proc/partitions entry. The problem is that there is a directory /dev/.udev/failed, that contains links to /sys, and from there one may easily go to infinite loop - and that is what blkid does.

Proposed solution is just make blkid to skip /dev/.udev* directory.
You can grab the patch here.

I'll post updates if there will new from e2fsprogs maintainers.