Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp207602pxt; Wed, 4 Aug 2021 09:07:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxa3H7GZaYN+PV9a8b1Fa/ZcG5ClSo9VexxDmM54T4IpkoSbIRA3CKiGct7UX2K586vA/x5 X-Received: by 2002:a05:6e02:f93:: with SMTP id v19mr318623ilo.170.1628093266895; Wed, 04 Aug 2021 09:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628093266; cv=none; d=google.com; s=arc-20160816; b=y49JmVWb0Kqi9qFHy/NcN/BhI6snwf/aRcERZ3oAu2Avkiq4D/xq8IG75NXCtUwerx rmwvQCQQzOeK92Hx8XVWN+mcGSLrPXxAqpHQy26Na+BI+5T6kZy/1CtTNsiEnqwDoeH8 HCIP+m4zeC2S76mIWEEIo2VbimPX23AeEHFy89IXBfca2dcXudhqwyJiwX3UNsM8oAno iuTU7n2CWbHK+sIYrTqOFXU+9lODVj5NNIBWnY5ywNAfxt9ewDbv4iu7rieiYlFtll9x lwBePglEflA+zzIlQJlOKhvVuFvlAz2h2ubzPNRARYyhXDBdUB7zc3wm/GwBApAPM+SE KzsQ== 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=Y/W/gau38Q0gUxOo9fVVTD6aWQhas2DDVrPNEKu3rqU=; b=BweZjntJpc7jI96A/K7jT6B7dAQn7/obgOG179XmnybMHkD2svizfVpLx955gL5pSk VwuGmrz4NK88DBEk7Haw13KNTYNWEh85xLk5VfZayZe9FACjDMfgBM2XeQCb51QysWx9 EbeBLJpvehYlJadMQKPOM2BdZ8dpfc1Rn1KbMVRWCeoeejFxkrqU0wtt+O0RePOjKSK0 zf82NhuFYJ7TTjZuzSLGyFsTc5/37hNNGSzX6fqHDssm4hVe5IKrldWYN0Twixa9VSnh Q2PThU/uwH0L8CqY+bzr1XM3R/TD3Ix7IocsuzqTEY78/0IPv+jyY6oLRc5pNzT63cW5 db+g== 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 o15si2514746ilf.79.2021.08.04.09.07.30; Wed, 04 Aug 2021 09:07: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; 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 S231585AbhHDQHC (ORCPT + 99 others); Wed, 4 Aug 2021 12:07:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231515AbhHDQG4 (ORCPT ); Wed, 4 Aug 2021 12:06:56 -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 EB38FC0613D5; Wed, 4 Aug 2021 09:06:43 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 934F61F4080F From: Gabriel Krisman Bertazi To: jack@suse.com, amir73il@gmail.com Cc: 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, Gabriel Krisman Bertazi , kernel@collabora.com Subject: [PATCH v5 04/23] fsnotify: Reserve mark bits for backends Date: Wed, 4 Aug 2021 12:05:53 -0400 Message-Id: <20210804160612.3575505-5-krisman@collabora.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210804160612.3575505-1-krisman@collabora.com> References: <20210804160612.3575505-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 --- 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) + +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, +}; + +FSNOTIFY_MARK_FLAG(IGNORED_SURV_MODIFY); +FSNOTIFY_MARK_FLAG(ALIVE); +FSNOTIFY_MARK_FLAG(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 +413,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