linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Xin Zhao" <uszhaoxin@gmail.com>
To: "Bryan Henderson" <hbryan@us.ibm.com>
Cc: linux-fsdevel@vger.kernel.org, "Matthew Wilcox" <matthew@wil.cx>,
	"Neil Brown" <neilb@suse.de>
Subject: Re: Urgent help needed on an NFS question, please help!!!
Date: Thu, 10 Aug 2006 14:15:06 -0400	[thread overview]
Message-ID: <4ae3c140608101115h7b12dd71q9df235be00eaf7c9@mail.gmail.com> (raw)
In-Reply-To: <OF368BE404.350D7544-ON882571C6.005FE38A-882571C6.0061F83C@us.ibm.com>

Hi, Bryan,

You gave several good points here. But can you be more specific: what
file system does not use unique inode? I am sorry for asking this dumb
question. But I am really eager to konw that.  Also, you mentioned
that some filesystems have no device number. I guess you are talking
about ramfs or similar file system, right? In our context, we don't
consider this possibility.

I know many people dislike to use inode number or device number in
file handle. NFS specs also avoid mentioning inodes, because it wants
to provide maximum interoperability. But our system is essentially a
NFS derived file system dedicated to sharing data across multiple VMs
in a single virtual server. So we can safely assume that both NFS
client and server are under our control, and no further
interoperabilitiy needs to be considered.

But your points seem to be valid as long as you can give more details
on "some file systems". ;-)

-x

On 8/10/06, Bryan Henderson <hbryan@us.ibm.com> wrote:
> >Can we make the following two conclusions?
> >1. In a single machine, inode+dev ID+i_generation can uniquely identify a
> file
>
> Without knowing the context, it's hard to say how picky you want to be,
> but here are some reasons the conclusion wouldn't be valid:
>
>   - In some filesystems, the inode number isn't as unique and stable as
> you'd like it to be.  In these, the inode
>     number has no internal use and is just something made up to satisfy
> stat().  And no, it doesn't satisfy all
>     requirements of stat(), but there's a compromise happening.  This
> compromise is especially visible in
>     filesystems that can have more than 4G filesystem objects, because
> inode numbers are 32 bits.
>
>     Consequently, NFS file handles for filesystem objects in these
> filesystems do not involve inode numbers.
>
>   - In some filesystems, there is no device number to speak of.  There's a
> made-up one to satisfy Linux structures
>     designed in the days that a filesystem lived on a disk, but you have
> to define some restrictions to consider
>     that device number usable to uniquely identify a file.
>
>     For this reason and others, Linux doesn't always use a device number
> in a file handle.  In general, it uses an
>     "export ID."
>
>   - In a traditional filesystem such as ext3, you have to define some
> restrictions in order for a device number to
>     help uniquely identify a file.  That's because in general, a
> filesystem's device number can change, especially
>     because a disk device's device number can change.
>
> >2. Given a stored file handle and an inode object received from the
> >server,  an NFS client can safely determine whether this inode
> >corresponds to the file handle by checking the inode+dev+i_generation.
>
> There's an unsettling theme in your questions that suggests that the NFS
> protocol involves inodes and inode numbers.  It doesn't, and I think
> assuming it does can lead you down some bad paths.  There is no inode
> number mentioned in NFS specs, and an NFS client doesn't know what the
> inode number of a file on the server is.  The individual server decides
> how to construct an NFS file handle.  In the earliest implementations of
> NFS servers, and continuing today in NFS serving of an ext3 filesystem,
> the server decides to use inode numbers and device numbers to construct
> the NFS file handle.  But it doesn't have to.
>
> --
> Bryan Henderson                     IBM Almaden Research Center
> San Jose CA                         Filesystems
>
>
>

  reply	other threads:[~2006-08-10 18:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-10  5:04 Urgent help needed on an NFS question, please help!!! Xin Zhao
2006-08-10  5:11 ` Neil Brown
2006-08-10  5:54   ` Xin Zhao
2006-08-10  6:03     ` Neil Brown
2006-08-10 15:15       ` Xin Zhao
2006-08-10 16:11         ` Matthew Wilcox
2006-08-10 16:23           ` Xin Zhao
2006-08-10 16:54             ` Matthew Wilcox
2006-08-10 17:08               ` Xin Zhao
2006-08-10 17:38                 ` Trond Myklebust
2006-08-10 17:28             ` Trond Myklebust
2006-08-10 18:02               ` Xin Zhao
2006-08-10 19:59                 ` Trond Myklebust
2006-08-10 22:25                   ` Xin Zhao
2006-08-11  0:44                     ` Trond Myklebust
2006-08-10 22:28                   ` Xin Zhao
2006-08-11  0:38                     ` Trond Myklebust
2006-08-10 23:42                   ` Bryan Henderson
2006-08-10 17:50             ` Bryan Henderson
2006-08-10 18:15               ` Xin Zhao [this message]
2006-08-11  0:07                 ` Bryan Henderson
2006-08-10 21:00             ` Peter Staubach
2006-08-10  6:04   ` Xin Zhao
2006-08-10  6:15     ` Xin Zhao

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=4ae3c140608101115h7b12dd71q9df235be00eaf7c9@mail.gmail.com \
    --to=uszhaoxin@gmail.com \
    --cc=hbryan@us.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=neilb@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).