From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F35F5C001E0 for ; Thu, 27 Jul 2023 11:37:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231590AbjG0Lhd (ORCPT ); Thu, 27 Jul 2023 07:37:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231163AbjG0Lhc (ORCPT ); Thu, 27 Jul 2023 07:37:32 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2CC3135 for ; Thu, 27 Jul 2023 04:37:30 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1FB59320046F; Thu, 27 Jul 2023 07:37:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 27 Jul 2023 07:37:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rath.org; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1690457849; x=1690544249; bh=8m t7BlsoZ3JZK5KL25oPh4zBAwjMNg3JZHz2IsKdFGE=; b=IgAC9Zwix7I3ggB7v4 tUemcdnpHwRoLtI/GRlvS2qT+sUIWePShqbO5/L8NffgqRAgiSNKWrg28LF9WfK+ 1riO3gl+LEL8wXnwnLeTsVmD7eTSI9VIuyp/hzCfbF+2eB29dHCIyXJJjcN6IIjD h3Is49naO6jWVIX29/Y7Izf4cE/K54FC5KsbqNYeliKKuxM1M/hXrwjIHNT3smXg xnniU1Kf2wmK3flcmL90elsMUZc5qLRoM+EbG49xf/IKyj4DMK9PqGGa8pWQ89qM 08/xe6ErGKkUjU7tyAgZUEeDZAIrK2obl1paHRpMQHjuwXQKIDu4I79MAnU3RDQ/ X7bg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1690457849; x=1690544249; bh=8mt7BlsoZ3JZK 5KL25oPh4zBAwjMNg3JZHz2IsKdFGE=; b=c+N10ZQCvrxRS5HD6/ViKxamJ+Il8 ls0d23PnvhhUMkAOKvkksLvc7IxGm+7uLQfynzht9CxXzFEm67yzl143vHGrtty6 LzzJlSEs1KgiA75eOJbnh9+m1siqpyXaJ6dl5HlhAe0upgAePY54XYtSO/ArLTB3 KcDquUaUBKNMMVC3enAKTlz6pBHRcLLtpjgSGbkMXY6mZrnzo2C0z7UtOiZu5QBH 8pghiIS1Xc37V7TjBBauRTlcIcHbC7rtV6k55+jS2OkPH97i/mUoPGjMRckvdMlr 2FNSqpCi9UaF1sbuSDCQplN8JFPhP77aLDOw+0nlBf+bfXFK1Z2vs6FlA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrieeggdduiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufhfffgjkfgfgggtsehttddttddtredtnecuhfhrohhmpefpihhkohhl rghushcutfgrthhhuceopfhikhholhgruhhssehrrghthhdrohhrgheqnecuggftrfgrth htvghrnhepjeeuveettdeugfeigeefveehhffhieegieetvdelgfelleekgffgvefhffeg udffnecuffhomhgrihhnpegsohhothhlihhnrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheppfhikhholhgruhhssehrrghthhdrohhr gh X-ME-Proxy: Feedback-ID: i53a843ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Jul 2023 07:37:28 -0400 (EDT) Received: from vostro.rath.org (vostro [192.168.12.4]) by ebox.rath.org (Postfix) with ESMTPS id 5D94C134; Thu, 27 Jul 2023 11:37:27 +0000 (UTC) Received: by vostro.rath.org (Postfix, from userid 1000) id B917180832; Thu, 27 Jul 2023 12:37:26 +0100 (BST) From: Nikolaus Rath To: Miklos Szeredi via fuse-devel Cc: Linux FS Devel , miklos , Miklos Szeredi Subject: Re: [fuse-devel] Semantics of fuse_notify_delete() References: <87wmymk0k9.fsf@vostro.rath.org> Mail-Copies-To: never Mail-Followup-To: Miklos Szeredi via fuse-devel , Linux FS Devel , miklos , Miklos Szeredi Date: Thu, 27 Jul 2023 12:37:26 +0100 In-Reply-To: (Miklos Szeredi via fuse-devel's message of "Thu, 27 Jul 2023 10:04:56 +0200") Message-ID: <87tttpk2kp.fsf@vostro.rath.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Jul 27 2023, Miklos Szeredi via fuse-devel wrote: > On Wed, 26 Jul 2023 at 20:09, Nikolaus Rath wrote: >> >> Hello, >> >> It seems to me that fuse_notify_delete >> (https://elixir.bootlin.com/linux/v6.1/source/fs/fuse/dev.c#L1512) fails >> with ENOTEMPTY if there is a pending FORGET request for a directory >> entry within. Is that correct? > > It's bug if it does that. > > The code related to NOTIFY_DELETE in fuse_reverse_inval_entry() seems > historic. It's supposed to be careful about mountpoints and > referenced dentries, but d_invalidate() should have already gotten all > that out of the way and left an unhashed dentry without any submounts > or children. The checks just seem redundant, but not harmful. > > If you are managing to trigger the ENOTEMPTY case, then something > strange is going on, and we need to investigate. I can trigger this reliable on kernel 6.1.0-10-amd64 (Debian stable) with this sequence of operations: $ mkdir test $ echo foo > test/bar $ Trigger removal of test/bar and then test within the filesystem (not through unlink()/rmdir() but out-of-band) What can I do to help with the investigation? Best, -Nikolaus