From: Jeff Layton <jeff.layton@primarydata.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jeff Layton <jeff.layton@primarydata.com>, linux-nfs@vger.kernel.org
Subject: Re: nfsd4_locku / nfs4_free_lock_stateid question
Date: Sun, 13 Jul 2014 09:50:45 -0400 [thread overview]
Message-ID: <20140713095045.2d179659@tlielax.poochiereds.net> (raw)
In-Reply-To: <20140713121919.GA6456@infradead.org>
On Sun, 13 Jul 2014 05:19:19 -0700
Christoph Hellwig <hch@infradead.org> wrote:
> On Sun, Jul 13, 2014 at 08:05:41AM -0400, Jeff Layton wrote:
> > It is weird, but I don't think it really matters as the filp is only
> > really used as a way to get to the inode -- it really doesn't matter
> > which struct file we use there. find_any_file will both take a
> > reference to and return the file, which is then eventually fput in
> > filp_close, so there should be no refcount leak or anything.
> >
> > The weirdness all comes from the vfs-layer file locking interfaces,
> > many of which take a struct file argument when they really would be
> > fine with a struct inode. Maybe one of these days we can get around to
> > cleaning that up.
>
> If filesystems get the file passed we should assume that they actually
> use it. In fact AFS does, but it's not NFS exportable at the moment,
> and ceph does in a debug printk. I'd be much happier to waste a pointer
> in the lock stateid to avoid this inconsistant interface. And it would
> allow to kill find_any_fileas well..
>
Fair enough -- that would be cleaner. I'll look into changing that as
well while I'm in here.
--
Jeff Layton <jlayton@primarydata.com>
next prev parent reply other threads:[~2014-07-13 13:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-13 11:00 nfsd4_locku / nfs4_free_lock_stateid question Christoph Hellwig
2014-07-13 12:05 ` Jeff Layton
2014-07-13 12:19 ` Christoph Hellwig
2014-07-13 13:50 ` Jeff Layton [this message]
2014-07-15 12:13 ` Jeff Layton
2014-07-15 14:50 ` J. Bruce Fields
2014-07-15 15:53 ` Christoph Hellwig
2014-07-15 16:56 ` Jeff Layton
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=20140713095045.2d179659@tlielax.poochiereds.net \
--to=jeff.layton@primarydata.com \
--cc=hch@infradead.org \
--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