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 B32EA3537FC; Wed, 8 Apr 2026 18:16:54 +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=1775672214; cv=none; b=WRYTVNHw7LxKJ35DX4B5wC6JhtQtBP7UDuRfONliZRiXk9bCH28ueyuEZyavO7OzUrYMmxe3fxcWJJ/3YqPZCNON8ZiF9RnxbnWbk1thzW5/3GOmno8M2XrLDTexfhJYHUim5YD4BOCzzbwjSCDheisuheMlExITsjJuXcOFVns= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775672214; c=relaxed/simple; bh=HKHxPoblaork2H0d6qRNs+Qxh9dmFv1KNw8j/ngGj2k=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=oijGH4/UxiwicBavlloExqjMDJoCkfKAudKEzW88VofMidFcZ6BSWs4wF9jx/pBX0+OT+HWmCo1EEB1kvDn8fb8zIWRPWhTtA3wnDz/DmpSEjCVmrNDiMi25cUvZHcwIZ4S9O+1vSLRvZzKUU9Gl9ZUFzMMQeuPyVCYj7Zt1xyo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rrd3Vq+f; 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="rrd3Vq+f" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F9D3C19425; Wed, 8 Apr 2026 18:16:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775672214; bh=HKHxPoblaork2H0d6qRNs+Qxh9dmFv1KNw8j/ngGj2k=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=rrd3Vq+fpd2blfg6wopfmOudbeG4wNDSlpCfejvmvd9EMcoPsT5k51gL7CuUaYk8b CpHgEcnumiCYVsoUwEVKTzSkoA/DVcdCU+DX3KHP2lXzv4YXjSXHuElsMVzZ8VZNaF mnCA9VD3Q974qfsAM7/mh5BiUph3l8bViDzZ4Wt3RsjC9DHTgC0R++6fU7MAY3ViK8 fep2ac1qhUEMg4BJqE/fnCyhwpxcEteOSOopRmtr0JdkXz4HaLZIWkW0zTlPiKWibw viZJiaSqhgue58xJCCwHiW3Zpv37EyeLmBL+v3mjOw7OWGvECH+WmbkdD6RXkg+GTx tDGbFufErBw8Q== Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailfauth.phl.internal (Postfix) with ESMTP id 036AEF4006C; Wed, 8 Apr 2026 14:16:53 -0400 (EDT) Received: from phl-imap-15 ([10.202.2.104]) by phl-compute-10.internal (MEProxy); Wed, 08 Apr 2026 14:16:53 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddvgedvjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvvefkjghfufgtgfesthejredtredttdenucfhrhhomhepfdevhhhutghk ucfnvghvvghrfdcuoegtvghlsehkvghrnhgvlhdrohhrgheqnecuggftrfgrthhtvghrnh ephfffkefffedtgfehieevkeduuefhvdejvdefvdeuuddvgeelkeegtefgudfhfeelnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheptghhuhgtkh hlvghvvghrodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduieefgeelleel heelqdefvdelkeeggedvfedqtggvlheppehkvghrnhgvlhdrohhrghesfhgrshhtmhgrih hlrdgtohhmpdhnsggprhgtphhtthhopedvgedpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtohepnhgvihhlsegsrhhofihnrdhnrghmvgdprhgtphhtthhopehmrghthhhivghurd guvghsnhhohigvrhhssegvfhhfihgtihhoshdrtghomhdprhgtphhtthhopegrlhgvgidr rghrihhnghesghhmrghilhdrtghomhdprhgtphhtthhopegrmhhirhejfehilhesghhmrg hilhdrtghomhdprhgtphhtthhopehrohhsthgvughtsehgohhoughmihhsrdhorhhgpdhr tghpthhtoheprghnnhgrsehkvghrnhgvlhdrohhrghdprhgtphhtthhopegsrhgruhhnvg hrsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehjlhgrhihtohhnsehkvghrnhgvlhdr ohhrghdprhgtphhtthhopehmhhhirhgrmhgrtheskhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: ifa6e4810:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id C882B780070; Wed, 8 Apr 2026 14:16:52 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: A5DZmuaHBpig Date: Wed, 08 Apr 2026 14:16:32 -0400 From: "Chuck Lever" To: "Jeff Layton" , "Alexander Viro" , "Christian Brauner" , "Jan Kara" , "Chuck Lever" , "Alexander Aring" , "Steven Rostedt" , "Masami Hiramatsu" , "Mathieu Desnoyers" , "Jonathan Corbet" , "Shuah Khan" , NeilBrown , "Olga Kornievskaia" , "Dai Ngo" , "Tom Talpey" , "Trond Myklebust" , "Anna Schumaker" , "Amir Goldstein" Cc: "Calum Mackay" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-nfs@vger.kernel.org Message-Id: In-Reply-To: <20260407-dir-deleg-v1-1-aaf68c478abd@kernel.org> References: <20260407-dir-deleg-v1-0-aaf68c478abd@kernel.org> <20260407-dir-deleg-v1-1-aaf68c478abd@kernel.org> Subject: Re: [PATCH 01/24] filelock: add support for ignoring deleg breaks for dir change events Content-Type: text/plain Content-Transfer-Encoding: 7bit On Tue, Apr 7, 2026, at 9:21 AM, Jeff Layton wrote: > If a NFS client requests a directory delegation with a notification > bitmask covering directory change events, the server shouldn't recall > the delegation. Instead the client will be notified of the change after > the fact. > > Add support for ignoring lease breaks on directory changes. Add a new > flags parameter to try_break_deleg() and teach __break_lease how to > ignore certain types of delegation break events. > > Signed-off-by: Jeff Layton > --- > diff --git a/fs/locks.c b/fs/locks.c > index 8e44b1f6c15a..dafa0752fdce 100644 > --- a/fs/locks.c > +++ b/fs/locks.c > @@ -1670,7 +1709,7 @@ int __break_lease(struct inode *inode, unsigned int flags) > locks_delete_lock_ctx(&fl->c, &dispose); > } > > - if (list_empty(&ctx->flc_lease)) > + if (!visible_leases_remaining(inode, flags)) > goto out; > > if (flags & LEASE_BREAK_NONBLOCK) { After breaking visible leases, the restart: label calls any_leases_conflict() which does not filter ignored dir-delegation leases. When only ignored leases remain, any_leases_conflict returns true, but visible_leases_remaining also returned true (triggering the wait). The code picks the first lease (possibly ignored), computes break_time = 1 jiffy, blocks, then loops. For example, suppose you have two directory delegations on a directory, one with FL_IGN_DIR_DELETE and one without. After the non-ignored one is broken and removed, the ignored one keeps any_leases_conflict returning true. The loop spins at 1-jiffy intervals until the ignored delegation is released. Should the restart: block skip ignored leases? -- Chuck Lever