Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1952421pxb; Sun, 17 Oct 2021 01:49:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyt93OfdnJZDQMJ08tTaP3FPLfO2N/S7IIDpBRgiiZqQ26GXl2BHB+I1IhkR97jtWV68/+ X-Received: by 2002:a17:90a:5515:: with SMTP id b21mr25452050pji.239.1634460591663; Sun, 17 Oct 2021 01:49:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634460591; cv=none; d=google.com; s=arc-20160816; b=SSpWFpP7yCw1kkLuvehNmu5HPNxMFnLHTV4hy/nKKV15rKv+MLsmY7+l3FjndbytiP Lct49la9kAXgXgEacumM3+LPm60v31Zews8nQGHe58DmMG95TG0NY8DjZcFZNQ/Imkpo YgApF9VU6w6FbKqJlmjEAaeZGeQ65MNv8OBTxlkqadREIC+KvUBg9r4Hx+KJLAyfbqrV wL3oZZtVvGLhZuRv5yRemiH589uz/ZRjNIdiHYMvJfE9mDOhxtUjq0POp+vgigzYzaje NSNE0eCVb9Zr8rgXxSVDm9S48dDTh7uSa67H6aJoYVPJ9/33+/VsSpbbYAFcFWZ3CbBh u4lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:organization:subject:cc:to:from; bh=bQ3x0ZnVIrW1mtGaz6DVpHPDyFW+F5kww/MFfgvjJns=; b=Kn3uham3L8d5gz9AGz/zFC17xHyqax2DD9BDALavnUBjE2i648B9d3APmcC50S2DyF SLL6EO6t/e585yXkWzQfeYqaMNv9xy0u9iCBUcEoVgEpoyK4YcIZcdqB65gkCRrEQc4/ bbztp4DtmHJSIGWgAiMx/iJnsnWTZM99z5JGhJHPG79CaYghC5H62pcHVpqujrbhtGFR s2gK7H5CDoyWJszR5by6ovmBSHUrSq/Huk0Vrkp/iTP4OwZ4c2aMVxDGKmuNPXiRtYL1 05Ur5V5/ui2v0pfKC5q+EnXRMHsiGi/sbDYCCSSpxijNZVAv3gVJUvDTUTX5uhhS0N5A cvVQ== 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 o2si20333518pgu.4.2021.10.17.01.49.29; Sun, 17 Oct 2021 01:49:51 -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 S233352AbhJOQw5 (ORCPT + 99 others); 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-ext4@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