Re: how to parse the 64byte NFSv3 file handle

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

 



On Mon, 2008-05-19 at 07:08 -0400, Talpey, Thomas wrote:
> At 04:56 AM 5/19/2008, Benny Halevy wrote:
> >On May. 19, 2008, 11:14 +0300, xing jing <xingjing@xxxxxxxxxx> wrote:
> >> recently, I want to get some information (like file access patten)
> >> from a trace of NFS client. The simplest way may be parse the file
> >> handle to get the file ino and directory ino, but I don't know how to
> >> get them from the 64 of 16 hexadecimal. Can you tell me how to parse
> >> file handle to get useful information, thanks very much.
> >
> >That file handle contents are opaque to the client so you'd
> >need to have the server's code or reverse engineer its
> >structure.
> 
> Wireshark understands the format of many NFS server filehandles. You
> can simply zoom-in on the filehandle in the details pane to see much of
> this. Alternatively, you can look back in the trace to find the LOOKUP
> or READDIR/READDIRPLUS to find the mapping between name and
> filehandle.
> 
> By the way, not all filehandles are 64 bytes. That, too, is a server-specific
> choice.

...and in Linux it is actually a filesystem-specific choice.

Furthermore, since not all Linux filesystems have permanently stored
inode numbers, many filehandle types don't encode an inode number.

Finally, if you turn off subtree checking (as indeed you should), then
the filehandle doesn't contain a directory inode number.

In other words, parsing filehandles to obtain inode numbers from Linux
servers is not a task that can be easily automated...

Trond

--
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