bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] df: new option --direct to not resolve a mount point


From: Pádraig Brady
Subject: Re: [PATCH] df: new option --direct to not resolve a mount point
Date: Tue, 7 Apr 2009 18:51:02 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

Kamil Dudka wrote:
> On Tuesday 07 of April 2009 14:22:38 Pádraig Brady wrote:
>> Kamil Dudka wrote:
>>> Hello,
>>>
>>> I am attaching a single patch for df adding a new option --direct to not
>>> resolve mount point and show statistics directly for a file. It can be
>>> especially useful for NFS mount points if there is a boundary between two
>>> storage policies behind the mount point.
>> So this only changes the headings and not the values,
>> and is only useful when multiple files specified?
> 
> I don't think so. If I run df with /home/kdudka/foo and /home is a mount 
> point 
> it calls statfs for /home. With the new --direct option it calls statfs 
> directly for /home/kdudka/foo. The last column then shows the (canonized) 
> file (or directory) name and not the mount point, therefore the change
> in heading.

Well why I asked was I did essentially that test and was confused by:

$ strace -e statfs64 ./df /home/padraig/ttt /home/padraig/
statfs64("/home/padraig/ttt", ...) = 0
statfs64("/home/padraig/", ...) = 0

I.E. it seems each param is stated directly already?
(which seems like the most sensible operation).
But you explained that for remote file systems
the stat is not done directly (why would it not be?).
But again that doesn't seem to be the case here:

$ mkdir t
$ sudo mount -t nfs vod:/nfs t
$ strace -e statfs64 ./df t/ISO/ t/Music/
statfs64("t/ISO/", ...) = 0
statfs64("t/Music/", ...) = 0

What am I missing?

cheers,
Pádraig.




reply via email to

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