From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-f195.google.com ([209.85.219.195]:40170 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727343AbeJDRUo (ORCPT ); Thu, 4 Oct 2018 13:20:44 -0400 Received: by mail-yb1-f195.google.com with SMTP id w7-v6so3671832ybm.7 for ; Thu, 04 Oct 2018 03:28:06 -0700 (PDT) MIME-Version: 1.0 References: <20181003212539.2384-1-amir73il@gmail.com> <20181003212539.2384-8-amir73il@gmail.com> <20181004084608.GB11529@quack2.suse.cz> In-Reply-To: <20181004084608.GB11529@quack2.suse.cz> From: Amir Goldstein Date: Thu, 4 Oct 2018 13:27:54 +0300 Message-ID: Subject: Re: [PATCH v3 7/8] fanotify: support reporting thread id instead of process id To: Jan Kara Cc: linux-fsdevel , Nixiaoming Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Oct 4, 2018 at 11:46 AM Jan Kara wrote: > > On Thu 04-10-18 00:25:38, Amir Goldstein wrote: > > In order to identify which thread triggered the event in a > > multi-threaded program, add the FAN_EVENT_INFO_TID flag in fanotify_init > > to opt-in for reporting the event creator's thread id information. > > > > Signed-off-by: nixiaoming > > Signed-off-by: Amir Goldstein > ... > > diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h > > index afddd7e0d5a1..05b696b4856b 100644 > > --- a/include/linux/fanotify.h > > +++ b/include/linux/fanotify.h > > @@ -18,7 +18,10 @@ > > #define FANOTIFY_CLASS_BITS (FAN_CLASS_NOTIF | FAN_CLASS_CONTENT | \ > > FAN_CLASS_PRE_CONTENT) > > > > +#define FANOTIFY_EVENT_INFO_FLAGS (FAN_EVENT_INFO_TID) > > + > > #define FANOTIFY_INIT_FLAGS (FANOTIFY_CLASS_BITS | \ > > + FANOTIFY_EVENT_INFO_FLAGS | \ > > FAN_CLOEXEC | FAN_NONBLOCK | \ > > FAN_UNLIMITED_QUEUE | FAN_UNLIMITED_MARKS) > > Is there reason to define FANOTIFY_EVENT_INFO_FLAGS? But I guess you > prepare with this for further changes you want to do? Just that at this > point it looks a bit silly and I cannot really think of a reason why we'd > like to distinguish flags in FANOTIFY_EVENT_INFO_FLAGS from other flags in > FANOTIFY_INIT_FLAGS... > No functional reason. Feel free to drop FANOTIFY_EVENT_INFO_FLAGS. Thanks, Amir.