Re: NFS : filehandle to filename mappings.

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

 



On Sep 14, 2010, at 8:10 AM, Tayade, Nilesh wrote:

> Hi,
> 
> Sorry, the question might sound repeated; but I am looking for some
> other details here. 
> I looked at the NFS protocol packets. I could see that in case of
> file/directory operations(e.g. vi a file) some of the NFS packets (e.g.
> GETATTR procedure) show just the filehandle. But later when the LOOKUP
> is executed the corresponding NFS packet shows the filename (I observed
> in case of regular file).
> 
> Could someone please provide some information on how it gets the file
> name in some of the packets (i.e. related to LOOKUP, WRITE etc.)? Does
> it refer the lookup table at NFS server side and fills-in the name in
> response?

Some NFS operations include a filename.  LOOKUP includes a filename because it is the premier way to convert a filename + directory to a file handle.  By and large, though, the NFS protocol deals in file handles, so that's what you will see in most NFS wire operations.

If you want to see the filename associated with a file handle, you'll need to manage a table of mappings based on what has gone by on the wire.  This is, for example, what wireshark does for it's NFS protocol display.  NFS clients cache this information as well.

I recommend Brent Callaghan's seminal reference "NFS Illustrated" for a full overview of NFS operation.

  http://www.pearsonhighered.com/educator/academic/product/0,,0201325705,00%2Ben-USS_01DBC.html?type=ABI

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com



--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux