On Wed, 21.07.10 14:38, Dave Jones (da...@redhat.com) wrote:

>  > lvm is brain damaged.  strace lvm pvscan, and watch as it opens a bunch
>  > of stuff that there's no way there'd ever be a volume on.
>  > /dev/snd/*, tty's, usbmon etc etc
> 
> looking closer, it seems to be only stat'ing, instead of opening most of them,
> which isn't quite so bad, but still pretty lame.

If it really iterates through /dev then it smeels very much broken. If people
are interested in block devices /sys/class/block is a much better
choice.

And even if they really want to iterate through /dev they could at least
rely on dirent->d_type to avoid the extra stats(). d_type works fine on
devtmpfs (and the other fs choices crazy folks might use for /dev), so there's
really little need to stat() arbitrary directories...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Reply via email to