Linux NFS development
 help / color / mirror / Atom feed
From: Benjamin Coddington <bcodding@redhat.com>
To: Trond Myklebust <trondmy@hammerspace.com>
Cc: anna@kernel.org, linux-nfs@vger.kernel.org
Subject: Re: [PATCH v3 1/1] NFS: Extend rdirplus mount option with "force|none"
Date: Thu, 13 Mar 2025 12:51:06 -0400	[thread overview]
Message-ID: <CC12FA15-DC88-4A43-AA2B-36563C1D4641@redhat.com> (raw)
In-Reply-To: <5b2abbe2d387f7d68d41d4786655fa51a9a9ddbb.camel@hammerspace.com>

On 13 Mar 2025, at 12:34, Trond Myklebust wrote:

> On Thu, 2025-03-13 at 10:43 -0400, Benjamin Coddington wrote:
>> There are certain users that wish to force the NFS client to choose
>> READDIRPLUS over READDIR for a particular mount.  Update the
>> "rdirplus" mount
>> option to optionally accept values.  For "rdirplus=force", the NFS
>> client
>> will always attempt to use READDDIRPLUS.  The setting of
>> "rdirplus=none" is
>> aliased to the existing "nordirplus".
>>
>> Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
>> ---
>>  fs/nfs/dir.c              |  2 ++
>>  fs/nfs/fs_context.c       | 32 ++++++++++++++++++++++++++++----
>>  fs/nfs/super.c            |  1 +
>>  include/linux/nfs_fs_sb.h |  1 +
>>  4 files changed, 32 insertions(+), 4 deletions(-)
>>
>> diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
>> index 2b04038b0e40..c9de0e474cf5 100644
>> --- a/fs/nfs/dir.c
>> +++ b/fs/nfs/dir.c
>> @@ -666,6 +666,8 @@ static bool nfs_use_readdirplus(struct inode
>> *dir, struct dir_context *ctx,
>>  {
>>  	if (!nfs_server_capable(dir, NFS_CAP_READDIRPLUS))
>>  		return false;
>> +	if (NFS_SERVER(dir)->flags && NFS_MOUNT_FORCE_RDIRPLUS)
>
> Bitwise and?

Oh crap - my tests are junk.

Ben


  reply	other threads:[~2025-03-13 16:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13 14:42 [PATCH v3 0/1] Mount option rdirplus extension Benjamin Coddington
2025-03-13 14:43 ` [PATCH v3 1/1] NFS: Extend rdirplus mount option with "force|none" Benjamin Coddington
2025-03-13 16:34   ` Trond Myklebust
2025-03-13 16:51     ` Benjamin Coddington [this message]
2025-03-13 15:18 ` [PATCH] nfs(5): Add new rdirplus functionality, clarify Benjamin Coddington

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=CC12FA15-DC88-4A43-AA2B-36563C1D4641@redhat.com \
    --to=bcodding@redhat.com \
    --cc=anna@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@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