From: Hugh Dickins <hugh@veritas.com>
To: Neil Brown <neilb@suse.de>
Cc: Andrew Morton <akpm@osdl.org>,
"David M. Grimes" <dgrimes@navisite.com>,
Atal Shargorodsky <atal@codefidence.com>,
Gilad Ben-Yossef <gilad@codefidence.com>,
nfs@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [NFS] [PATCH 001 of 8] knfsd: Add nfs-export support to tmpfs
Date: Fri, 29 Sep 2006 20:41:04 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0609292014160.23046@blonde.wat.veritas.com> (raw)
In-Reply-To: <17692.49605.248998.607609@cse.unsw.edu.au>
On Fri, 29 Sep 2006, Neil Brown wrote:
> On Thursday September 28, akpm@osdl.org wrote:
> >
> > Why don't other filesystems have the same problem?
>
> Because most filesystems that hash their inodes do so at the point
> where the 'struct inode' is initialised, and that has suitable locking
> (I_NEW). Here in shmem, we are hashing the inode later, the first
> time we need an NFS file handle for it. We no longer have I_NEW to
> ensure only one thread tries to add it to the hash table.
>
> The comment tries to explain this, but obviously isn't completely
> successful.
That makes sense.
This patch looks mostly good to me, thanks to David and you for it;
and my apologies to Atal and Gilad for never quite getting around
to looking at theirs properly (but the hashing in this new one does
look better than their linear search). Though I know tmpfs, I
don't know NFS, so I'm glad this is coming from your direction.
But one anxiety, regarding i_ino. That's an unsigned long originating
from last_inode in fs/inode.c, isn't it? Here getting cast to a __u32
to make up one part of the file handle, which will then be cast back
to an unsigned long for ilookup later.
So on 64-bit arches, it'll only take one dedicated creator and
deleter of files to advance the last_inode count to the point where
the high int is non-zero, and shmem_get_dentry won't ever recognize
any inodes created thereafter, always reporting -ESTALE? I'm on
unfamiliar territory, but it looks to me like we need another
__u32 in the file handle to cope with that?
Then there's the lesser but more tiresome problem, of i_ino collisions
on 32-bit arches. tmpfs hasn't worried about that to date, just taken
whatever new_inode() has given it from last_inode: but perhaps these
file handles now make that more of a concern?
Hugh
next prev parent reply other threads:[~2006-09-29 19:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-29 3:08 [PATCH 000 of 8] knfsd: Introduction NeilBrown
2006-09-29 3:08 ` [PATCH 001 of 8] knfsd: Add nfs-export support to tmpfs NeilBrown
2006-09-29 6:29 ` Andrew Morton
2006-09-29 6:48 ` [NFS] " Neil Brown
2006-09-29 19:41 ` Hugh Dickins [this message]
2006-10-03 0:08 ` Neil Brown
2006-09-29 3:08 ` [PATCH 002 of 8] knfsd: lockd: fix refount on nsm NeilBrown
2006-09-29 6:01 ` [NFS] " Olaf Kirch
2006-09-29 3:08 ` [PATCH 003 of 8] knfsd: Fix auto-sizing of nfsd request/reply buffers NeilBrown
2006-09-29 3:08 ` [PATCH 004 of 8] knfsd: Close a race-opportunity in d_splice_alias NeilBrown
2006-09-29 3:09 ` [PATCH 005 of 8] knfsd: nfsd: store export path in export NeilBrown
2006-09-29 3:09 ` [PATCH 006 of 8] knfsd: nfsd4: fslocations data structures NeilBrown
2006-09-29 6:45 ` Andrew Morton
2006-10-02 18:23 ` [NFS] " J. Bruce Fields
2006-10-02 18:24 ` [PATCH 1 of 3] nfsd4: fix fs locations bounds-checking J. Bruce Fields
2006-10-02 18:26 ` [PATCH 2 of 3] nfsd4: fslocs: fix compile in non-CONFIG_NFSD_V4 case J. Bruce Fields
2006-10-02 18:26 ` [PATCH 3 of 3] nfsd4: fslocs: remove spurious NULL check J. Bruce Fields
2006-09-29 3:09 ` [PATCH 007 of 8] knfsd: nfsd4: xdr encoding for fs_locations NeilBrown
2006-09-29 3:09 ` [PATCH 008 of 8] knfsd: nfsd4: actually use all the pieces to implement referrals NeilBrown
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=Pine.LNX.4.64.0609292014160.23046@blonde.wat.veritas.com \
--to=hugh@veritas.com \
--cc=akpm@osdl.org \
--cc=atal@codefidence.com \
--cc=dgrimes@navisite.com \
--cc=gilad@codefidence.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=nfs@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®