Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp5061630pxb; Thu, 14 Oct 2021 18:20:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygfD5hdfiG9U1MGPZHg44lRMQdOJixFH4gnV0jBucgtxirNyId/fhsYkTOekwJhrpKPRmc X-Received: by 2002:a17:902:8f8a:b0:13d:abff:19cf with SMTP id z10-20020a1709028f8a00b0013dabff19cfmr8226240plo.15.1634260808727; Thu, 14 Oct 2021 18:20:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634260808; cv=none; d=google.com; s=arc-20160816; b=h0pbAEwd7mb3bqdbhTplGoClarjOZRp9+QMsuAxOUekUzwYUzhW19Yb/oNOgX25IRO JWpqfbd0JBYF2u/39HBQuTKIclLVa+SRntODgZWqU+m10EcNpD85wpCR/H0cj4F0y3Hs LVPpO/pnZr4ql9oFeL++OLwFDuE1QhZl2tVc33r9VqPTPTInzbzFENK013qgzmYqONO3 Ye+3HCeZ6U07xQqHmbDMd5KKkDyM22klJUscy2B1e6usBGC0CNahS94OuwXc+34e6dPl Bv0QV04UCBJiXX5k/Vy8YwpucHBzp5RptgaaRhAGnSiucL31CehHZm4joGaqYYVOTBP4 SURQ== 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=U4Fm3WvC8OZhX2qBP0a/bYxhML0JSvse/G8m/nuc15s=; b=l1Tr3dpeFNeaEcilWd9en7DkNWCUnAA8sS/NT4DU0cqHG2aglcW3KalEXQQ9aEgb9D ayX8T997oTFuiicyxypuyG/0QMcXoRLaktSA3wpGEsT/0RfLgnR+PWLLFTN1zQIkrKws iceExS/peF++hz2RXuFUrjcgCcak8U2l4WyrDEumcYXRz/bmgUJD+Spo5gpHwLniVAAk t21Z4S9m5VyIgmHDCl0wnTaclx2wuBykzv2kDPQkgGKmaGwwInJY6dDKadMhjeP7zPNN qvHH+qHn/ti5y/hXOladzKNUvF3FrSPqnO9wD+hlFzfJEff8sl8YpHdplmxMw9H1U7IM +Ttg== 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 z10si7305955pfe.225.2021.10.14.18.19.55; Thu, 14 Oct 2021 18:20:08 -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 S233821AbhJNVlI (ORCPT + 99 others); Thu, 14 Oct 2021 17:41:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231956AbhJNVlI (ORCPT ); Thu, 14 Oct 2021 17:41:08 -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 BEAE1C061570; Thu, 14 Oct 2021 14:39:02 -0700 (PDT) Received: from localhost (unknown [IPv6:2804:14c:124:8a08::1007]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: krisman) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 2136F1F44F83; Thu, 14 Oct 2021 22:39:00 +0100 (BST) From: Gabriel Krisman Bertazi To: jack@suse.com, amir73il@gmail.com Cc: djwong@kernel.org, tytso@mit.edu, dhowells@redhat.com, khazhy@google.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-api@vger.kernel.org, repnop@google.com, Gabriel Krisman Bertazi , kernel@collabora.com, Jan Kara Subject: [PATCH v7 17/28] fanotify: Reserve UAPI bits for FAN_FS_ERROR Date: Thu, 14 Oct 2021 18:36:35 -0300 Message-Id: <20211014213646.1139469-18-krisman@collabora.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211014213646.1139469-1-krisman@collabora.com> References: <20211014213646.1139469-1-krisman@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org FAN_FS_ERROR allows reporting of event type FS_ERROR to userspace, which a mechanism to report file system wide problems via fanotify. This commit preallocate userspace visible bits to match the FS_ERROR event. Reviewed-by: Jan Kara Reviewed-by: Amir Goldstein Signed-off-by: Gabriel Krisman Bertazi --- fs/notify/fanotify/fanotify.c | 1 + include/uapi/linux/fanotify.h | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index c64d61b673ca..8f152445d75c 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c @@ -752,6 +752,7 @@ static int fanotify_handle_event(struct fsnotify_group *group, u32 mask, BUILD_BUG_ON(FAN_ONDIR != FS_ISDIR); BUILD_BUG_ON(FAN_OPEN_EXEC != FS_OPEN_EXEC); BUILD_BUG_ON(FAN_OPEN_EXEC_PERM != FS_OPEN_EXEC_PERM); + BUILD_BUG_ON(FAN_FS_ERROR != FS_ERROR); BUILD_BUG_ON(HWEIGHT32(ALL_FANOTIFY_EVENT_BITS) != 19); diff --git a/include/uapi/linux/fanotify.h b/include/uapi/linux/fanotify.h index 64553df9d735..2990731ddc8b 100644 --- a/include/uapi/linux/fanotify.h +++ b/include/uapi/linux/fanotify.h @@ -20,6 +20,7 @@ #define FAN_OPEN_EXEC 0x00001000 /* File was opened for exec */ #define FAN_Q_OVERFLOW 0x00004000 /* Event queued overflowed */ +#define FAN_FS_ERROR 0x00008000 /* Filesystem error */ #define FAN_OPEN_PERM 0x00010000 /* File open in perm check */ #define FAN_ACCESS_PERM 0x00020000 /* File accessed in perm check */ -- 2.33.0