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 43C55C77B75 for ; Tue, 18 Apr 2023 13:43:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230477AbjDRNnR (ORCPT ); Tue, 18 Apr 2023 09:43:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230311AbjDRNnQ (ORCPT ); Tue, 18 Apr 2023 09:43:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AA26B464; Tue, 18 Apr 2023 06:43:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 295A9628B0; Tue, 18 Apr 2023 13:43:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B536C433D2; Tue, 18 Apr 2023 13:43:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681825394; bh=8CeMtAHvPr/DVv1Uah6ugiLcifRrCRLVHfjWo9vaRmA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=j2NrDv2KOl5CKpwFaABnTrRd+Z50vAnBSnVNiDyaJtYmlLpRunousgsb3IhOMRA1L /ImdUiy4XIjCDMojYV0PnvwgOgQKX+8dyFT/+eB+bmbkck8UWJEaImvsgfp2jjCgB7 MimVn9/3e9Q8wTqaHtsStmyUpYSJepF8lB3eqoQrS/mLUlObm8kBdkkrXx0Orcl0qN 4/W501ecA6KH9af/axf6BlXvI+upIYtAwlAKsAq4tH1N0wU1Zas5fF6nTJJ1uALU1k DMfJljHte1nkS90CWOIlYm0y0mskd9Jwq21D1AfqSGVgmV7mdYykFOG7a5JhMMQHcY dfztlbPplkqCA== Date: Tue, 18 Apr 2023 15:43:10 +0200 From: Christian Brauner To: Amir Goldstein Cc: Jan Kara , Matthew Bobrowski , linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [RFC][PATCH 1/2] fanotify: add support for FAN_UNMOUNT event Message-ID: <20230418-gebacken-roben-610d78ee4e66@brauner> References: <20230414182903.1852019-1-amir73il@gmail.com> <20230414182903.1852019-2-amir73il@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230414182903.1852019-2-amir73il@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org On Fri, Apr 14, 2023 at 09:29:02PM +0300, Amir Goldstein wrote: > inotify generates unsolicited IN_UNMOUNT events for every inode > mark before the filesystem containing the inode is shutdown. > > Unlike IN_UNMOUNT, FAN_UNMOUNT is an opt-in event that can only be > set on a mount mark and is generated when the mount is unmounted. > > FAN_UNMOUNT requires FAN_REPORT_FID and reports an fid info record > with fsid of the filesystem and an empty file handle. > > Signed-off-by: Amir Goldstein > --- I think this is a useful addition to the fanotify api and more useful than IN_UMOUNT. Going back to your cover letter. Afaiu, IN_UMOUNT is generated when the superblock in which a watched object resides goes away. That's roughly what I had in mind with FAN_SB_SHUTDOWN (ignoring naming discusions for now).