Linux NFS development
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Benjamin Coddington <bcodding@redhat.com>
Cc: Jeff Layton <jlayton@kernel.org>,
	trond.myklebust@hammerspace.com, anna@kernel.org,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] NFSv4: Allow per-mount tuning of READDIR attrs
Date: Wed, 18 Oct 2023 10:33:06 -0400	[thread overview]
Message-ID: <ZS/sogNrJZVi7RJP@tissot.1015granger.net> (raw)
In-Reply-To: <27DF51B5-0794-497B-A3F5-99F16B14D787@redhat.com>

On Wed, Oct 18, 2023 at 10:24:18AM -0400, Benjamin Coddington wrote:
> On 18 Oct 2023, at 9:33, Jeff Layton wrote:
> 
> > On Wed, 2023-10-18 at 08:56 -0400, Chuck Lever wrote:
> >> On Tue, Oct 17, 2023 at 05:30:44PM -0400, Benjamin Coddington wrote:
> >>> Expose a per-mount knob in sysfs to set the READDIR requested attributes
> >>> for a non-plus READDIR request.
> >>>
> >>> For example:
> >>>
> >>>   echo 0x800 0x800000 0x0 > /sys/fs/nfs/0\:57/v4_readdir_attrs
> >>>
> >>> .. will revert the client to only request rdattr_error and
> >>> mounted_on_fileid for any non "plus" READDIR, as before the patch
> >>> preceeding this one in this series.  This provides existing installations
> >>> an option to fix a potential performance regression that may occur after
> >>> NFS clients update to request additional default READDIR attributes.
> >>>
> >>> Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
> >>> ---
> >>>  fs/nfs/client.c           |  2 +
> >>>  fs/nfs/nfs4client.c       |  4 ++
> >>>  fs/nfs/nfs4proc.c         |  1 +
> >>>  fs/nfs/nfs4xdr.c          |  7 ++--
> >>>  fs/nfs/sysfs.c            | 81 +++++++++++++++++++++++++++++++++++++++
> >>>  include/linux/nfs_fs_sb.h |  1 +
> >>>  include/linux/nfs_xdr.h   |  1 +
> >>>  7 files changed, 93 insertions(+), 4 deletions(-)
> >>
> >> Admittedly, it would be much easier for humans to use if the API was
> >> based on the symbolic names of the bits rather than a triplet of raw
> >> hexadecimal values.
> 
> This isn't aiming to be an ease-of-use interface.  This is tinkering with
> the innards of the client.  If you're doing this, you better know how to
> convert between bases, because you're going to need that and more.
> 
> If we want to make it nice, patches to nfsctl can follow.

I don't see a reason this shouldn't be easier to use, especially
since mistakes in setting these bits have consequences. There are
currently 82 of them, after all.

But, OK, the polish can be applied by a user space tool.


-- 
Chuck Lever

  reply	other threads:[~2023-10-18 14:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 21:30 [PATCH 0/2] NFSv4 READDIR d_type fixup Benjamin Coddington
2023-10-17 21:30 ` [PATCH 1/2] NFSv4: Always ask for type with READDIR Benjamin Coddington
2023-10-17 21:30 ` [PATCH 2/2] NFSv4: Allow per-mount tuning of READDIR attrs Benjamin Coddington
2023-10-18 12:56   ` Chuck Lever
2023-10-18 13:33     ` Jeff Layton
2023-10-18 14:24       ` Benjamin Coddington
2023-10-18 14:33         ` Chuck Lever [this message]
2023-10-18 14:25       ` Chuck Lever
2023-10-18 18:38         ` Anna Schumaker
2023-10-18 19:08           ` Benjamin Coddington
2023-10-18 19:17           ` Benjamin Coddington
2023-10-19 12:06   ` kernel test robot
2023-10-19 12:52     ` Benjamin Coddington
2023-10-19 12:18   ` kernel test robot

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=ZS/sogNrJZVi7RJP@tissot.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=anna@kernel.org \
    --cc=bcodding@redhat.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.com \
    /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