From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-f65.google.com ([209.85.161.65]:35550 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731276AbeKVCQI (ORCPT ); Wed, 21 Nov 2018 21:16:08 -0500 Received: by mail-yw1-f65.google.com with SMTP id h32so2411218ywk.2 for ; Wed, 21 Nov 2018 07:41:11 -0800 (PST) MIME-Version: 1.0 References: <20181114174344.17530-1-amir73il@gmail.com> <20181114174344.17530-3-amir73il@gmail.com> <20181120115901.GH8842@quack2.suse.cz> <20181121131830.GB28182@quack2.suse.cz> In-Reply-To: <20181121131830.GB28182@quack2.suse.cz> From: Amir Goldstein Date: Wed, 21 Nov 2018 17:40:59 +0200 Message-ID: Subject: Re: [PATCH v2 2/5] fsnotify: annotate filename events To: Jan Kara Cc: Matthew Bobrowski , linux-fsdevel Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Nov 21, 2018 at 3:18 PM Jan Kara wrote: > > On Tue 20-11-18 16:58:31, Amir Goldstein wrote: > > On Tue, Nov 20, 2018 at 1:59 PM Jan Kara wrote: > > > > > > On Wed 14-11-18 19:43:41, Amir Goldstein wrote: > > > > Filename events are referring to events that modify directory entries, > > > > such as create,delete,rename. Those events should always be reported > > > > on a watched directory, regardless if FS_EVENT_ON_CHILD is set > > > > on the watch mask. > > > > > > OK, I find 'directory modification events' clearer than 'filename events'. > > > But I can live with your name since I don't really have a better > > > alternative :). Just please define these events in terms of all FS_ > > > events that are involved so that everyone is on the same page which events > > > you mean. > > > > > > > From a later fanotify patch: > > > > /* > > * Events whose reported fid is the parent directory. > > * fanotify may get support for reporting the filename in the future. > > * For now, listener only gets notified that a create/delete/rename took > > * place in that directory. > > */ > > #define FANOTIFY_FILENAME_EVENTS (FAN_MOVE | FAN_CREATE | FAN_DELETE) > > > > I went back and forth with this trying to come up with a better > > name and DIR_MODIFY_EVENTS did cross my mind, but the > > problem is that FS_MODIFY|FS_ISDIR is technically also a directory > > modification event, so we are really looking at "directory entry modification" > > and I didn't like the sounds of DIRENT_EVENTS. > > But we never generate FS_MODIFY|FS_ISDIR events so I don't think there's a > big space for confusion (and I've deliberately used CHANGE instead of > MODIFY to make the distinction even clearer). FWIW > FANOTIFY_DIRENT_MODIFY_EVENTS would also look better than _FILENAME_EVENTS > to me. > Fair enough. I'll change to FANOTIFY_DIRENT_MODIFY_EVENTS and similar named helpers and comments in fsnotify.h. Thanks, Amir.