Re: [PATCH] nfsd: fix race to check ls_layouts
From: Benjamin Coddington <hidden>
Date: 2023-01-27 16:43:58
On 27 Jan 2023, at 11:34, Chuck Lever III wrote:
quoted
On Jan 27, 2023, at 11:18 AM, Benjamin Coddington [off-list ref] wrote: Its possible for __break_lease to find the layout's lease before we've added the layout to the owner's ls_layouts list. In that case, setting ls_recalled = true without actually recalling the layout will cause the server to never send a recall callback. Move the check for ls_layouts before setting ls_recalled. Signed-off-by: Benjamin Coddington <redacted>Did this start misbehaving recently, or has it always been broken? That is, does it need: Fixes: c5c707f96fc9 ("nfsd: implement pNFS layout recalls") ?
I'm doing some new testing of racing LAYOUTGET and CB_LAYOUTRETURN after running into a livelock, so I think it has always been broken and the Fixes tag is probably appropriate. However, now I'm wondering if we'd run into trouble if ls_layouts could be empty but the lease still exist.. but that seems like it would be a different bug. Ben