From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79FDFC433EF for ; Fri, 15 Oct 2021 16:50:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 54B1B611ED for ; Fri, 15 Oct 2021 16:50:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235296AbhJOQw5 (ORCPT ); Fri, 15 Oct 2021 12:52:57 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:36438 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232013AbhJOQw4 (ORCPT ); Fri, 15 Oct 2021 12:52:56 -0400 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 D7FB91F45452; Fri, 15 Oct 2021 17:50:47 +0100 (BST) From: Gabriel Krisman Bertazi To: Amir Goldstein Cc: Jan Kara , "Darrick J. Wong" , Theodore Tso , David Howells , Khazhismel Kumykov , linux-fsdevel , Ext4 , Linux API , Matthew Bobrowski , kernel@collabora.com Subject: Re: [PATCH v7 20/28] fanotify: Support enqueueing of error events Organization: Collabora References: <20211014213646.1139469-1-krisman@collabora.com> <20211014213646.1139469-21-krisman@collabora.com> Date: Fri, 15 Oct 2021 13:50:41 -0300 In-Reply-To: (Amir Goldstein's message of "Fri, 15 Oct 2021 10:04:01 +0300") Message-ID: <87y26up6zi.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org Amir Goldstein writes: > On Fri, Oct 15, 2021 at 12:39 AM Gabriel Krisman Bertazi > wrote: >> >> Once an error event is triggered, collect the data from the fs error >> report and enqueue it in the notification group, similarly to what is >> done for other events. FAN_FS_ERROR is no longer handled specially, >> since the memory is now handled by a preallocated mempool. >> >> For now, make the event unhashed. A future patch implements merging for >> these kinds of events. >> >> Signed-off-by: Gabriel Krisman Bertazi >> --- >> fs/notify/fanotify/fanotify.c | 35 +++++++++++++++++++++++++++++++++++ >> fs/notify/fanotify/fanotify.h | 6 ++++++ >> 2 files changed, 41 insertions(+) >> >> diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c >> index 01d68dfc74aa..9b970359570a 100644 >> --- a/fs/notify/fanotify/fanotify.c >> +++ b/fs/notify/fanotify/fanotify.c >> @@ -574,6 +574,27 @@ static struct fanotify_event *fanotify_alloc_name_event(struct inode *id, >> return &fne->fae; >> } >> >> +static struct fanotify_event *fanotify_alloc_error_event( >> + struct fsnotify_group *group, >> + __kernel_fsid_t *fsid, >> + const void *data, int data_type) >> +{ >> + struct fs_error_report *report = >> + fsnotify_data_error_report(data, data_type); >> + struct fanotify_error_event *fee; >> + >> + if (WARN_ON(!report)) > > WARN_ON_ONCE please. > > Commit message claims to collect the data from the report, > but this commit does nothing with the report?? I moved it out to a separate commit and forgot to update the commit message. Fixed. Thanks! -- Gabriel Krisman Bertazi