Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp2092852rdb; Wed, 31 Jan 2024 20:44:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IH19FPxwpbhTMLE9RcOFhtqdCGOddTM/5gMKSUj3LYFlJkCsbV/kyyDs6kXQTzXCO54eJsT X-Received: by 2002:a17:90b:2352:b0:290:6170:91b5 with SMTP id ms18-20020a17090b235200b00290617091b5mr3435860pjb.27.1706762641796; Wed, 31 Jan 2024 20:44:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706762641; cv=pass; d=google.com; s=arc-20160816; b=Kv8l3itxCmZRo8L0XDoM8olfAtEYbSaPfdoy/3CZbL18r/R49X9PhgiMhoVDofNTL/ ov6X5yIunxCw16SqJphSwFbIsd17WtxUk2TewrkHOQQHrRoIoq0MVACODxBameiMx6b1 GXa58j6OmcJEB/8sHG1O6IrP5SB9nx9CSYQd6JGxB5i/4h56reXhR/WvQphTm+2hCjOT XKysSNG2XisFNIdJdEMHtxGpOlbugZlgpNNHKqr/kzLjDhRTdViu7jC/tS1jwprnjmpQ 8Q783lUl0YjRt+vHqmZK81qHQ7fL11foKftUmZInNyzmSBlcwBgQvj88ANVDDsMGC/Ot TwDA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=BX7nmOpwP+vrBA2b8ysy6IwSrhBLm/LCTlPDbPSTvWc=; fh=LYqL54lj8MF4V43u5Rhj8cyxbrQZz6jMp2LH7dlvJQI=; b=GxtMxVEn2I/qnXJrC8eizh7J9AkAT6/7K23TNi8GdeGU7+hHhEoVKca4Rg5+/vlYMW NZST3T/0VwOnEsMJ4cgXkqEMiyybpnHeLSYxP8r9+B3fu+KPVODNokhEJ6UeDU1OUazH V319FVtHcIwztFtLaRlew2aWYKPC669XYSVeTxqM68mQ86URTQT6pYQfx/xgm8qe9ieY QFtA1Tk7h40GDFyWEAkTuxuu11mI8qWywZ8VXETQMVfr1p9nqZKWbr1SaIzvpujKU+g9 G8Zs/MoP6QlNXEnZV3nhdYN4vLM/HSuNZpIFYexT+p3pb9VsKdGIfdFclbni6UlTNEZQ p9wg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-ext4+bounces-1051-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1051-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVYCTBcWcklgL3r7R54ZLv0eXUS8gcByAZPKcJJacI+gFTuMwp5jk4To0sLDCmemv93q0oTNP6c9lZBqbpkLikWnAGO2w1Eq9yXPtqiQA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id cm13-20020a17090afa0d00b00295cff4a693si2771541pjb.56.2024.01.31.20.44.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 20:44:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1051-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-ext4+bounces-1051-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1051-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id DBBBA28711C for ; Thu, 1 Feb 2024 04:42:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CDC8E3B190; Thu, 1 Feb 2024 04:42:52 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 532F23BB21; Thu, 1 Feb 2024 04:42:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706762572; cv=none; b=NnpcOhV8od123owkjn8OpXpBq1a+IY+Lrd7btQlkD94g1+v+ClSAK0GQt2RKqbaqY2q0UT22KA1lEN86ldob0ozxv7tvKkKuwT+ea4Wj90VCxkyo1xDIzyim5pDAmLDKnUWJB97h5OOvRAAwlmdsiP2Y5766qdajJ6TLp5lPeCM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706762572; c=relaxed/simple; bh=MhL63WgwsFxDJhAoegljqRueB5JQHLx3QCQjicgGBoY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SBduv3Cf475tJgiu9G/ajlPKkwMo8d6iI0u18G/oDRKk5gPjowmGLzbZq5YRZEgHmiR03On7VKAYlkf2cG0mFsAJzax4/qGoX5ALeN8l5roDsjbgIdh16eY+nv47aESjHF/tZbuxZ8952nggETDvl8PMOBiPgkGzP1rnUZVdTaw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id AE27468AFE; Thu, 1 Feb 2024 05:42:46 +0100 (CET) Date: Thu, 1 Feb 2024 05:42:46 +0100 From: Christoph Hellwig To: Matthew Wilcox Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [PATCH 1/3] fs: Introduce buffered_write_operations Message-ID: <20240201044246.GA14117@lst.de> References: <20240130055414.2143959-1-willy@infradead.org> <20240130055414.2143959-2-willy@infradead.org> <20240130081252.GC22621@lst.de> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Thu, Feb 01, 2024 at 04:36:09AM +0000, Matthew Wilcox wrote: > +static struct folio *iomap_write_begin(struct iomap_iter *iter, loff_t pos, > + size_t len) > > with corresponding changes. Again, ends up looking slightly cleaner. iomap also really needs some tweaks to the naming in the area as a __foo function calling foo as the default is horrible. I'll take a look at your patches and can add that on top. > f2fs also doesn't seem terribly objectional; passing rpages between > begin & end. > > ocfs2 is passing a ocfs2_write_ctxt between the two. Well, it might be the intended purpose, but as-is it is horribly inefficient - they need to do a dynamic allocation for every page they iterate over. So all of them are candidates for an iterator model that does this allocation once per write. But maybe this isn't the time to deal with that and we should just leave it in place.