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 927C0C43217 for ; Wed, 16 Nov 2022 00:57:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DFBA76B0071; Tue, 15 Nov 2022 19:57:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D854E6B0072; Tue, 15 Nov 2022 19:57:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C25BA8E0001; Tue, 15 Nov 2022 19:57:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id AFAB96B0071 for ; Tue, 15 Nov 2022 19:57:29 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 7F1D91C5BF3 for ; Wed, 16 Nov 2022 00:57:29 +0000 (UTC) X-FDA: 80137492218.21.6E0CACD Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by imf06.hostedemail.com (Postfix) with ESMTP id 20481180004 for ; Wed, 16 Nov 2022 00:57:27 +0000 (UTC) Received: by mail-pj1-f50.google.com with SMTP id k5so15101722pjo.5 for ; Tue, 15 Nov 2022 16:57:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=H06oQQHBFOJW8pw2jS0c6jV1S5y28zjyrixRsNPgW0Q=; b=HI4ITdJnZ1QlzhiDZG8cev0p44OiRsy1fMHTso+5bebi+FCE8U4VBFNDdaAUQkVfC/ 72QHcWTkqCGjkA9G3rbLE7hHZrEJaHcbSse+bRCWixhyVlCxfViu+6/jWce51S3OjSYT loNiWTjnX+Bqdvj3IaTI1ISTyeF1kugMkrTn3Iw9RGlf1N6PRjddQ083749FV0T6F8tg lGPDyHYkzVxsx/OamFSPMvfA20NYHyUpJo3SUjX9Rjpj4x96ldWLcZ8usTW+mIK2nGUw QIketR4+dfspx6nqlgTjSTcQmmC2i3yV2o/kE7py/sUsJ2YsiPZiELLjh1eVrpKA1S1h MPPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=H06oQQHBFOJW8pw2jS0c6jV1S5y28zjyrixRsNPgW0Q=; b=NKpPmQe1pvjnN8zldKPpOgEpAKYdC0pJ/f2mOmrmeXgvloYnsw0fU/AvOpPHeAFPHt tGUtSyQJzfT/sR8Fv+x6Wvt9N2CGgEpgsqyfFPP1Sc0M/EMN8gyFT717HR3jx5D0k5iY wRPK42G4CJj/vWumIqgeFCy/dB3a7dW28bJkECkecq9BiiwKRcGwPPEGayM1bXlaPuIC S/QDfEKYmcAPyo7E94/RAZCgV+f7xpO4891CCtyJBZz1UEc8acK3OxvC1qfSORicaswk jATk85faCWingIX3aSHdt8wugOt/mja+r1UptgfdlKcKmRvwsMgZfvuw2od/kRu45W3j 1YCg== X-Gm-Message-State: ANoB5pk6Q+cwsbhM/51EOPM7x6ID8ijY+V6ZhET7apJw46EptsYPLnLf IKMPBF5DNm5gMwG8E+3WzfYniw== X-Google-Smtp-Source: AA0mqf4tTcINpQhCQSelNAY/ulYfrY350QUXdEI8ey/EHpUUfK2L8jxk7ANheUHMVzA4IwCsGl0IAA== X-Received: by 2002:a17:90a:7d09:b0:213:971d:902e with SMTP id g9-20020a17090a7d0900b00213971d902emr1072490pjl.123.1668560247065; Tue, 15 Nov 2022 16:57:27 -0800 (PST) Received: from dread.disaster.area (pa49-181-106-210.pa.nsw.optusnet.com.au. [49.181.106.210]) by smtp.gmail.com with ESMTPSA id b24-20020aa79518000000b0056afd55722asm9403628pfp.153.2022.11.15.16.57.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 16:57:26 -0800 (PST) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1ov6jz-00Ei8u-W4; Wed, 16 Nov 2022 11:57:24 +1100 Date: Wed, 16 Nov 2022 11:57:23 +1100 From: Dave Chinner To: "Darrick J. Wong" Cc: Christoph Hellwig , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 6/9] xfs: xfs_bmap_punch_delalloc_range() should take a byte range Message-ID: <20221116005723.GA3600936@dread.disaster.area> References: <20221115013043.360610-1-david@fromorbit.com> <20221115013043.360610-7-david@fromorbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668560248; a=rsa-sha256; cv=none; b=zCbZFjhAGO5Rne++6ezUWxt2/XKcbixHTFx5Oud1FX1PGW0o/5mXdkBMMfst45Jzk1YhAv 89zk31Qo9XRA8FD8jIaYdO+HSNTTju3aBQE+qXb6HeHyFPr7TW4jX8PRUjRIOO7TFdINKH A1bIydblQyAWlEvmEH9wU7cLx+EZjVY= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=fromorbit-com.20210112.gappssmtp.com header.s=20210112 header.b=HI4ITdJn; spf=none (imf06.hostedemail.com: domain of david@fromorbit.com has no SPF policy when checking 209.85.216.50) smtp.mailfrom=david@fromorbit.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668560248; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=H06oQQHBFOJW8pw2jS0c6jV1S5y28zjyrixRsNPgW0Q=; b=4VxzEU7XCerPR8hEJnTs4jN0kOUIvz5MtI+G++tKD8J1NMAwN8Rzss/iOrz35NAJD1k1m3 pQSO/SQW8P7WuQCbHdVW26jgzfMgwxr8EANbhldpmCvnrZXNRgRv5sT7Wnn34bQseI73Pp hrgp44VKs8s+zP3PADfBU9maUsgOoVs= X-Stat-Signature: qjwthoqpy3ja9799ph7mwesn8kwd95g8 X-Rspamd-Queue-Id: 20481180004 Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=fromorbit-com.20210112.gappssmtp.com header.s=20210112 header.b=HI4ITdJn; spf=none (imf06.hostedemail.com: domain of david@fromorbit.com has no SPF policy when checking 209.85.216.50) smtp.mailfrom=david@fromorbit.com; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1668560247-659719 X-Bogosity: Ham, tests=bogofilter, spamicity=0.019597, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Nov 15, 2022 at 03:48:33PM -0800, Darrick J. Wong wrote: > On Tue, Nov 15, 2022 at 12:44:46AM -0800, Christoph Hellwig wrote: > > On Tue, Nov 15, 2022 at 12:30:40PM +1100, Dave Chinner wrote: > > > From: Dave Chinner > > > > > > All the callers of xfs_bmap_punch_delalloc_range() jump through > > > hoops to convert a byte range to filesystem blocks before calling > > > xfs_bmap_punch_delalloc_range(). Instead, pass the byte range to > > > xfs_bmap_punch_delalloc_range() and have it do the conversion to > > > filesystem blocks internally. > > > > Ok, so we do this here. Why can't we just do this earlier and > > avoid the strange inbetween stage with a wrapper? > > Probably to avoid rewriting the previous patch with this units change, > is my guess. Dave, do you want to merge with this patch 4? I'm > satisfied enough with patches 4 and 6 that I'd rather get this out to > for-next for further testing than play more patch golf. The fact that Christoph NAK'd exporting mapping_seek_hole_data() this time around is just Plain Fucking Annoying. He didn't say anything in the last thread about it after I explained why I used it, so I had assumed it was all OK. I've already been playing patch golf all morning now to rearrange all the deck chairs to avoid exporting mapping_seek_hole_data(). Instead we now have an exported iomap function that wraps mapping_seek_hole_data, and the wrapper function I added in patch 4 is now the callback function that is passed 3 layers deep into the iomap code. Hence the xfs_buffered_write_delalloc_punch() function needs to remain - we can't elide it entire like this patch does - because now we need a callback function that we can provide to the iomap code so we avoid coupling internal XFS implementation functions to external VFS APIs. -Dave. -- Dave Chinner david@fromorbit.com