On 08/01/2017 04:49 PM, Kamil Dudka wrote: > If I understand it correctly, your patch takes effect regardless the use > of -l option. Then please remove it from the summary to make it clear. > > The optimized-out stat() call is, however, not the only change done by > your commit. It has a side-effect that is observable from df's output > (and completely unrelated to autofs or remote file systems). At first > glance, the side-effect looks useful but it should be properly analyzed > and documented... > > Consider the following example: > > # mount -t proc none /opt > # mount -t tmpfs none /opt > > Now unpached df does not list the /opt entry: > > # df | grep opt > > ... but after your patch, it does: > > # df | grep opt > none 2005384 0 2005384 0% /opt > > Note that it was important that I have used the same "device" in both > the mount commands.
hmm, adding that little condition was too tempting - as there is the same one later on in get_dev(). ;-/ This sounds like there is another bug to fix in filter_mount_list wrt over-mounting. Maybe it should process the entries from /proc/self/mountinfo from the end instead of the beginning: by this it would be easier to filter out over-mounted file systems. WDYT? Have a nice day, Berny
