Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp505356pxb; Fri, 15 Oct 2021 09:54:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwX3YVjCUxbflq+9/eCEZLJnReGog6txDP5VTSNlPFLVddXVUGauzhL06KJPPkHSo/3AEby X-Received: by 2002:a17:90b:251:: with SMTP id fz17mr28713221pjb.52.1634316861120; Fri, 15 Oct 2021 09:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634316861; cv=none; d=google.com; s=arc-20160816; b=s8aicHigeEzSrEo+Ky9yDqY5MLzTWDmSpuCKQX99qbd7YSySGzXon3mtYKB2T7DsOU NbOkuootSMQcZxcH7Y66LiU6QL77Q2sdff7tnhMPXbLVJkaigNOB48u7faPdlWKMOkzZ /QBvhDGQNP53OJFPAc2CG2pxfZf59k7BjQfRxPuN99UcRv0Q/wKLIQR3A87mqUzs2v+5 9bpjHZTdz5NFxk5X9Bx+p88rAff+7KrRCzI4TONKBfK80lfPZPaUFNrWgG3SGwIcrVed EBkJCyEnj4Ow3tuHFvgwpy1Xg7qpAKRMzbJbuwI+frjWK/PtTCuUf6BUnoHgY+9KK4Os 9ZGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=onDSwvGTB3TgysESEKqklGfD/ED0jggHJ/HrNAw4tuc=; b=SN+K5rD8fMGa5Yd8rhnJbA90mEVCYjVRU8ZFsvj38CE6pxccgXpGETMYWsikHmV3Md 6HFp+5k3fNSQ4Mvc+H0ogZdAegUx+eNwxvzG9wvIYsSV96brZ3UZ7XgIyrj6Xk0nrG2v cs/2rj6d/8f1i8+d3Kw0cCc3cEpQV+kqp8zjpJKc7QJHOM1fviKmWaM6sb+Uo+1H+Gg6 Drvld203ZJwq5gE3pb0eXGXAyAJEOlfnKi23r2JWk0Q7NK8KH+gqlf7BNymZC09R0zcU 7L0w4fOI5nYT0vkGHso2dVeATYRugvDI1Lk6uLMYPUep3xEnLQpYV+OuT5gahwzV8e9S mDrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=FTqikspD; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=mPfxxGjs; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q8si12097535plh.294.2021.10.15.09.54.02; Fri, 15 Oct 2021 09:54: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=@suse.cz header.s=susede2_rsa header.b=FTqikspD; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=mPfxxGjs; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236690AbhJOJjI (ORCPT + 99 others); Fri, 15 Oct 2021 05:39:08 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:49824 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237498AbhJOJjI (ORCPT ); Fri, 15 Oct 2021 05:39:08 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id C240721969; Fri, 15 Oct 2021 09:37:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1634290620; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=onDSwvGTB3TgysESEKqklGfD/ED0jggHJ/HrNAw4tuc=; b=FTqikspDerWEMsrzlrHlwQ6G9n2HJe0T2MJBHuPrv32HHiDPMEKWSUP7Asge4kX694j3aJ 77PG5ggmaPQmbNVjI3OymoDoeICY4FuLYKQvMsx3rxJIyuGY/QinXIl2aEhsWt+R4sFkOT NFSszVquYOy+5bsxCcZIfgW6NNyf84A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1634290620; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=onDSwvGTB3TgysESEKqklGfD/ED0jggHJ/HrNAw4tuc=; b=mPfxxGjs+sYmlpJauaDnSFa+u7lSxEzQZRtA55szraSjABTJ8OTpONroz2QtT2Nct8npE1 iNyTa7bXXdLDNwDg== Received: from quack2.suse.cz (unknown [10.100.200.198]) by relay2.suse.de (Postfix) with ESMTP id ADDC4A3B87; Fri, 15 Oct 2021 09:37:00 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 92F341E0A40; Fri, 15 Oct 2021 11:37:00 +0200 (CEST) Date: Fri, 15 Oct 2021 11:37:00 +0200 From: Jan Kara To: Gabriel Krisman Bertazi Cc: jack@suse.com, amir73il@gmail.com, djwong@kernel.org, tytso@mit.edu, dhowells@redhat.com, khazhy@google.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-api@vger.kernel.org, repnop@google.com, kernel@collabora.com, Jan Kara Subject: Re: [PATCH v7 17/28] fanotify: Reserve UAPI bits for FAN_FS_ERROR Message-ID: <20211015093700.GH23102@quack2.suse.cz> References: <20211014213646.1139469-1-krisman@collabora.com> <20211014213646.1139469-18-krisman@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211014213646.1139469-18-krisman@collabora.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu 14-10-21 18:36:35, Gabriel Krisman Bertazi wrote: > FAN_FS_ERROR allows reporting of event type FS_ERROR to userspace, which ^^ missing '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 > -- Jan Kara SUSE Labs, CR