Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp322631pxb; Mon, 16 Aug 2021 06:18:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMLe5rX6Z2RXiumJoGJclQmP5T12CKr4mv3jWMySoiJdK7gBBLKOokHL9uC14GCShttYfN X-Received: by 2002:aa7:d147:: with SMTP id r7mr20066558edo.148.1629119905114; Mon, 16 Aug 2021 06:18:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629119905; cv=none; d=google.com; s=arc-20160816; b=zHTeDfd5qwlBoLOMiDp4AvzgJadAACScCFxIoLcdmt/AGfjhFrAWNdBMNcoWepsmyX R5SDl9ctiHgtQDB8EJU/j11xwD6l1PmYAEL97EVHvCB+m6/4bp/rB+Dr1uuGyI47C6U3 Liem1ukyQxd8igGra8fn0Svy0ji1GOAWfruOM6t+g6+rXqiClFRrVRp1mIZPmd0eUJZ4 wlN3JcOTrlXAxnCuJcgqj+eQLy1n9AYjcHFbh2WYeTSBA9WgikkFxxXXX5HCKq8e/flv wDtEyHW06c3Sy/fgHXkcwREFUhztKIWqIMX93H9HaLI93oEd9kV1UGlC9fQBYTLoKDAm l+kA== 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=kFqrL9tlo3vHH2OdCMbi/CRA3pJJfS/41yIA8FjXzf0=; b=ZeraqWNGENIjyKP5vM6D/4W3VOjJbVNJU8lwasacVUpIR6mSxaYKspatVfeiU0Mqkh Cc7QE59D1p1eUETuk74qVeBpJESbyJSfo2Z7hYzbABhBW/b6Yy3Z89obl44sTW+Yc0+I 3H6DNdL6qvbBNiF6A6m4FpsBuyp/Hvwo2rlCRIqXPC3TEMsY5QhGcfT5g2QbxR4P+W9p Hhw/Gu4YS8LrTJJhrlMA0V58bNfY1uXZG5NRkH9BMefSiuz3+hZ36ESeAOK2PGaTKTrL HBTjavHUpBuXLufnI3jac4/uT7ifjPLP6qneRWFhLFP5KiYxtfDi9iuN/sBcWwG22Az9 tDMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="Y+/b46UO"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=K9F1H0gi; 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 dn18si9999139edb.220.2021.08.16.06.17.56; Mon, 16 Aug 2021 06:18:25 -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="Y+/b46UO"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=K9F1H0gi; 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 S238669AbhHPNSN (ORCPT + 99 others); Mon, 16 Aug 2021 09:18:13 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:45690 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237173AbhHPNQJ (ORCPT ); Mon, 16 Aug 2021 09:16:09 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 1FD131FE5F; Mon, 16 Aug 2021 13:15:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1629119737; 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=kFqrL9tlo3vHH2OdCMbi/CRA3pJJfS/41yIA8FjXzf0=; b=Y+/b46UOpoHG8J+Den7D1I/U91wSOlxhsn4uivMO+Um52pZb4o1wu3i9pSHbwFY003kxJK kPOLDVKsavKS3HPLJIvRjNoc6/OBKQliGpPOfuNPqY/GvYA0yB3R9ZwQdyfqtPYTk3sv0O 3jDtlS6KKuQ/rW8m8bCC1m04jU6inNQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1629119737; 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=kFqrL9tlo3vHH2OdCMbi/CRA3pJJfS/41yIA8FjXzf0=; b=K9F1H0giDC5X/udipaLGIVqN+I2jMVsptFImKLYPW//ApiZGVPXmfixcCOcXe7vKoEHmgT szNwcQFVyAmS1lBw== Received: from quack2.suse.cz (unknown [10.100.224.230]) by relay2.suse.de (Postfix) with ESMTP id 058AEA3B8F; Mon, 16 Aug 2021 13:15:37 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id E21741E0426; Mon, 16 Aug 2021 15:15:36 +0200 (CEST) Date: Mon, 16 Aug 2021 15:15:36 +0200 From: Jan Kara To: Amir Goldstein Cc: Gabriel Krisman Bertazi , Jan Kara , Linux API , Ext4 , linux-fsdevel , Khazhismel Kumykov , David Howells , Dave Chinner , Theodore Tso , "Darrick J. Wong" , Matthew Bobrowski , kernel@collabora.com Subject: Re: [PATCH v6 04/21] fsnotify: Reserve mark flag bits for backends Message-ID: <20210816131536.GB30215@quack2.suse.cz> References: <20210812214010.3197279-1-krisman@collabora.com> <20210812214010.3197279-5-krisman@collabora.com> 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 Fri 13-08-21 10:28:27, Amir Goldstein wrote: > On Fri, Aug 13, 2021 at 12:40 AM Gabriel Krisman Bertazi > wrote: > > > > Split out the final bits of struct fsnotify_mark->flags for use by a > > backend. > > > > Signed-off-by: Gabriel Krisman Bertazi > > > > Changes since v1: > > - turn consts into defines (jan) > > --- > > include/linux/fsnotify_backend.h | 18 +++++++++++++++--- > > 1 file changed, 15 insertions(+), 3 deletions(-) > > > > diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h > > index 1ce66748a2d2..ae1bd9f06808 100644 > > --- a/include/linux/fsnotify_backend.h > > +++ b/include/linux/fsnotify_backend.h > > @@ -363,6 +363,20 @@ struct fsnotify_mark_connector { > > struct hlist_head list; > > }; > > > > +enum fsnotify_mark_bits { > > + FSN_MARK_FL_BIT_IGNORED_SURV_MODIFY, > > + FSN_MARK_FL_BIT_ALIVE, > > + FSN_MARK_FL_BIT_ATTACHED, > > + FSN_MARK_PRIVATE_FLAGS, > > +}; > > + > > +#define FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY \ > > + (1 << FSN_MARK_FL_BIT_IGNORED_SURV_MODIFY) > > +#define FSNOTIFY_MARK_FLAG_ALIVE \ > > + (1 << FSN_MARK_FL_BIT_ALIVE) > > +#define FSNOTIFY_MARK_FLAG_ATTACHED \ > > + (1 << FSN_MARK_FL_BIT_ATTACHED) > > + > > /* > > * A mark is simply an object attached to an in core inode which allows an > > * fsnotify listener to indicate they are either no longer interested in events > > @@ -398,9 +412,7 @@ struct fsnotify_mark { > > struct fsnotify_mark_connector *connector; > > /* Events types to ignore [mark->lock, group->mark_mutex] */ > > __u32 ignored_mask; > > -#define FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY 0x01 > > -#define FSNOTIFY_MARK_FLAG_ALIVE 0x02 > > -#define FSNOTIFY_MARK_FLAG_ATTACHED 0x04 > > + /* Upper bits [31:PRIVATE_FLAGS] are reserved for backend usage */ > > I don't understand what [31:PRIVATE_FLAGS] means I think it should be [FSN_MARK_PRIVATE_FLAGS:31] (identifying a range of bits). I'd maybe write just "Bits starting from FSN_MARK_PRIVATE_FLAGS are reserved for backend usage". With this fixed feel free to add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR