If you provide a path to df it will use realpath() -> resolvepath(2) :

$ truss df -n /WWW
resolvepath("/WWW", "/WWW", 1024)               = 4


If we avoid the path, resolvepath(2) is not used:

# df -F nfs -n      
/home/pf199842     : nfs    
/WWW               : nfs 

Fast dtrace check shows that it will not reach nfs kernel module,
so it will not go OTW:

# dtrace -Fn':nfs::/pid==$target/{}' -c 'df -F nfs -n'
dtrace: description ':nfs::' matched 2393 probes
/home/pf199842     : nfs    
/WWW               : nfs    
dtrace: pid 29299 has exited


But the point was to specify the path (mountpoint) to df, without it we 
do not get any advantage from using df.
So we must parse the /etc/mnttab anyway.

--Pavel




Frank Batschulat (Home) wrote:
> On Tue, 16 Dec 2008 20:56:36 +0100, Pavel Filipensky <Pavel.Filipensky at 
> sun.com> wrote:
>
>   
>> Unfortunately df -n  calls resolvepath(2) and this will go OTW.
>> I have only tested that the fix avoids unmounting of NFS when
>> -l is used, but I has not realized that it will hang if server is down.
>>     
>
> Pavel, I fail to see a way that df.c calls resolvepath(2) on anything that
> is slightly NFS releated (sure it'll use it on startup for the
> shared libraries...)
>
> ---
> frankB
>
>   


Reply via email to