Daire Byrne:
> I understand that the readirplus calls are necessary to list the dir
> contents and make the union. Looking at the traffic more closely in
> wireshark I see that there are a few readdirplus calls first to get
> the contents of a single directory and if I do an "ls -l" (stat)
> actually most of the traffic is then NFS "LOOKUP" calls/replies (one
> for each file in the dir). Is this traffic required? I mean if we now
> know the contents of the dir and I always want to use the file in the
> top branch then why stat the lower branch files at all if they exist
> in the top branch? Could this be disabled?

LOOKUP is issued in readdir in NFS, I think.
Try wireshark and "ls -l /your/nfs/directly".


> Also for the case when doing blind open() calls on files is it not
> possible to try open from the top branch and only if it fails do a
> lookup on the lower (NFS) branch? Again looking at the wireshark
> output when I open a file in a dirtree it looks like there are LOOKUP
> and ACCESS calls being made to each directory in the tree. But the
> tree exists on the top branch so why can't we ignore the lower NFS
> tree unless the file/dirs don't exist?

If you access a dir in aufs, aufs accesses every branch.
If it is a non-dir, aufs searches the first one only.
You may want the 'dirperm1' aufs option for the dir. But it is dropped
in aufs2.

If you really stop aufs accessing your lower NFS branch, then you should
create a file named ".wh..wh.opq" in all directories on the upper
branch. It tells aufs that the dir is "opaque" and aufs will not search
the lower dir.


J. R. Okajima

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 

Reply via email to