Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp675028pxt; Thu, 5 Aug 2021 08:57:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjLEhYcJ/vZhg8QWiIKvhgozANziPwAlJNPpJYbsSB3/pAWQuUdoxm4uqOGpr7na3M58/4 X-Received: by 2002:a17:906:6855:: with SMTP id a21mr5561661ejs.97.1628179063609; Thu, 05 Aug 2021 08:57:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628179063; cv=none; d=google.com; s=arc-20160816; b=PeY2YGuxRTbID6ipjFzyRQXBeZ6fDLUvA6756IJIezckc5XXUKIRF8lc0IxVK84CjA hOmudM6fk8V52t81jDgmqRUQ3HRnAq8vI8r644e/l2U2cszGvP3nBQ/+p6Tp7LLlhcre qIWLi1XSCX5a/JkaKCLyT9qiQd3SWJpCT/zPXvT5haHxdf5kNlwJwiV4h4W5uNk14OLe XKCMCQXLa2z/r0rdCwGQCqJUkdXe4WblgeZimwjDLWbHCYnPdEmOvCBC+2JnkovWuIzj 8Y1JuF/KRvwmKRPB6SUblD/eM1NDFGnISwj00KIbaUi4q2SmotITpiOjQW2IfSNU9viV NB5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=dRS8W2fSdbInZnode1VLLZoQwYcBMtWZIsbGmSoeHq4=; b=aCkvqzDlXfxEc2IY61ktXkVQxL2VZ/dzCSRnp+PkvGwk+lVFWKoM/MyCcxPf620GR2 tqmObe3AVki9Wos1K8TgX4IvPVX+TA1B9FLk6/4hagGsziFpMkzf09T3o3DDbcFQf7na vXEbg0Gtbx4ei30LE+9g2d3Y5U0hMiE/Tbk+FDqun8HERLuSGEuNJuQf7Nfly5HdeUVn V4uL8NwTRcTxB6fEumEOJE7LqUAtcJaQ5wYlrQV14M1hTo0PsqCznsSnqHGCOxnTJ6VI gZ+4/v/nmPX2knCBeopSUUQYFMR0egF3ZL+nxFBtpDeRtoXz1rZI2tN1xRVM22ya+3+8 75yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=CIthExvP; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=EDs3lSss; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si2815768edf.583.2021.08.05.08.57.15; Thu, 05 Aug 2021 08:57:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=CIthExvP; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=EDs3lSss; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242654AbhHEPzo (ORCPT + 99 others); Thu, 5 Aug 2021 11:55:44 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:39658 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242655AbhHEPzo (ORCPT ); Thu, 5 Aug 2021 11:55:44 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 088C0223D1; Thu, 5 Aug 2021 15:55:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1628178929; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dRS8W2fSdbInZnode1VLLZoQwYcBMtWZIsbGmSoeHq4=; b=CIthExvPxVPjncvT/rZM6Ys3SU0tML4mogdAk1aRD87nTInO6G33Hzr9uOphb4MtjNowbh h9hScglk4NVTZ0kEfvj8QHNvFRgfW0210bWSYiiY/6uymFwRjMZT6eulb8g7V2u+t5Do2+ hlCDwKYqAduCr+xDTxKZAD8VLBkwEaA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1628178929; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dRS8W2fSdbInZnode1VLLZoQwYcBMtWZIsbGmSoeHq4=; b=EDs3lSsswX+BstistyykpAfNDfRb8tHe6Csjc0wAl/PivhiucKFONjcq4WCjIZb3++9/5v /clobKWir5R/mIDg== Received: from quack2.suse.cz (unknown [10.100.224.230]) by relay2.suse.de (Postfix) with ESMTP id E3B0BA4A52; Thu, 5 Aug 2021 15:55:28 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id B55671E1511; Thu, 5 Aug 2021 17:55:28 +0200 (CEST) Date: Thu, 5 Aug 2021 17:55:28 +0200 From: Jan Kara To: Amir Goldstein Cc: Jan Kara , Gabriel Krisman Bertazi , Jan Kara , "Darrick J. Wong" , Theodore Tso , Dave Chinner , David Howells , Khazhismel Kumykov , linux-fsdevel , Ext4 , Linux API , kernel@collabora.com Subject: Re: [PATCH v5 10/23] fsnotify: Allow events reported with an empty inode Message-ID: <20210805155528.GN14483@quack2.suse.cz> References: <20210804160612.3575505-1-krisman@collabora.com> <20210804160612.3575505-11-krisman@collabora.com> <20210805102453.GG14483@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu 05-08-21 17:14:26, Amir Goldstein wrote: > > 2) AFAICS 'inode' can be always derived from 'data' as well. So maybe we > > can drop it Amir? > > If only we could. The reason that we pass the allegedly redundant inode > argument is because there are two different distinguished inode > arguments: > > 1. The inode event happened on, which can be referenced from data > 2. Inode that may be marked, which is passed in the inode argument > > Particularly, dirent events carry the inode of the child as data, but > intentionally pass NULL inode arguments, because mark on inode > itself should not be getting e.g. FAN_DELETE event, but > audit_mark_handle_event() uses the child inode data. I see, thanks for explanation. I forgot that NULL 'inode' argument from fsnotify_name() is actually needed for this to work. > If we wanted to, we could pass report_mask arg to fsnotify() > instead of inode arg and then fsnotify() will build iter_info > accordingly, but that sounds very complicated and doesn't gain > much. Yeah. I'll think a bit more if we could simplify this but now I don't see anything obvious. Honza -- Jan Kara SUSE Labs, CR