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 3C65CC433EF for ; Mon, 9 May 2022 23:44:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5F6116B0072; Mon, 9 May 2022 19:44:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A3E56B0073; Mon, 9 May 2022 19:44:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 46BA96B0074; Mon, 9 May 2022 19:44:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 36CAC6B0072 for ; Mon, 9 May 2022 19:44:30 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 080013061E for ; Mon, 9 May 2022 23:44:27 +0000 (UTC) X-FDA: 79447836174.07.9EAEE0C Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf30.hostedemail.com (Postfix) with ESMTP id 866D8800A5 for ; Mon, 9 May 2022 23:44:09 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7FFC5612F4; Mon, 9 May 2022 23:44:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC0F2C385C2; Mon, 9 May 2022 23:44:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652139864; bh=HMCkkZVPva2XKldmuw596NTy01fyYAKF6NRBK0XvqEM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DNmOuSwyIWAZL5cg9HhCl+E97Nqe7qUZvtFLE/kLdtYq99hJ6MLc/VzxL49ib0FE1 4khVVFRKwzzvYWwbxAvUzORdKlOnroxiJJ6Ex/XkMneNoUAo3SCaC2Z7zVXpjvoCNv KteA5jpx6g2bMM9r2OGD5JWjM5u7oOsdEj6i2gt/Ks1sKLim6UybBGygI609M4fr9M c5pILAL6iut1loltPFAg8uU3PPYK0BeLjWq3hhVz6r0a5HR809zzH3RWMOB/G5ljyY blfpd9TE+RJXvX7fMJOtqo2UM8VRJwOaNdtjbdr0WF4UXf53JeAohoJPKfYCET/XMK POXcJHquQNOug== Date: Mon, 9 May 2022 16:44:24 -0700 From: "Darrick J. Wong" To: Dave Chinner Cc: Stefan Roesch , io-uring@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [RFC PATCH v1 11/18] xfs: add async buffered write support Message-ID: <20220509234424.GX27195@magnolia> References: <20220426174335.4004987-1-shr@fb.com> <20220426174335.4004987-12-shr@fb.com> <20220426225652.GS1544202@dread.disaster.area> <30f2920c-5262-7cb0-05b5-6e84a76162a7@fb.com> <20220428215442.GW1098723@dread.disaster.area> <19d411e5-fe1f-a3f8-36e0-87284a1c02f3@fb.com> <20220506092915.GI1098723@dread.disaster.area> <31f09969-2277-6692-b204-f884dc65348f@fb.com> <20220509232425.GQ1098723@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220509232425.GQ1098723@dread.disaster.area> X-Rspamd-Queue-Id: 866D8800A5 X-Stat-Signature: j15hibqrup6t5bfr5fenefu8wmgqbz5w Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=DNmOuSwy; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf30.hostedemail.com: domain of djwong@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=djwong@kernel.org X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1652139849-930391 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 Tue, May 10, 2022 at 09:24:25AM +1000, Dave Chinner wrote: > On Mon, May 09, 2022 at 12:32:59PM -0700, Stefan Roesch wrote: > > On 5/6/22 2:29 AM, Dave Chinner wrote: > > > On Mon, May 02, 2022 at 02:21:17PM -0700, Stefan Roesch wrote: > > >> On 4/28/22 2:54 PM, Dave Chinner wrote: > > >>> On Thu, Apr 28, 2022 at 12:58:59PM -0700, Stefan Roesch wrote: > > >> - replace the pointer to iocb with pointer to xfs_inode in the function xfs_ilock_iocb() > > >> and also pass in the flags value as a parameter. > > >> or > > >> - create function xfs_ilock_inode(), which xfs_ilock_iocb() calls. The existing > > >> calls will not need to change, only the xfs_ilock in xfs_file_buffered_write() > > >> will use xfs_ilock_inode(). > > > > > > You're making this way more complex than it needs to be. As I said: > > > > > >>> Regardless, if this is a problem, then just pass the XFS inode to > > >>> xfs_ilock_iocb() and this is a moot point. > > > > > > > The function xfs_ilock_iocb() is expecting a pointer to the data structure kiocb, not > > a pointer to xfs_inode. I don't see how that's possible without changing the signature > > of xfs_ilock_iocb(). > > For the *third time*: pass the xfs_inode to xfs_ilock_iocb() and > update all the callers to do the same thing. I still don't understand why /any/ of this is necessary. When does iocb->ki_filp->f_inode != iocb->ki_filp->f_mapping->host? --D > -Dave. > -- > Dave Chinner > david@fromorbit.com