From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f172.google.com ([209.85.210.172]:37043 "EHLO mail-pf1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727094AbeKCJnm (ORCPT ); Sat, 3 Nov 2018 05:43:42 -0400 Received: by mail-pf1-f172.google.com with SMTP id u13-v6so1741738pfm.4 for ; Fri, 02 Nov 2018 17:34:20 -0700 (PDT) Date: Sat, 3 Nov 2018 11:34:13 +1100 From: Matthew Bobrowski To: Jan Kara Cc: Amir Goldstein , linux-fsdevel Subject: Re: FAN_OPEN_EXEC event and ignore mask Message-ID: <20181103003411.GA1314@development.internal.lab> References: <20181028060133.GA8066@development.internal.lab> <20181028222358.GA3769@workstation> <20181029134620.GF5988@quack2.suse.cz> <20181030002744.GA4214@workstation> <20181031103939.GA8325@development.internal.lab> <20181102125000.GB15086@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181102125000.GB15086@quack2.suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Nov 02, 2018 at 01:50:00PM +0100, Jan Kara wrote: > On Thu 01-11-18 16:45:47, Amir Goldstein wrote: > > Permission events cannot > > be merged, but man page doesn't say anything about that. > > It might be worth dropping a note about OPEN_EXEC_PERM > > that it could be expected to appear together in the same permission > > event with OPEN_PERM and user response will apply to both. > > Umm, I'd actually prefer if the OPEN_PERM and OPEN_EXEC_PERM events didn't > get merged. The overhead is just an additional call to fsnotify() to find > out one of the events is uninteresting (realistically, 99% of users will be > looking OPEN_PERM or OPEN_EXEC_PERM but not both) and it just keeps things > simple in the API. I understand that it may seem somewhat unexpected that > single file open will generate two different fsnotify permission events > (again 99% users won't observe this anyway) but if we start "merging" > permission events I think we open more space for confusion - like when > event arrives with some bits trimmed due to ignore mask masking bits out or > what not. What do you think Amir? This is something that I was going to bring up in my response yesterday, however I wasn't sure how you guys would take it. In my opinion, I think if we did merge the two open permission events then it would be contradicting with all the existing comments and code related to the permission events that we have scattered around the API. Thus, I'm in favour of adding the additional fsnotify()/fsnotify_parent() calls to minimise any potential confusion in regards to permission events being merged moving forward. -- Matthew Bobrowski