linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Benny Halevy <bhalevy@primarydata.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	bfields@redhat.com, NFS list <linux-nfs@vger.kernel.org>
Subject: Re: nfs4_file usage
Date: Wed, 16 Oct 2013 01:51:17 -0700	[thread overview]
Message-ID: <20131016085117.GA21665@infradead.org> (raw)
In-Reply-To: <525E5228.80200@primarydata.com>

On Wed, Oct 16, 2013 at 11:45:28AM +0300, Benny Halevy wrote:
> I'm reluctant about the layout stateids as it uses common hashing data structs
> locking infrastructure, and code with all other nfsd4 stateids.

The layout stateids are another thing that confuses me in the current
pnfs code.  Depending on what we find the generic state id might be
embedded into the layout stateid or they might be separate, but there
don't seem to be clear rules on how to deal with freeing things in the
later case.  I haven't brought this up because I didn't dig deep into it
enough, but it's for sure more than confusing.

> We can have a similar hash table for pnfsd_inode similar to nfs4_file

Yes, that was the plan.

> Note that nfs4_file is also per inode, not per file as might be reflected from its name.
> Maybe moving it nfs4state.c also warrants renaming it to something more accurate.

Yes, it should have an inode instead of file in the name, and it really
should be nfsd4_ prefix instead of using the client namespace. Given
that it's open/locking specific I'm not even sure that name should be
that generic.

> And while there, change file_hashval to hash on i_ino rather than the inode ptr.

That's a bad idea.  i_ino is 32-bit only while many NFS-exported
filesystems have 64-bit inode numbers.  Hashing on kernel pointers
genetrally is a fairly good idea, and we do it for the inode in other
places, too.


  reply	other threads:[~2013-10-16  8:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20131015211445.GA23636@infradead.org>
     [not found] ` <525DB943.3010707@primarydata.com>
     [not found]   ` <20131016064243.GA28758@infradead.org>
2013-10-16  8:21     ` state lock elimination Benny Halevy
2013-10-16 18:22       ` Christoph Hellwig
     [not found] ` <525E2C5C.4020104@primarydata.com>
     [not found]   ` <20131016064649.GB28758@infradead.org>
2013-10-16  8:45     ` nfs4_file usage Benny Halevy
2013-10-16  8:51       ` Christoph Hellwig [this message]
2013-10-16 12:18         ` Benny Halevy
2013-10-16 12:33           ` Christoph Hellwig
2013-10-16 12:48             ` Benny Halevy

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=20131016085117.GA21665@infradead.org \
    --to=hch@infradead.org \
    --cc=bfields@redhat.com \
    --cc=bhalevy@primarydata.com \
    --cc=linux-nfs@vger.kernel.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 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).