From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5115938759B; Mon, 9 Feb 2026 19:30:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770665449; cv=none; b=gAhk6w5l2vUfHNSBEGIffAcMkRI7r5qseKLdWqsLNK5V473/cGcSLGs43yeIz9gKm1Juzg/vy2hhPzjwkBWZzsImOZcBODJUFIaMTEVIX24SV+igAmDIe+ie6N5NknA7aNabj6AG9JAFzMif7hblQ5sGW2xf9KiYpOrdArQC0xQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770665449; c=relaxed/simple; bh=zrJUCHukbfzP557UANU8l3FaP7bX7yDd2ON1I8n/hmU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TKrX8P7YF+CgoQYOYH50RAP1z+XR+8f5TWEOeQ/9aNojBNwoncDsL4KyBUxecOwMwSCY+foyUFQwccxB/6Zjx3OSAhxH2FRt5HHdXJ5NdbPXq8lR9d7frS1c9lQyfeXV9oIFtzLUMM/g5QoawZsSuWlESDY3NrgmbL7cU7Pl+WM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Qe/57tgw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Qe/57tgw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB629C116C6; Mon, 9 Feb 2026 19:30:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770665448; bh=zrJUCHukbfzP557UANU8l3FaP7bX7yDd2ON1I8n/hmU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Qe/57tgwfFP66I8oSPSWM+4H+o7kzbimhIlnmPROULjzNkOGjGRNaueaWJZ3vdpbp wJgtw+ECH1g48fEJUkfA5QVNYEQwYg1NRK+OzyYkmYFkyWBWwaOgJENDubeW5Ms5Ah OL8UlpY3OXvX7O71wQbcPB543ybz0wNQSNVJfrXHvgsrR/DKOPrpamD6vr2D+i5dsI jmFQNM2M6mnrr+4dCMnsQRAxauJaeaySISx3BrqNWq5rHiWffT47ftdBOzdAf250iE NLZSyexIQtzO8CKVyPtcca/spPVn3/qlmf9p+uVbHe5uiQ5oUa60kDvrQRu62IAz7W i58VmSprDDcKQ== Message-ID: Date: Mon, 9 Feb 2026 14:30:46 -0500 Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 1/1] NFSD: Enforce timeout on layout recall and integrate lease manager fencing To: Dai Ngo , Chuck Lever , Jeff Layton , NeilBrown , Olga Kornievskaia , Tom Talpey , Christoph Hellwig , Alexander Aring , Alexander Viro , Christian Brauner , Jan Kara Cc: linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org References: <20260207060940.2234728-1-dai.ngo@oracle.com> Content-Language: en-US From: Chuck Lever Organization: kernel.org In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 2/9/26 2:24 PM, Dai Ngo wrote: >>> diff --git a/fs/nfsd/nfs4layouts.c b/fs/nfsd/nfs4layouts.c >>> index ad7af8cfcf1f..c02b3219ebeb 100644 >>> --- a/fs/nfsd/nfs4layouts.c >>> +++ b/fs/nfsd/nfs4layouts.c >>> @@ -27,6 +27,25 @@ static struct kmem_cache *nfs4_layout_stateid_cache; >>>   static const struct nfsd4_callback_ops nfsd4_cb_layout_ops; >>>   static const struct lease_manager_operations nfsd4_layouts_lm_ops; >>> >>> +/* >>> + * By default, if the server fails to fence a client, it retries the >>> fencing >>> + * operation indefinitely to prevent data corruption. The admin >>> needs to take >>> + * the following actions to restore access to the file for other >>> clients: >>> + * >>> + *    . shutdown or power off the client being fenced. >>> + *    . manually expire the client to release all its state on the >>> server; >>> + *      echo 'expire' > proc/fs/nfsd/clients/clientid/ctl'. >> Has there been any testing that shows expiring that client actually >> breaks the fence retry loop below? > > nfsd4_revoke_states calls nfsd4_close_layout to remove all file leases. > I manually tested it. Excellent! -- Chuck Lever