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 1BFF8C433EF for ; Tue, 10 May 2022 01:12:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9FED36B0073; Mon, 9 May 2022 21:12:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9AE348D0002; Mon, 9 May 2022 21:12:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8768F8D0001; Mon, 9 May 2022 21:12:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 7AAB06B0073 for ; Mon, 9 May 2022 21:12:10 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 4EAFD21502 for ; Tue, 10 May 2022 01:12:10 +0000 (UTC) X-FDA: 79448057220.03.C1BBCAA Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by imf21.hostedemail.com (Postfix) with ESMTP id 90A261C00A4 for ; Tue, 10 May 2022 01:12:02 +0000 (UTC) Received: from dread.disaster.area (pa49-181-2-147.pa.nsw.optusnet.com.au [49.181.2.147]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 97FD910E642B; Tue, 10 May 2022 11:12:07 +1000 (AEST) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1noEQ1-00A6hb-TO; Tue, 10 May 2022 11:12:05 +1000 Date: Tue, 10 May 2022 11:12:05 +1000 From: Dave Chinner To: "Darrick J. Wong" 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: <20220510011205.GR1098723@dread.disaster.area> 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> <20220509234424.GX27195@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220509234424.GX27195@magnolia> X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=VuxAv86n c=1 sm=1 tr=0 ts=6279bbe8 a=ivVLWpVy4j68lT4lJFbQgw==:117 a=ivVLWpVy4j68lT4lJFbQgw==:17 a=kj9zAlcOel0A:10 a=oZkIemNP1mAA:10 a=7-415B0cAAAA:8 a=a8yGhtGJrI05I1NV0l8A:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 X-Rspamd-Queue-Id: 90A261C00A4 X-Stat-Signature: oa856kfi8ouskg43xegtxkczndtqotz9 X-Rspam-User: Authentication-Results: imf21.hostedemail.com; dkim=none; dmarc=none; spf=none (imf21.hostedemail.com: domain of david@fromorbit.com has no SPF policy when checking 211.29.132.249) smtp.mailfrom=david@fromorbit.com X-Rspamd-Server: rspam09 X-HE-Tag: 1652145122-922494 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, May 09, 2022 at 04:44:24PM -0700, Darrick J. Wong wrote: > 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? I already asked that question because I don't know the answer, either. I suspect the answer is "block dev inodes" but that then just raises the question of "how do we get them here?" and I don't know the answer to that, either. I don't have the time to dig into this and I don't expect anyone to just pop up with an answer, either. So in the mean time, we can just ignore it for the purpose of this patch set... Cheers, Dave. -- Dave Chinner david@fromorbit.com