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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF5B6C433EF for ; Thu, 2 Jun 2022 09:06:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5E6F56B0072; Thu, 2 Jun 2022 05:06:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 592AF6B0073; Thu, 2 Jun 2022 05:06:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4809D6B0074; Thu, 2 Jun 2022 05:06:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 3B9336B0072 for ; Thu, 2 Jun 2022 05:06:08 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 0D2D0BD7 for ; Thu, 2 Jun 2022 09:06:08 +0000 (UTC) X-FDA: 79532714016.06.DD84215 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf07.hostedemail.com (Postfix) with ESMTP id 9A6254004F for ; Thu, 2 Jun 2022 09:05:54 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 3A71E1F896; Thu, 2 Jun 2022 09:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1654160766; 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=l44OiN4vGsVRHdHSJpLd57m3bWaWVKtWFbpqAF/m3Hw=; b=IxO/2d65WpbLfgT9ufhIODXn8IDb6XexQj96IdG/+xe9xZAFOlthz5ydM4D+gQdqv/wOLi yzDHydgAaJS3rjmE8DT14HsvXDc6bqyn+mlgB2E4Lvhfu0VSP/r54sL9BO0k21py9kUaol FKQNgrx5UlOGtc9I74/dNfmWy6B8B8k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1654160766; 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=l44OiN4vGsVRHdHSJpLd57m3bWaWVKtWFbpqAF/m3Hw=; b=rL7AE+O3o++6U8Y/ThRpbtwrlDsJCIUE0IVzvjk0Dr079n9JfocAZbdYO1tOjO1VnlxrXs L2W4QubcBnbv+ADQ== Received: from quack3.suse.cz (unknown [10.100.224.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 2744A2C141; Thu, 2 Jun 2022 09:06:06 +0000 (UTC) Received: by quack3.suse.cz (Postfix, from userid 1000) id C23B8A0633; Thu, 2 Jun 2022 11:06:05 +0200 (CEST) Date: Thu, 2 Jun 2022 11:06:05 +0200 From: Jan Kara To: Stefan Roesch Cc: io-uring@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, david@fromorbit.com, jack@suse.cz, hch@infradead.org, axboe@kernel.dk, Christoph Hellwig Subject: Re: [PATCH v7 10/15] fs: Add async write file modification handling. Message-ID: <20220602090605.ulwxr4edbrsgdxtl@quack3.lan> References: <20220601210141.3773402-1-shr@fb.com> <20220601210141.3773402-11-shr@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220601210141.3773402-11-shr@fb.com> X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 9A6254004F X-Stat-Signature: pkq6f1tjmucfdxir8z1er6dqkuehhec4 X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b="IxO/2d65"; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=rL7AE+O3; spf=pass (imf07.hostedemail.com: domain of jack@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=jack@suse.cz; dmarc=none X-HE-Tag: 1654160754-962096 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed 01-06-22 14:01:36, Stefan Roesch wrote: > This adds a file_modified_async() function to return -EAGAIN if the > request either requires to remove privileges or needs to update the file > modification time. This is required for async buffered writes, so the > request gets handled in the io worker of io-uring. > > Signed-off-by: Stefan Roesch > Reviewed-by: Christoph Hellwig I've found one small bug here: > diff --git a/fs/inode.c b/fs/inode.c > index c44573a32c6a..4503bed063e7 100644 > --- a/fs/inode.c > +++ b/fs/inode.c ... > -int file_modified(struct file *file) > +static int file_modified_flags(struct file *file, int flags) > { > int ret; > struct inode *inode = file_inode(file); We need to use 'flags' for __file_remove_privs_flags() call in this patch. Honza -- Jan Kara SUSE Labs, CR