Re: [PATCH 2/3] nfsd: move change attribute generation to filesystem

J. Bruce Fields
2021-01-29T19:26:56Z

On Fri, Jan 22, 2021 at 08:20:59AM +0000, Christoph Hellwig wrote:
> On Thu, Jan 21, 2021 at 03:27:56PM -0500, J. Bruce Fields wrote:
> > > Another indirect call just to fetch the change attribute (which happens
> > > a lot IIRC) does not seem very optimal to me.
> >
> > In the next patch we're removing an fh_getattr (vfs_getattr) in the case
> > we call the new op, so that's typically a net decrease in indirect
> > calls.
> >
> > Though maybe we could use a flag here and do without either.
> >
> > > And the fact that we need three duplicate implementations also is not
> > > very nice.
> >
> > Ext4 and xfs are identical, btrfs is a little different since it doesn't
> > consult I_VERSION. (And then there's nfs, which uses the origin
> > server's i_version if it can.)
>
> I'd much prefer to just keep consulting the I_VERSION flag and only
> add the new op as an override for the NFS export.

OK, sorry for the delay, I'm not wedded to that second patch; I can just
replace the test for the new export op by a test for either that or
SB_I_VERSION, and it ends up being the same. Will follow up in a
moment.....

--b.