On Tue, Sep 02, 2014 at 06:45:58PM +0200, Francis Moreau wrote: > > That's question, now (because it's not hardcoded to lsblk) everyone is > > able to control this behavior, all you need is to add 'udevadm settle' > > to your use-case. > > The question is more why let the user do that ? because we're talking about small, simple command line util, not about complex high-level UI > If lsblk reports the partitions, shouldn't it do that only when it's > sure to fully have retrieve the partition's metadata ? if you do not have exclusive access to the device then you cannot be sure at all. All is asynchronous... > BTW, is the user supposed to know that lsblk relies on udev or is this > implementation detail ? This is very generic system feature, for example if you want to mount a device by /dev/disk/by-* symlinks then nowhere is guarantee that mount(8) is not faster than udev+blkid, etc. Yes, we can add "udevadm settle" functionality into all system utils, but it will increase complexity and degrade performance. So from my point of view it seems better to explain the problem in man page, keep lsblk simple and stupid and assume that users who really care will use "udevadm settle". (The another disadvantage is that libudev is not able to wait for specific device, it waits for all active event.) Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html