All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-nfs@vger.kernel.org, chucklever@gmail.com,
	Neil Brown <neilb@suse.de>, Christoph Hellwig <hch@infradead.org>,
	linux-mtd@lists.infradead.org, viro@zeniv.linux.org.uk,
	linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] Reinstate NFS exportability for JFFS2.
Date: Sat, 2 Aug 2008 17:33:38 -0400	[thread overview]
Message-ID: <20080802213337.GA2833@fieldses.org> (raw)
In-Reply-To: <1217709752.2500.5.camel@shinybook.infradead.org>

On Sat, Aug 02, 2008 at 09:42:32PM +0100, David Woodhouse wrote:
> On Sat, 2008-08-02 at 14:26 -0400, J. Bruce Fields wrote:
> > Could you add a readdirplus vfs operation which took a flag indicating
> > how much extra information you're going to need?
> 
> Actually, if we're screwing with readdir then xfs would like to know how
> much it's going to be asked to read, rather than just have the filldir
> callback return zero when it's done.

OK.

> > The three cases where readdir can be called are:
> >         - ordinary readdir, for which the existing filldir_t provides
> >           all the information needed.
> >         - nfsv3 readdirplus, where the only additional information
> >           needed is whether there's a mountpoint.
> 
> It also wants a file handle.

Oops, right.

> For which I think it just needs
> i_generation in addition to the information it already has.

Typically, right, though the filesystem's allowed some choice about what
exactly it wants to use in the filehandle.  I don't know how the various
filesystems are actually using that in practice.

> >         - nfsv4 readdir, where we may need all the stat info, acls,
> >           etc., etc.
> 
> We _might_, but most of the time we won't. It might be OK to fall back
> to the existing double-buffer hack for the cases where we _do_ need that
> extra information.

How bad is the "double-buffer hack" anyway?  Rather than have this as a
fallback case that's rarely used (hence rarely tested), it might be
simpler just to use it for everything if we're going to use it at all.

--b.

> I think a ->lookup_fh() method (which _expects_ to be called from within
> filldir, and hence does its locking automatically) is the way to go.
> 
> One alternative might just be a full lookup method with the same locking
> rules: ->lookup_locked(). That might be easier to implement, and would
> solve the problem even for the corner cases of NFSv4. Although I still
> think we'd do best to avoid populating the inode cache with _all_
> children when we do a readdirplus. 
> 
> -- 
> David Woodhouse                            Open Source Technology Centre
> David.Woodhouse@intel.com                              Intel Corporation
> 

WARNING: multiple messages have this Message-ID (diff)
From: "J. Bruce Fields" <bfields@fieldses.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: chucklever@gmail.com, viro@zeniv.linux.org.uk,
	Neil Brown <neilb@suse.de>, Christoph Hellwig <hch@infradead.org>,
	linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org,
	linux-mtd@lists.infradead.org
Subject: Re: [RFC] Reinstate NFS exportability for JFFS2.
Date: Sat, 2 Aug 2008 17:33:38 -0400	[thread overview]
Message-ID: <20080802213337.GA2833@fieldses.org> (raw)
In-Reply-To: <1217709752.2500.5.camel@shinybook.infradead.org>

On Sat, Aug 02, 2008 at 09:42:32PM +0100, David Woodhouse wrote:
> On Sat, 2008-08-02 at 14:26 -0400, J. Bruce Fields wrote:
> > Could you add a readdirplus vfs operation which took a flag indicating
> > how much extra information you're going to need?
> 
> Actually, if we're screwing with readdir then xfs would like to know how
> much it's going to be asked to read, rather than just have the filldir
> callback return zero when it's done.

OK.

> > The three cases where readdir can be called are:
> >         - ordinary readdir, for which the existing filldir_t provides
> >           all the information needed.
> >         - nfsv3 readdirplus, where the only additional information
> >           needed is whether there's a mountpoint.
> 
> It also wants a file handle.

Oops, right.

> For which I think it just needs
> i_generation in addition to the information it already has.

Typically, right, though the filesystem's allowed some choice about what
exactly it wants to use in the filehandle.  I don't know how the various
filesystems are actually using that in practice.

> >         - nfsv4 readdir, where we may need all the stat info, acls,
> >           etc., etc.
> 
> We _might_, but most of the time we won't. It might be OK to fall back
> to the existing double-buffer hack for the cases where we _do_ need that
> extra information.

