Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp395157pxt; Thu, 5 Aug 2021 02:19:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDH9G1npmCG55om084OMFRxzPfxGSQtXojUteUbgQKnIRhznui9oQUL3QzymSerjRdARVo X-Received: by 2002:a17:906:95ce:: with SMTP id n14mr3636212ejy.130.1628155186426; Thu, 05 Aug 2021 02:19:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628155186; cv=none; d=google.com; s=arc-20160816; b=MR9HanLnCO+9E5ZDd1yPDJzNVKokqdHxY7H7j53NInWI9LbYQsSpPkaK3eipTA1OUe rOU7XGC8FWvNq6LMxLll23LFG4b0lV+dbIWwfXqTPBHoqmrnj00b8XZqIwjuL13CQQFg XomgspmTMv/xshQbLj3AvCSpdiFngG4zhaC01rcQEup9j52vU9yIBCx4ItDtrnzV7HXY ZXtSh3a1IxK4EMgCUyxARwnTs34waxVZ5YDBTnzVIxe6zpIqsJ0Nu49BNMU3zzcqodd5 YW7FvkZR8IIZSEvmPkymaoeMA6YAfK2EeSa9VcIlx2iV2BxtVNkPlCHqnG9n0A6TP/GQ hlnw== 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=VsbR3HyVbmX6IZMHVltdbFbiWBsYjbRdgHwKp+iIhfQ=; b=KA7TPz+tCQwQ26ed4j5cRTodJ56tI+15fDHvnUSL6ObHpUmboXuqq7yVWA0yPBVVxF zezUoGobf0ELEKjpBWJTBxkF0UOy5uZRQ66/OPSMqryX/8Krrw8RSNlrQ32eXi+y9RKx PGAFWQL2tzl+056DxcuwQRGFUFMMQz01OELXWraKgzmoJ6Ffn+nUiq2F8x5PZVgEH7Jc TYC6B2/kT6asA0fDOPjaiCUYgFeWTB69Q13rFAY5MJKAbBDxFHsZeISJ88p9bQb2lOOz tvHfIu1NUZjnG8C/+Rzkltci9hFVc9EBRWAteSa22M+wQ2otIXK/eSP4iZRdNmigJb6W voyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="2C/qQ4Ya"; dkim=neutral (no key) header.i=@suse.cz header.b=3MGMyUyE; 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 ga3si2241125ejc.700.2021.08.05.02.19.22; Thu, 05 Aug 2021 02:19:46 -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="2C/qQ4Ya"; dkim=neutral (no key) header.i=@suse.cz header.b=3MGMyUyE; 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 S231310AbhHEJOX (ORCPT + 99 others); Thu, 5 Aug 2021 05:14:23 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:50922 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236120AbhHEJOX (ORCPT ); Thu, 5 Aug 2021 05:14:23 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 933481FE39; Thu, 5 Aug 2021 09:14:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1628154848; 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=VsbR3HyVbmX6IZMHVltdbFbiWBsYjbRdgHwKp+iIhfQ=; b=2C/qQ4YaE+e556sIlIV4g8jFb2rKAfBbwZmxVBW+FHF9LtkBC4ETy9OvyGSQ5tjt5efsVs M5eWu8oxJ6c9Ha046EOksppD6YRGETW2sAJJGDpl1xf7tLMZn6/LtNpqJ4BWvitkltmryP 9D7wKXPubkUTBvXFQbmmHubcAB9u8Lo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1628154848; 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=VsbR3HyVbmX6IZMHVltdbFbiWBsYjbRdgHwKp+iIhfQ=; b=3MGMyUyEgUSAC+PIshpLX1vMPOlrMC9ZKenDTCu4mfbEaUuZ2ZQ/oXOzFD86i7p2q7RE2n 9BabRlJRn9q9obBA== Received: from quack2.suse.cz (unknown [10.163.43.118]) by relay2.suse.de (Postfix) with ESMTP id 643C9A3B92; Thu, 5 Aug 2021 09:14:08 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 96B021E1514; Thu, 5 Aug 2021 11:14:07 +0200 (CEST) Date: Thu, 5 Aug 2021 11:14:07 +0200 From: Jan Kara To: Gabriel Krisman Bertazi Cc: jack@suse.com, amir73il@gmail.com, djwong@kernel.org, tytso@mit.edu, david@fromorbit.com, dhowells@redhat.com, khazhy@google.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-api@vger.kernel.org, kernel@collabora.com Subject: Re: [PATCH v5 04/23] fsnotify: Reserve mark bits for backends Message-ID: <20210805091407.GB14483@quack2.suse.cz> References: <20210804160612.3575505-1-krisman@collabora.com> <20210804160612.3575505-5-krisman@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210804160612.3575505-5-krisman@collabora.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed 04-08-21 12:05:53, 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 > --- > include/linux/fsnotify_backend.h | 19 ++++++++++++++++--- > 1 file changed, 16 insertions(+), 3 deletions(-) > > diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h > index 1ce66748a2d2..9d5586445c65 100644 > --- a/include/linux/fsnotify_backend.h > +++ b/include/linux/fsnotify_backend.h > @@ -363,6 +363,21 @@ struct fsnotify_mark_connector { > struct hlist_head list; > }; > > +#define FSNOTIFY_MARK_FLAG(flag) \ > +static const unsigned int FSNOTIFY_MARK_FLAG_##flag = \ > + (1 << FSN_MARK_FL_BIT_##flag) Static variable declaration in a header file makes me a bit uneasy. I know it is const so a compiler should optimize this to a constant but still there will likely be some side-effects (see the 0-day warning). Honestly, given these are just three flags I'd just don't overengineer this and have: #define FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY \ (1 << FSN_MARK_FL_BIT_IGNORED_SURV_MODIFY) ... Honza -- Jan Kara SUSE Labs, CR