From: dai.ngo@oracle.com
To: Calum Mackay <calum.mackay@oracle.com>,
chuck.lever@oracle.com, jlayton@kernel.org
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/1] NFSD: send OP_CB_RECALL_ANY to clients when number of delegations reaches its limit
Date: Wed, 21 Feb 2024 15:52:26 -0800 [thread overview]
Message-ID: <fe95feb5-a2b7-456c-957c-2b50f1eaac77@oracle.com> (raw)
In-Reply-To: <530d4fa6-f4f8-4981-b352-095c9d038f41@oracle.com>
On 2/21/24 2:55 PM, Calum Mackay wrote:
> hi Dai,
>
> On 20/02/2024 11:58 pm, Dai Ngo wrote:
>> The NFS server should ask clients to voluntarily return unused
>> delegations when the number of granted delegations reaches the
>> max_delegations. This is so that the server can continue to
>> hand out delegations for new requests.
>>
>> Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
>> ---
>> fs/nfsd/nfs4state.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
>> index fdc95bfbfbb6..a0bd6f6b994d 100644
>> --- a/fs/nfsd/nfs4state.c
>> +++ b/fs/nfsd/nfs4state.c
>> @@ -130,6 +130,7 @@ static const struct nfsd4_callback_ops
>> nfsd4_cb_notify_lock_ops;
>> static const struct nfsd4_callback_ops nfsd4_cb_getattr_ops;
>> static struct workqueue_struct *laundry_wq;
>> +static void deleg_reaper(struct nfsd_net *nn);
>
> Nits: If this is actually needed (you seem to be calling it after it
> is defined?),
Yes, it's needed for a clean build:
fs/nfsd/nfs4state.c:6554:17: error: implicit declaration of function ‘deleg_reaper’ [-Werror=implicit-function-declaration]
> shouldn't it be with the other forward decls around lines 84–89?
I'll move it up in v2.
Thanks,
-Dai
>
> cheers,
> calum.
>
>> int nfsd4_create_laundry_wq(void)
>> {
>> @@ -6550,6 +6551,8 @@ nfs4_laundromat(struct nfsd_net *nn)
>> /* service the server-to-server copy delayed unmount list */
>> nfsd4_ssc_expire_umount(nn);
>> #endif
>> + if (atomic_long_read(&num_delegations) >= max_delegations)
>> + deleg_reaper(nn);
>> out:
>> return max_t(time64_t, lt.new_timeo, NFSD_LAUNDROMAT_MINTIMEOUT);
>> }
>
>
prev parent reply other threads:[~2024-02-21 23:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 23:58 [PATCH 1/1] NFSD: send OP_CB_RECALL_ANY to clients when number of delegations reaches its limit Dai Ngo
2024-02-21 22:55 ` Calum Mackay
2024-02-21 23:52 ` dai.ngo [this message]
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=fe95feb5-a2b7-456c-957c-2b50f1eaac77@oracle.com \
--to=dai.ngo@oracle.com \
--cc=calum.mackay@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@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).