How bad is the "double-buffer hack" anyway?  Rather than have this as a
fallback case that's rarely used (hence rarely tested), it might be
simpler just to use it for everything if we're going to use it at all.

--b.

> I think a ->lookup_fh() method (which _expects_ to be called from within
> filldir, and hence does its locking automatically) is the way to go.
> 
> One alternative might just be a full lookup method with the same locking
> rules: ->lookup_locked(). That might be easier to implement, and would
> solve the problem even for the corner cases of NFSv4. Although I still
> think we'd do best to avoid populating the inode cache with _all_
> children when we do a readdirplus. 
> 
> -- 
> David Woodhouse                            Open Source Technology Centre
> David.Woodhouse@intel.com                              Intel Corporation
> 

  reply	other threads:[~2008-08-02 21:33 UTC|newest]

Thread overview: 128+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-01 19:42 [RFC] Reinstate NFS exportability for JFFS2 David Woodhouse
2008-05-01 20:48 ` Christoph Hellwig
2008-05-01 22:44   ` David Woodhouse
2008-05-02  1:38     ` Neil Brown
2008-05-02  1:38       ` Neil Brown
2008-05-02 11:37       ` David Woodhouse
2008-05-02 11:37         ` David Woodhouse
2008-05-02 14:08         ` J. Bruce Fields
2008-05-02 14:08           ` J. Bruce Fields
2008-05-02 14:08           ` J. Bruce Fields
2008-07-31 21:54       ` David Woodhouse
2008-08-01  0:16         ` Neil Brown
2008-08-01  0:40           ` David Woodhouse
2008-08-01  0:40             ` David Woodhouse
2008-08-01  0:40             ` David Woodhouse
2008-08-01  0:52             ` David Woodhouse
2008-08-01  0:52               ` David Woodhouse
2008-08-01  0:52               ` David Woodhouse
2008-08-01  0:53             ` Chuck Lever
2008-08-01  0:53               ` Chuck Lever
2008-08-01  1:00               ` David Woodhouse
2008-08-01  1:00                 ` David Woodhouse
2008-08-01  1:00                 ` David Woodhouse
2008-08-01  1:31                 ` Chuck Lever
2008-08-01  1:31                   ` Chuck Lever
2008-08-01  1:31                   ` Chuck Lever
2008-08-01  8:13                   ` David Woodhouse
2008-08-01  8:13                     ` David Woodhouse
2008-08-01 13:35                   ` David Woodhouse
2008-08-01 13:35                     ` David Woodhouse
2008-08-01 13:56                     ` David Woodhouse
2008-08-01 13:56                       ` David Woodhouse
2008-08-01 13:56                       ` David Woodhouse
2008-08-01 16:05                       ` Chuck Lever
2008-08-01 16:05                         ` Chuck Lever
2008-08-01 16:19                         ` David Woodhouse
2008-08-01 16:19                           ` David Woodhouse
2008-08-01 17:47                           ` Chuck Lever
2008-08-01 17:47                             ` Chuck Lever
2008-08-02 18:26                             ` J. Bruce Fields
2008-08-02 18:26                               ` J. Bruce Fields
2008-08-02 20:42                               ` David Woodhouse
2008-08-02 20:42                                 ` David Woodhouse
2008-08-02 20:42                                 ` David Woodhouse
2008-08-02 21:33                                 ` J. Bruce Fields [this message]
2008-08-02 21:33                                   ` J. Bruce Fields
2008-08-03  8:39                                   ` David Woodhouse
2008-08-03  8:39                                     ` David Woodhouse
2008-08-03  8:39                                     ` David Woodhouse
2008-08-03 11:56                               ` Neil Brown
2008-08-03 11:56                                 ` Neil Brown
2008-08-03 11:56                                 ` Neil Brown
2008-08-03 17:15                                 ` Chuck Lever
2008-08-03 17:15                                   ` Chuck Lever
2008-08-04  1:03                                   ` Neil Brown
2008-08-04  1:03                                     ` Neil Brown
2008-08-04  6:19                                     ` Chuck Lever
2008-08-04  6:19                                       ` Chuck Lever
2008-08-04  6:19                                       ` Chuck Lever
2008-08-05  8:51                                       ` Dave Chinner
2008-08-05  8:51                                         ` Dave Chinner
2008-08-05  8:59                                         ` David Woodhouse
2008-08-05  8:59                                           ` David Woodhouse
2008-08-05  9:47                                           ` Dave Chinner
2008-08-05  9:47                                             ` Dave Chinner
2008-08-05 23:06                                         ` Neil Brown
2008-08-05 23:06                                           ` Neil Brown
2008-08-05 23:06                                           ` Neil Brown
2008-08-06  0:08                                           ` Dave Chinner
2008-08-06  0:08                                             ` Dave Chinner
2008-08-06  0:08                                             ` Dave Chinner
2008-08-06 19:56                                             ` J. Bruce Fields
2008-08-06 19:56                                             ` J. Bruce Fields
2008-08-06 19:56                                               ` J. Bruce Fields
2008-08-06 20:10                                               ` David Woodhouse
2008-08-06 20:10                                                 ` David Woodhouse
2008-08-09 16:47                                                 ` David Woodhouse
2008-08-09 16:47                                                   ` David Woodhouse
2008-08-09 16:47                                                   ` David Woodhouse
2008-08-09 19:55                                                   ` David Woodhouse
2008-08-09 19:55                                                     ` David Woodhouse
2008-08-09 20:01                                                     ` [PATCH 1/4] Factor out nfsd_do_readdir() into its own function David Woodhouse
2008-08-09 20:01                                                       ` David Woodhouse
2008-08-09 20:01                                                       ` David Woodhouse
2008-08-09 20:07                                                       ` Christoph Hellwig
2008-08-09 20:07                                                         ` Christoph Hellwig
2008-08-09 20:07                                                         ` Christoph Hellwig
2008-08-09 20:02                                                     ` [PATCH 2/4] Copy XFS readdir hack into nfsd code David Woodhouse
2008-08-09 20:02                                                       ` David Woodhouse
2008-08-09 20:02                                                       ` David Woodhouse
2008-08-09 20:08                                                       ` Christoph Hellwig
2008-08-09 20:08                                                         ` Christoph Hellwig
2008-08-09 20:03                                                     ` [PATCH 3/4] Remove XFS buffered readdir hack David Woodhouse
2008-08-09 20:03                                                       ` David Woodhouse
2008-08-09 20:03                                                       ` David Woodhouse
2008-08-09 20:09                                                       ` Christoph Hellwig
2008-08-09 20:09                                                         ` Christoph Hellwig
2008-08-09 20:09                                                         ` Christoph Hellwig
2008-08-09 20:03                                                     ` [PATCH 4/4] Reinstate NFS exportability David Woodhouse
2008-08-09 20:03                                                       ` David Woodhouse
2008-08-09 20:03                                                       ` David Woodhouse
2008-08-09 20:10                                                       ` Christoph Hellwig
2008-08-09 20:10                                                         ` Christoph Hellwig
2008-08-09 20:10                                                         ` Christoph Hellwig
2008-08-04 18:41                                     ` [RFC] Reinstate NFS exportability for JFFS2 J. Bruce Fields
2008-08-04 18:41                                       ` J. Bruce Fields
2008-08-04 22:37                                       ` Neil Brown
2008-08-04 22:37                                         ` Neil Brown
2008-08-17 18:22                                     ` Andreas Dilger
2008-08-17 18:22                                       ` Andreas Dilger
2008-08-17 18:22                                       ` Andreas Dilger
2008-08-01  2:14             ` Neil Brown
2008-08-01  2:14               ` Neil Brown
2008-08-01  8:50               ` David Woodhouse
2008-08-01  8:50                 ` David Woodhouse
2008-08-01  8:50                 ` David Woodhouse
2008-08-01 10:03               ` Al Viro
2008-08-01 10:03                 ` Al Viro
2008-08-01 10:03                 ` Al Viro
2008-08-01 23:11                 ` Neil Brown
2008-08-01 23:11                   ` Neil Brown
2008-08-01 23:11                   ` Neil Brown
2008-07-31 21:54       ` [PATCH 1/4] Factor out nfsd_do_readdir() into its own function David Woodhouse
2008-07-31 21:54       ` [PATCH 2/4] Copy XFS readdir hack into nfsd code, introduce FS_NO_LOOKUP_IN_READDIR flag David Woodhouse
2008-07-31 21:55       ` [PATCH 3/4] Switch XFS to using FS_NO_LOOKUP_IN_READDIR, remove local readdir hack David Woodhouse
2008-07-31 21:55       ` [PATCH 4/4] [JFFS2] Reinstate NFS exportability David Woodhouse
2008-07-31 21:55         ` David Woodhouse
2008-07-31 21:55         ` David Woodhouse

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=20080802213337.GA2833@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=chucklever@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=viro@zeniv.linux.org.uk \
    /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.