From: Chuck Lever <chuck.lever@oracle.com>
To: Benjamin Coddington <bcodding@hammerspace.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
Linux FS Devel <linux-fsdevel@vger.kernel.org>
Subject: Re: RFC: NFSD administrative interface to prevent offering NFSv4 delegation
Date: Sun, 9 Nov 2025 15:47:14 -0500 [thread overview]
Message-ID: <26959e66-f04f-4e6e-a8ce-a44c4362d99f@oracle.com> (raw)
In-Reply-To: <2602B6D3-C892-4D5A-98E7-299095BD245F@hammerspace.com>
On 11/9/25 1:57 PM, Benjamin Coddington wrote:
> On 4 Nov 2025, at 10:54, Chuck Lever wrote:
>
>> NFSD has long had some ability to disable NFSv4 delegation, by disabling
>> fs leases.
>>
>> However it would be nice to have more fine-grained control, for example
>> in cases where read delegation seems to work well but the newer forms
>> of delegation (directory, or attribute) might have bugs or performance
>> problems, and need to be disabled. There are also testing scenarios
>> where a unit test might focus specifically on one type of delegation.
>>
>> A little brainstorming:
>>
>> * Controls would be per net namespace
>> * Allow read delegations, or read and write
>> * Control attribute delegations too? Perhaps yes.
>> * Ignore the OPEN_XOR_DELEG flag? Either that, or mask off the
>> advertised feature flag.
>> * Change of setting would cause immediate behavior change; no
>> server restart needed
>> * Control directory delegations too (when they arrive)
>>
>> Is this for NFSD only, or also for local accessors (via the VFS) on the
>> NFS server?
>>
>> Should this be plumbed into NFSD netlink, or into /sys ?
>>
>> Any thoughts/opinions/suggestions are welcome at this point.
>
> Happy to read this.
>
> I think this would be most welcomed by the distros - there's been a lot of
> instances of "disable delegations" with the big knob
> /proc/sys/fs/leases-enable
>
> I'd also like to be able to twiddle these bits for clients as well, and
> lacking a netlink tool to do it for the client the logical place might be
> the client's sysfs interface.
Jeff is working on a system call API that disables delegation on the
client, to write unit tests against. Trond also proposed one, years ago.
On the client you might want to disable delegation per file.
> Would you also look to grain these settings per-client? The server's
> per-client interface in proc has been fantastic.
>
> Ben
The issue with per-client control is that, if the client hasn't already
contacted the server, we don't know how to identify that client to
the server administrator. We can't use the client's IP address because
the client could be multi-homed or DHCP-configured.
So, per client, the settings would have to be done every time the client
contacts the server after either one has rebooted (I think).
If we're doing per net-namespace on the server, that becomes easier to
implement and document. Each container instance has its own settings
that apply to all exports from that container.
--
Chuck Lever
next prev parent reply other threads:[~2025-11-09 20:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 15:54 RFC: NFSD administrative interface to prevent offering NFSv4 delegation Chuck Lever
2025-11-09 18:57 ` Benjamin Coddington
2025-11-09 20:47 ` Chuck Lever [this message]
2025-11-10 13:33 ` 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=26959e66-f04f-4e6e-a8ce-a44c4362d99f@oracle.com \
--to=chuck.lever@oracle.com \
--cc=bcodding@hammerspace.com \
--cc=linux-fsdevel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).