Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp259914pxb; Thu, 12 Aug 2021 15:58:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSXggX7MhdYpC0PzhGOxZVmR9MspdEMRiGYu/XkC1W8LJTUaerj4RlRsqPFJH/5WnZNrJn X-Received: by 2002:a5e:cb09:: with SMTP id p9mr4642412iom.180.1628809086355; Thu, 12 Aug 2021 15:58:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628809086; cv=none; d=google.com; s=arc-20160816; b=RRhqNO1CWk1SJsGm+2KT79g7zUahZP0OpXaAMv4r1I+XBZbs4hjzxf7jh7CIGK27IN pT2NUAt/iYjlIOGJFyB0ULDApLutIrkov4rKAd0wl5SyCtpdejWusqIGAf6RLXa0IYgL a8pR6TKCO/ks8u+g+K1d+d0cMT7lnZVWF7bzQ9nB8jeB9zkjld8qtodcDVY21dVSpZLh 8butVan4nU2POzagn/dgdrvk/aMv8f9rgo8GoRcMP0MBXfC4GNB5+4+E2UzmpyEMLTH5 MvrSIeRV0JRIEiw40dAVJhPZ3x8T8n+6n96Dq2ucAsSixuk5KmFPzSxrNGOrYaLcEA37 YDDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=qSuChK0uNl3mbYNMcLTpJxBSEMM/rFbpFB5RK3BfDWY=; b=iW9bF502RVoD+Jm6JYg/hlf/a1SN1xycLPVgv39Op2xbMAKD/iIiESZ6oqgXJWES4K BD4Yk3vELvzz9MjJ9Gc9t8gcVOcT7y7YB+Uyk5W3zNPZRK4/5tg3JM1ov6pg+sPJfDub QNAFw/4xeVhbO5SRHfOVq4owusZFNBX+GQLJnDz6YBWmi8JjcwobgAp14uq+XlhLsMyO ludtRnZYPafmx0r+PqkAUU3JUix/GCz0MDJ0IsvZrWhWACnYk4JblWfmIoSPPlQHW9+d p2a/Emzy5rR5VDW7DafZqt+y5B8tWp2oW2Ba+B/LDQzbMQauaS0NCZBtnICvO9NYfrSR YIwQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a5si4149938ioo.37.2021.08.12.15.57.54; Thu, 12 Aug 2021 15:58:06 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237496AbhHLVlJ (ORCPT + 99 others); Thu, 12 Aug 2021 17:41:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237478AbhHLVlJ (ORCPT ); Thu, 12 Aug 2021 17:41:09 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0D30C061756; Thu, 12 Aug 2021 14:40:43 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 640FD1F4443C From: Gabriel Krisman Bertazi To: amir73il@gmail.com, jack@suse.com Cc: linux-api@vger.kernel.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, khazhy@google.com, dhowells@redhat.com, david@fromorbit.com, tytso@mit.edu, djwong@kernel.org, repnop@google.com, Gabriel Krisman Bertazi , kernel@collabora.com Subject: [PATCH v6 04/21] fsnotify: Reserve mark flag bits for backends Date: Thu, 12 Aug 2021 17:39:53 -0400 Message-Id: <20210812214010.3197279-5-krisman@collabora.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210812214010.3197279-1-krisman@collabora.com> References: <20210812214010.3197279-1-krisman@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 */ unsigned int flags; /* flags [mark->lock] */ }; -- 2.32.0