Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp264041pxb; Thu, 12 Aug 2021 16:03:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0r26ZzREJnevnIeJpMBEKYqSEIhgK7mo7XSiGqay9W0zqYU/EWvYnXTQ5VVoOE8iPrunG X-Received: by 2002:a05:6638:303:: with SMTP id w3mr5811611jap.79.1628809436047; Thu, 12 Aug 2021 16:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628809436; cv=none; d=google.com; s=arc-20160816; b=clQGr7TcpLGjd53z1Zzem5ncNuUKfr6DUWeT1oAd5j7SxRIskECwYfRuTAFyMwRrjv r5mKiqlPJLsd3lS+sF2OOlYrwh9PIFr9RDPBoawYXcgRprP96vVW+oXr8+rTe0DoDn10 srf7zZFfoReXSA/+ulIYWpKtE9fskYwwS6vco3zP33PRGZ9w+NtPZGWrI1ozVplJW5zW 2uWyrY72Kt6HCABeovoenk4MLqEnwiYfcbEzJOMe+VGGxS6lIe4iPubW/o+uO8EhrcUH BbHm9PNykwIa03ffcGjReMaX8bIn2cBzLIIBQlC6U7iIQkIW7HF+gK4FB2vZNkhRi1YA YJKg== 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=9iInLW844AHF3t+MwDe/ffpwOzYony+scHXZlS4iM20=; b=UWCGfh+sBqZpf3oGxTWUKCPXrxwme6IFvsYwro4zeS8txj3J7Od04WdWol+u9JNgdo aEpwpVGuaiGuqyqCvssv8JZ/irJZLmWpgiNU+HFhBUs0V2OtlBJufVwF5MP+SBYZYqtr 51M00ow35BAfsiXQdvTNpJf7z5wBN1HeZ9VukIfk4Z1N1x1I88JGEN1anBxx+cnKRL29 CHpoiSAIICoGkxzdC0DiIZyXdp809hSCNZD8SoOQB1SmDKN0gfJCkBkMIo+sSls3WY20 thuCe8ZOEldLLJHgKv0PXRzoRjHmsbO8m22IB0dIFFV+7mmTmh37CM9wnfFzE2q3PDHU C2Tg== 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.16.03.43; Thu, 12 Aug 2021 16:03:56 -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 S237936AbhHLVlt (ORCPT + 99 others); Thu, 12 Aug 2021 17:41:49 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:45860 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229883AbhHLVlt (ORCPT ); Thu, 12 Aug 2021 17:41:49 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 45AF81F41890 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, Jan Kara Subject: [PATCH v6 14/21] fanotify: Reserve UAPI bits for FAN_FS_ERROR Date: Thu, 12 Aug 2021 17:40:03 -0400 Message-Id: <20210812214010.3197279-15-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 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 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 2b1ab031fbe5..ebb6c557cea1 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c @@ -760,6 +760,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 fbf9c5c7dd59..16402037fc7a 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.32.0