[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7034A7D2-7AE3-4704-B30A-7D0D477307B0@redhat.com>
Date: Fri, 21 Feb 2025 10:11:30 -0500
From: Benjamin Coddington <bcodding@...hat.com>
To: Jeff Layton <jlayton@...nel.org>
Cc: Chuck Lever <chuck.lever@...cle.com>,
Li Lingfeng <lilingfeng3@...wei.com>, neilb@...e.de, okorniev@...hat.com,
Dai.Ngo@...cle.com, tom@...pey.com, linux-nfs@...r.kernel.org,
linux-kernel@...r.kernel.org, yukuai1@...weicloud.com, houtao1@...wei.com,
yi.zhang@...wei.com, yangerkun@...wei.com, lilingfeng@...weicloud.com
Subject: Re: [PATCH] nfsd: decrease cl_cb_inflight if fail to queue cb_work
On 21 Feb 2025, at 9:58, Jeff Layton wrote:
> On Fri, 2025-02-21 at 09:46 -0500, Benjamin Coddington wrote:
>> On 21 Feb 2025, at 9:37, Jeff Layton wrote:
>>
>>> On Fri, 2025-02-21 at 09:06 -0500, Benjamin Coddington wrote:
>>>> On 18 Feb 2025, at 9:40, Jeff Layton wrote:
>>>
>>> lease_breaking() is only checked when want_write is false. IOW, if
>>> you're breaking the lease for write, then lm_break is always called.
>>>
>>> Is that a bug or a feature? I'm not sure, but it's been that way since
>>> ~2011.
>>
>> Yeah.. why?
>>
>> Thanks I missed that detail when I refreshed my memory of it just now.
>> Seems like you'd want to avoid constantly calling lm_break for both cases,
>> spamming the lock manager adds nothing. 2 cents.
>>
>
> Sorry, it doesn't get called every time. If want_write is called then
> we _do_ check FL_UNLOCK_PENDING. IOW, you can get a downgrade attempt
> first, and then a full unlock request later.
>
> nfsd doesn't do downgrades. It recalls the object either way. So,
> ignoring subsequent lm_break calls is the right thing to do, I think.
Got it, thanks for clarifying this behavior for me!
Ben
Powered by blists - more mailing lists