From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: "Talpey, Thomas" <Thomas.Talpey@netapp.com>
Cc: xing jing <xingjing-3pZTqkFmMFknDS1+zs4M5A@public.gmane.org>,
Benny Halevy <bhalevy@panasas.com>,
linux-nfs@vger.kernel.org
Subject: Re: how to parse the 64byte NFSv3 file handle
Date: Mon, 19 May 2008 10:28:12 -0400 [thread overview]
Message-ID: <1211207292.11932.3.camel@localhost> (raw)
In-Reply-To: <RTPCLUEXC1-PRDpAOAk000000fd-rtwIt2gI0FxT+ZUat5FNkAK/GNPrWCqfQQ4Iyu8u01E@public.gmane.org>
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-3pZTqkFmMFknDS1+zs4M5A@public.gmane.org> 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
next prev parent reply other threads:[~2008-05-19 14:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-19 8:14 how to parse the 64byte NFSv3 file handle xing jing
[not found] ` <483136FC.4050208-3pZTqkFmMFknDS1+zs4M5A@public.gmane.org>
2008-05-19 8:56 ` Benny Halevy
2008-05-19 11:08 ` Talpey, Thomas
[not found] ` <RTPCLUEXC1-PRDpAOAk000000fd-rtwIt2gI0FxT+ZUat5FNkAK/GNPrWCqfQQ4Iyu8u01E@public.gmane.org>
2008-05-19 14:28 ` Trond Myklebust [this message]
2008-05-19 14:36 ` Chuck Lever
2008-05-19 14:44 ` Talpey, Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1211207292.11932.3.camel@localhost \
--to=trond.myklebust@fys.uio.no \
--cc=Thomas.Talpey@netapp.com \
--cc=bhalevy@panasas.com \
--cc=linux-nfs@vger.kernel.org \
--cc=xingjing-3pZTqkFmMFknDS1+zs4M5A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.