Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp110434pxb; Fri, 15 Oct 2021 01:38:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYuC9kc9qmPW6A/8SpnWPwPK68+bQnE4dObEqNXoLAAC/jGR8EerYN/5MmRTlNWMNZFoS7 X-Received: by 2002:a17:907:9687:: with SMTP id hd7mr3907599ejc.535.1634287118834; Fri, 15 Oct 2021 01:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634287118; cv=none; d=google.com; s=arc-20160816; b=Arici8XrZj/EU6kO9C1PhrkvUQSbBzYCILaG1KvTx+1YkVaCe2Q0Ay7aoCNmVJb6ej ZfrZRiWCfKeoDl/CQykSP2lHnaFVAJEVoXBwm+QAjweiuE4LPJOsam3xAErq7PaZOFqD G0VyVGUDaTGFhQyoJUaZtK9noxPO6Mh1/6WKDXklzQlms19rvr57h9b15G5sYSloIye8 nkwUcBcf3nP4UiI9K6WF7x6mntmkyFnNR9tikLzvFpY+3e21EbrjtCdF2kc7QHg1RM+U HmiTvR/3A0ITiwv6BE2tCw5+8z1Jri6YAB/nvALs6+Dx8254pptukx6Hw1wQ7vsVRXfj HQ3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=O+hAqbWu2mfa+qe+Vt0ceTiplNgxQ0O07PtIOcUZqjc=; b=uU8B01CEV8Xr7wCTYTR6OtxzDSXo+UQWkF3qB+Jal+JuAa9z4rFuth1Gk8zDv9cKAy cZiRa1Up1t/fsBSVzAx8wKIbFKG5+2/GMPxc8XUzixls5cQP0KXjvE5k/6hoka0qXJzM 0kWUOHLyOUNxiqhbfj33KUy44LP+TnndcUg75eg4HUeWu+pxckSmTCYMz5NuOLChQbJQ B+4FvqfrUCw4UkNzkGUuUfzjPMxLAhSIDtQa73KIFe8IJFfTaXileW2nnkZgVcKNfR90 q2OWIm1zxfzR4tKt7IpnVSX2fLo1K9uJbZwzjMq+PZsCjarURDIEQxOmtItszmfVw3Qb cO9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nkieqHNu; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de1si6976341edb.375.2021.10.15.01.37.46; Fri, 15 Oct 2021 01:38:38 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nkieqHNu; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235849AbhJOHGT (ORCPT + 99 others); Fri, 15 Oct 2021 03:06:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231265AbhJOHGT (ORCPT ); Fri, 15 Oct 2021 03:06:19 -0400 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E62EDC061570; Fri, 15 Oct 2021 00:04:12 -0700 (PDT) Received: by mail-io1-xd2b.google.com with SMTP id y67so6610964iof.10; Fri, 15 Oct 2021 00:04:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=O+hAqbWu2mfa+qe+Vt0ceTiplNgxQ0O07PtIOcUZqjc=; b=nkieqHNuB9ycF4I91rX5y21L57X9eEZXB497pbVwMsmhIxmznd0TElDoC7KlJ9KbKC Mh8j1nhuf4q9yofTCpigMQUKHaWTvOO2iIJyTOnXbGeSjpKOb3L5o5ipC+kxE/dLJATY Rql1XidXx4UUrkMlJLtfOIqZ1KdYaEw3v0ElPjuKig+98OO+mOrEDwLzdXb9bxSzWGEF pe7degHcj70i8Nnj/E6BYf5WAPnccAnE7jz9BRZ3P6qNwDGn0iFpkKKrEOVI0KtNnSGk OOFlZKQtLgCZDYspNot0q4EGWc+Djio2u39iJD/n5ASR5SlEtA/jMMQuLKSaYlGy4+nx BKgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=O+hAqbWu2mfa+qe+Vt0ceTiplNgxQ0O07PtIOcUZqjc=; b=z9qXJB6eajRhHMUYEkR/GP1mUIXgwoxgYAl8TjImxSrWhW6Jay4bsVzz7Qojav3Tkh 9dYmhQTJ2vYu3ALNXH/sszgO3PnywG+tjVWiJ5Cm/xCTN31/O6iXhW177ghyutyu7Nil b8C8vXDjs3XSjuKnmVFPzynRrmzwvBKCrR0p5MJZCXW4NCQIu2VrIuPRilCSw3Uagibo KgCov8UMahKoNasAGWwRnUZLjWAZsLvDr95tdqULAGeUcRFarnQMVTLQETQV6kzEnYXS AGVV913JjfFk/C+7Yn+7rX0GqHiBaoSAl5mPyZHpGUg2tGhpQPc7sM8Z614h2T81cQvJ pAjw== X-Gm-Message-State: AOAM533tnFcgv9hSmuz8/zy0TvORVFCCMRHnBw+5VZowTlI9KPwV2ESh 8dhA6PO76U1+bcq8rT1TrLVdr384uQDpIkP6lJ4= X-Received: by 2002:a02:6987:: with SMTP id e129mr7299481jac.136.1634281452402; Fri, 15 Oct 2021 00:04:12 -0700 (PDT) MIME-Version: 1.0 References: <20211014213646.1139469-1-krisman@collabora.com> <20211014213646.1139469-21-krisman@collabora.com> In-Reply-To: <20211014213646.1139469-21-krisman@collabora.com> From: Amir Goldstein Date: Fri, 15 Oct 2021 10:04:01 +0300 Message-ID: Subject: Re: [PATCH v7 20/28] fanotify: Support enqueueing of error events To: Gabriel Krisman Bertazi Cc: Jan Kara , "Darrick J. Wong" , Theodore Tso , David Howells , Khazhismel Kumykov , linux-fsdevel , Ext4 , Linux API , Matthew Bobrowski , kernel@collabora.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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?? Thanks, Amir.