From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb0-f193.google.com ([209.85.213.193]:33757 "EHLO mail-yb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753667AbeE3Pk2 (ORCPT ); Wed, 30 May 2018 11:40:28 -0400 Received: by mail-yb0-f193.google.com with SMTP id x36-v6so6506865ybi.0 for ; Wed, 30 May 2018 08:40:28 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <470ddceb-fa27-7467-c6ad-1aca4c551432@acentic.com> References: <20180516104430.1191-1-henry.wilson@acentic.com> <20180530102613.1194-1-henry.wilson@acentic.com> <20180530130136.uaj7akyuyp44mg3c@quack2.suse.cz> <470ddceb-fa27-7467-c6ad-1aca4c551432@acentic.com> From: Amir Goldstein Date: Wed, 30 May 2018 18:40:27 +0300 Message-ID: Subject: Re: [PATCH v3 4.17] inotify: Add flag IN_EXCL_ADD for inotify_add_watch() To: Henry Wilson Cc: Jan Kara , linux-fsdevel Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, May 30, 2018 at 4:35 PM, Henry Wilson wrote: > On 30/05/18 14:01, Jan Kara wrote: >> >> Thanks. The patch looks good. I've added it to my tree. BTW, do you plan >> on >> working on a similar addition to fanotify? >> >> Honza >> > > Ah that's grand, I'm glad to have helped to improve things. > I'm not familiar with fanotify, however a quick look at fanotify_user.c > suggests that a similar approach may be taken by modifying: > > if(!fsn_mark) { > ... > } > else if (create) { > return -EEXIST; > } > > in both fanotify_add_vfsmount_mark() and fanotify_add_inode_mark() > I think that was a yes/no question and I interpret your answer as no?? Anyway, another yes/no question: Can you write a simple LTP test to verify the new API? I reccon Jan was also expecting an actual patch posted to man pages maintainer (and linux-api, which was not cc'ed on the latest patch). About the fanotify change, since fanotify API does have 'flags' separate from 'mask', I am not sure if FAN_MARK_EXCL_ADD would be the best flag name?? Perhaps FAN_MARK_CREATE? FAN_MARK_NEW? not sure. But also, I did not get a chance to comment about the chosen inotify flag name that the lexical proximity to IN_EXCL_UNLINK is a bit odd considering that _EXCL_ mean two completely different things. Should we maybe re-consider the chosen flag name? Maybe include linux-api in the discussion? Thanks, Amir.