Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp503973pxb; Mon, 25 Oct 2021 12:34:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxn/Ltk7BfZ163zFDQOUz/9Ku1L1vU1DvbfeTQWi4Es4Uwvaf0+9txdAQMgSLZUjacpIbre X-Received: by 2002:a63:15:: with SMTP id 21mr15242288pga.479.1635190477036; Mon, 25 Oct 2021 12:34:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635190477; cv=none; d=google.com; s=arc-20160816; b=M3rwmHyFnkHs4gVxHG6uOKjkMfHGbpy8149c5LAn+p94T0dk4oCPXfC6k//exjyL5q MoxaFFS2juSzgRSXol9bMbqZOcluWEcTTXOjPuGQDwsyWyo2szSm9jpM4xmpOx2mP/yc OY0W4YlQ1px+qZeO8OP8hbPUQoKRDsrVzGapNTQ72J7SBvOs7akuDYfMR11xdKtM/eu5 CtBBvuh3+OPb19ODzD9BxizRZsvYU+H2lhzHE2l//XfEmf7/pnA0KLrTcFllEYY5OVRF ViCyzVAM0XEjJN45Pb9XkiHz0lEM5Z2G6N3DaqhfS9cueG9u70tWouG4LHXEiU+Prv3f L4Jg== 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=HQamnNLnwQqsnl01znWnNQd9dUhvAsdyXTNBJlbB0BQ=; b=MDd8C1s8FxxKdVz/qRvY+43B1KARx/dqSrzPo/HYRk4v5TPnCCvWQdjcN/MgfSYU+j hNLwE401LCskKN5jNJxsMNcZowwxZSOOy242e83GO15T4hlexZhPywFFtuG5VHky+lM7 o+rk2E5hZBft4uDHJPcQnhQB7d4uM+/Z4M6pzx60+8fOCu01xuoS+Tq6CaGZ5VSOEatS puJsSXX4XAhgDKtlmX8R3iCZzo8i6cB0lrsK83gomcnQROaZbP2KFUtmomF+8Sgt3Mgi esFresG7ynLQ3IEC6W7KlOoXkGaW6o/Y0Gh9HsEjUqJAxldJ9tJpkPqAS6mM0pK+C3Jo DoQQ== 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 u17si23219139pgi.357.2021.10.25.12.34.22; Mon, 25 Oct 2021 12:34:37 -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 S235192AbhJYTff (ORCPT + 99 others); Mon, 25 Oct 2021 15:35:35 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:58640 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235636AbhJYTcf (ORCPT ); Mon, 25 Oct 2021 15:32:35 -0400 Received: from localhost (unknown [IPv6:2804:14c:124:8a08::1002]) (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 1E6141F433E1; Mon, 25 Oct 2021 20:29:54 +0100 (BST) From: Gabriel Krisman Bertazi To: amir73il@gmail.com, jack@suse.com Cc: djwong@kernel.org, tytso@mit.edu, david@fromorbit.com, dhowells@redhat.com, khazhy@google.com, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-ext4@vger.kernel.org, Gabriel Krisman Bertazi , kernel@collabora.com, Jan Kara Subject: [PATCH v9 18/31] fanotify: Reserve UAPI bits for FAN_FS_ERROR Date: Mon, 25 Oct 2021 16:27:33 -0300 Message-Id: <20211025192746.66445-19-krisman@collabora.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211025192746.66445-1-krisman@collabora.com> References: <20211025192746.66445-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 is 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