Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp582467pxb; Fri, 13 Aug 2021 01:30:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+Bw+/N+LoigiZ/BCLFLdZmbwaQMz7rZo6JC71pc8IsJZ/CN27ywiB5ZvIqs5uzwoB1pzT X-Received: by 2002:a92:b111:: with SMTP id t17mr1037319ilh.208.1628843421584; Fri, 13 Aug 2021 01:30:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628843421; cv=none; d=google.com; s=arc-20160816; b=kmj4MMwUw1D3gCiLyZ6XyiMKE23ZpbcdXbCQ82RU8zXPjvaj6ARGbQEfBajAFm/mdC NNtQnEhfm7autgh8XNk5D0Js3LxIqUmGaqA6pXG1vOblmnygXFELfanTo435jky27EE7 QnNeIgcrh4NNRK7PC/f2vcyoPMptEwoZjwtszUXtyeFTEA5Z7yPlpjqI3e+Nhum51mWH ob1lbRWHcGvNc3Yq4RFfHzIjfQo4b0kM6gEDlUTbkRoL7ENpRIKbwsEYrsGLnPDEd3c/ VueBi1zWYG7D77LtsLeb22TTwp+yIxUDyu7yHYpv+F78QUkdTBLDQ1adriVL4Pr+EpY4 8NNw== 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=X2HpYlGIY7PCHonwpDYY+gio00UcnIrbODfp/COLs84=; b=oBLI3fouzMcyAwCGG89/d7KgJBkfFM36hKtA3ll9bpNO5SCHS0setpJID87z5jBq5r 6BId6y31ajvIYW4eTkO7/cAirjlC/CWGZS8mPsq6SLM2vLPLOcXx4i4KGKhH0RhQu/xc 2cEGiJE87rbyQT6Ibc5UW7J+c8zgCDOf8P7l4HQH11DUpEAMVetFlEPPcj4pEzDAtQv2 /oXIB1RI75eZRpuxvsuf1fRpxZm5RjwhB7Oitp8U9u+7kkTTMctv0KlP4LAe9xLhHbMw YjPWcyYg68NYTgWbbH2rLGN3QLq5ZsOCITmge8w99ZGwNd0nYW6+uNSfhFCImUonT+GA rNAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AA6ACM1n; 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 y8si1003821ior.35.2021.08.13.01.30.09; Fri, 13 Aug 2021 01:30:21 -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=20161025 header.b=AA6ACM1n; 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 S238741AbhHMIaH (ORCPT + 99 others); Fri, 13 Aug 2021 04:30:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238673AbhHMIaG (ORCPT ); Fri, 13 Aug 2021 04:30:06 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BC31C061756; Fri, 13 Aug 2021 01:29:40 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id r72so12213715iod.6; Fri, 13 Aug 2021 01:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X2HpYlGIY7PCHonwpDYY+gio00UcnIrbODfp/COLs84=; b=AA6ACM1n3bPUh86vKPUO+IuD1hLSUmYq6y3KQc6V4M/vspM5qEA0RLlXkc3NtaJCTu iahDri+UxWqEva0wH8yx/60/cKwNC39kjoQPMjQID8mGbxyNO6HrKs9PHefApyKDfHeL lKWjx0HFretDwVe3C3MC+kCRTIMCYkDXMPzrD2Noe8NpquXZ3NaYqEqN9ozOofgYCaeX 6jk0NTybPwR9SbVUAQzQwI1/jSyLn9xQ2L7N6CdTVc9pmHw/SILgWnCS+i9bB/DJr3Tt lpT5blL5Y7z/aSabgm57F5r+DuISI0Peq0R6d3kCbaOKIxBQpT53rEJu20Y5M1fkeTur H8wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X2HpYlGIY7PCHonwpDYY+gio00UcnIrbODfp/COLs84=; b=cNwwEbvETQziGwIb4Yg9WMEUtzcMoci6FNxQEFl/DgtShZT0LvhB4cB6KgyAfDdthI dRyH4YHafMorJIzTiKONLqvVfBwVSHp+vx7ViZ2xTGonptWTJK9qlwtCDLpQI+ShrgIc bheQTsLJ2a/0hBuRWE1dkXhmZoxs2mUMkGucHeMb6Uz/P+Fye4gDohhXvyMQk6OkU1lp 39/sAyaDnzKUGZt7B2ZJ5JsRq823kkyhQpLSRpx5/Nb/5Vudr+9cI2mcZdTbLg0ziWEX K7JmqwBC6/vh3dLH/A+JLJyz/XhyK9IKdXW3ZGG5ORUqwLSpREXEX90Cxi46cvLlItFT isvg== X-Gm-Message-State: AOAM533Nqe76lgcx58J4F2uKuuFzowN7DBQtClJSd5i/fo3ujSLrEK5d K3TGbKja0t3jPutfYU/X/XWXKBm1LBkjzYn4mZk= X-Received: by 2002:a02:958e:: with SMTP id b14mr1185696jai.123.1628843380077; Fri, 13 Aug 2021 01:29:40 -0700 (PDT) MIME-Version: 1.0 References: <20210812214010.3197279-1-krisman@collabora.com> <20210812214010.3197279-15-krisman@collabora.com> In-Reply-To: <20210812214010.3197279-15-krisman@collabora.com> From: Amir Goldstein Date: Fri, 13 Aug 2021 11:29:29 +0300 Message-ID: Subject: Re: [PATCH v6 14/21] fanotify: Reserve UAPI bits for FAN_FS_ERROR To: Gabriel Krisman Bertazi Cc: Jan Kara , Linux API , Ext4 , linux-fsdevel , Khazhismel Kumykov , David Howells , Dave Chinner , Theodore Tso , "Darrick J. Wong" , Matthew Bobrowski , kernel@collabora.com, Jan Kara Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Aug 13, 2021 at 12:41 AM Gabriel Krisman Bertazi wrote: > > 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. > > Reviewed-by: Jan Kara > Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Amir Goldstein > --- > 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 2b1ab031fbe5..ebb6c557cea1 100644 > --- a/fs/notify/fanotify/fanotify.c > +++ b/fs/notify/fanotify/fanotify.c > @@ -760,6 +760,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 >