Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp209364pxt; Wed, 4 Aug 2021 09:09:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxD8e2oIeLutdHSXPnHVImWoNsspSpDsjqaffhQMVafAY0byFK6PNJ43AYgG43zjd5SXiV+ X-Received: by 2002:aa7:c0d1:: with SMTP id j17mr547923edp.217.1628093393915; Wed, 04 Aug 2021 09:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628093393; cv=none; d=google.com; s=arc-20160816; b=j4A5O9U6EraefCs3lX1tkjYxhNy2CmGUAPxROvBwpv4MbfXjhLNZLUcBol0fVKuh29 QKsCCU4KWSRmzfxM4b9X5BWMrAvtASC2rTz+uA1Ba3CcvgBIJHn6PtAsp90GjItRi1l0 pLc/HmPbI4GUxikTntOx355ZP6FfZ+WYS1z2KPMLJfc6q0X0rbHpWQiCgEKoqOKzSFXE +QMbtF2wasUpBnRWh8D4khN4ACmy0XL8O+K/4GP8EcejS2WzA2mru2CXdpt86qn+fECy bVIBQ/NXkctdzwfAolDXo38O0f/YCSXz8gB2+OMtk5EKpiSqJ3AGwvVDKwaDZxnO+G4m 1sGQ== 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=/r1qdouuI/vN7umGAwrL9BS/z84u8ltksA7sru701E0=; b=hO05XZerb3KhSlzi4jAKNB9tU6tz2QaRtjJ0C0IkPwWcjOnwS9QyfiJAGxXRI9ZEq4 vL1pngSmvSDy1DOrzGRq66dzSCwcb6EXFB2Ov+CZ6bEJzrYve1fQ552Hk7jUl7STyl3s kG6oWNQkFm6SSLGachCpkDBfNvLujvYI3bl3WTE01RqsF0Zpj9v/ZGkXpvc7prZUyyyL t0PVUlA4Y13ayVVNymh/iNHc5rdsXN5YWl9GZ3mhUPSlt+3o/EQfhIEqNPHi/hOcptu0 wtVQTEk4tQ7nudQ+mSdaefvm30Vx6S5aaMmwmP0ZjN0ADmEJjFEBVdWUMb5OtOrYrSb3 9ZOw== 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 w13si2505854edv.589.2021.08.04.09.09.22; Wed, 04 Aug 2021 09:09:53 -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 S232851AbhHDQHw (ORCPT + 99 others); Wed, 4 Aug 2021 12:07:52 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:42082 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232614AbhHDQHw (ORCPT ); Wed, 4 Aug 2021 12:07:52 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 4FD221F4080F 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 16/23] fanotify: Reserve UAPI bits for FAN_FS_ERROR Date: Wed, 4 Aug 2021 12:06:05 -0400 Message-Id: <20210804160612.3575505-17-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 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. 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 456c60107d88..ca74199f11e2 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c @@ -733,6 +733,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