[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] df: avoid suppressing remote mounts of separate exports

From: Bernhard Voelker
Subject: Re: [PATCH] df: avoid suppressing remote mounts of separate exports
Date: Thu, 30 Oct 2014 03:23:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0

On 10/29/2014 04:40 AM, Pádraig Brady wrote:
> * src/df.c (filter_mount_list): Separate remote locations may
> have different ACLs etc. so list each even if they share
> the same remote device and thus storage.
> * NEWS: Mention the change in behavior.
> Reported in
> Reported in

There've been some tickets for openSUSE in the last 2 years
regarding such suppressing, too.
TBH, I don't remember exactly why we have chosen to try to
suppress _all_ duplicate file systems - I think the whole story
began with massive bind mounting on a user's server.
And we extended the filtering to remote file system types as well.
It has become a personal point of view whether duplicate file
systems should be shown by df(1) or not. The only argument pro
suppressing is the --total option which would add up the space
several times.

Regarding your argument to remove it - the ACLs: I don't see
what they have much to do with file system statistics as df(1)
shows it ... well, in a corner case a mount point could be
ACLed so that the user cannot access the directory while the
other mount point would still be visible. Did you mean that?

After all, I don't have a strong preference, so I'm probably
okay with re-introducing duplicate remote file systems.

The 2 patches seem to be a good step in the right direction.
I didn't have a closer look at the code yet, but I was really
puzzled because no test has changed neither for the other
df-patch nor for this one.  This means that the tests are not
good enough.  E.g. the test - which uses a
faked getmntent() function via a LD_PRELOADed .so-library -
probably suffers from not also faking the stat() and statfs()

A quick look at the patch made me think about a case which
is still not handled and indeed now produces wrong output:
when a remote file system is over-mounted by a local one.
IMO the loop has to be split: first build the list of mount
entries which are 'visible' to the user (i.e., not over-mounted
nor otherwise inaccessible due to permissions etc.), and then
eliminating the duplicate - maybe only !me_remote - ones
according to shorter names etc.

Thanks & have a nice day,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]