From: Chuck Lever III <chuck.lever@oracle.com>
To: Martin Wege <martin.l.wege@gmail.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v3] nfsd: disallow file locking and delegations for NFSv4 reexport
Date: Tue, 29 Oct 2024 14:11:03 +0000 [thread overview]
Message-ID: <7FB2B261-48F9-4DA0-B4B5-E8E30EC31CD9@oracle.com> (raw)
In-Reply-To: <CANH4o6Pi13aEtQW5-vmuJiuCNzx6tjn1+v=pLUpVMuffX-WkPA@mail.gmail.com>
> On Oct 29, 2024, at 9:57 AM, Martin Wege <martin.l.wege@gmail.com> wrote:
>
> On Wed, Oct 23, 2024 at 5:58 PM Mike Snitzer <snitzer@kernel.org> wrote:
>>
>> We do not and cannot support file locking with NFS reexport over
>> NFSv4.x for the same reason we don't do it for NFSv3: NFS reexport
>> server reboot cannot allow clients to recover locks because the source
>> NFS server has not rebooted, and so it is not in grace. Since the
>> source NFS server is not in grace, it cannot offer any guarantees that
>> the file won't have been changed between the locks getting lost and
>> any attempt to recover/reclaim them. The same applies to delegations
>> and any associated locks, so disallow them too.
>>
>> Add EXPORT_OP_NOLOCKSUPPORT and exportfs_lock_op_is_unsupported(), set
>> EXPORT_OP_NOLOCKSUPPORT in nfs_export_ops and check for it in
>> nfsd4_lock(), nfsd4_locku() and nfs4_set_delegation(). Clients are
>> not allowed to get file locks or delegations from a reexport server,
>> any attempts will fail with operation not supported.
>
> Are you aware that this virtually castrates NFSv4 reexport to a point
> that it is no longer usable in real life?
"virtually castrates" is pretty nebulous. Please provide a
detailed (and less hostile) account of an existing application
that works today that no longer works when this patch is
applied. Only then can we count this as a regression report.
> If you really want this,
> then the only way forward is to disable and remove NFS reexport
> support completely.
"No locking" is already the way NFSv3 re-export works.
At the moment I cannot remember why we chose not to go with
the "only local locking for re-export" design instead.
--
Chuck Lever
next prev parent reply other threads:[~2024-10-29 14:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 14:54 [PATCH] nfsd: disallow file locking and delegations for NFSv4 proxy Mike Snitzer
2024-10-23 15:03 ` Chuck Lever
2024-10-23 15:29 ` [PATCH v2] " Mike Snitzer
2024-10-23 15:58 ` [PATCH v3] nfsd: disallow file locking and delegations for NFSv4 reexport Mike Snitzer
2024-10-29 13:57 ` Martin Wege
2024-10-29 14:11 ` Chuck Lever III [this message]
2024-10-29 15:54 ` Brian Cowan
2024-10-29 16:03 ` Chuck Lever III
2024-10-30 14:55 ` Cedric Blancher
2024-10-30 16:15 ` Chuck Lever III
2024-10-30 16:37 ` Cedric Blancher
2024-10-30 16:59 ` Chuck Lever III
2024-10-30 22:48 ` Rick Macklem
2024-10-31 11:43 ` Jeff Layton
2024-10-31 14:48 ` Rick Macklem
2024-10-31 15:01 ` Chuck Lever III
2024-10-31 16:02 ` Rick Macklem
2024-10-31 15:14 ` Chuck Lever
2024-11-18 18:57 ` Chuck Lever
2024-11-19 0:37 ` Daire Byrne
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=7FB2B261-48F9-4DA0-B4B5-E8E30EC31CD9@oracle.com \
--to=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=martin.l.wege@gmail.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