Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp32802907rwd; Fri, 7 Jul 2023 22:38:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlEYa3wkzmUJMbSj5KzHBWsAFSJRpH92VycU2EjpB1DzFn4+p17PpvCmrXY31CbgtUgEErah X-Received: by 2002:a05:6808:298d:b0:39e:b58c:13d5 with SMTP id ex13-20020a056808298d00b0039eb58c13d5mr7957018oib.17.1688794725655; Fri, 07 Jul 2023 22:38:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688794725; cv=none; d=google.com; s=arc-20160816; b=F+B4Q7UQOTdv6r5/zTRyQorPfZQL5dnaZPx71b+ofywMss0kxbNGv1KTZIcqsxiHUq s4Q4vTGdnDL4pmTg8cfbG2ZKq33yFDdPc/87m+PixSZvyY9TdqenYAxdqWk1ggOIknBw Rs4JXE+jNN+rglVdpAACmE5oTLrNUmUHrnqjgfaO653YyK445t53CT639E1E+Y9Ihq7X 9pDUs8EIpDp92a27FCS52dJ2/ZEx8xV5tUpXcoeTGcKjepIscUIw8hshjaDkNI3gy6zq JKjuCrNO43F5FakmAbQXpNmkcSN64x7SgmWrU6Y7QcW1YFIsYHaI0M2lyPYc89FO4Jgm GjPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=Tua3cusTVAWiQUobwnIpJERruf3dwUSDMjP59oVXpbA=; fh=dRqSvUx8bBwO823FJM8u6pIFCmRC6viCmB4BbR33RC4=; b=NobeS5uo6x2bfk/vghUj6/QZsn1rilQ6IQEngzq/P8fpJUhcuZu+ibflwU/FddQvJx iJduEvFLRNqEXIiAr5NBRKizbsWwevq6hkezAurednWmKN0XN1vS2ri9LzSaU2G+gLnQ mOfFMQAnxbDnHruq1narL+imbDBBZwNx4U/YfpZEoUrpn8DSs5ii1stmbKIAnANiZoLU vxjnYueBHUlDSSz+V6KIHSEGMPuu2u8hkLVKdAVzg20fz51G5zQxSkB3nZsXej9LQ7vp 8CaSi2A1scwg49I7P4a3ASPTfUEzrLhICGN1bfo5uuBln4Y5LnAyF02/m70YJMCs/PxI cAxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=GPa5oZiz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n55-20020a056a000d7700b0064d28479818si4781828pfv.96.2023.07.07.22.38.31; Fri, 07 Jul 2023 22:38:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=GPa5oZiz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232724AbjGHELB (ORCPT + 99 others); Sat, 8 Jul 2023 00:11:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229751AbjGHEK6 (ORCPT ); Sat, 8 Jul 2023 00:10:58 -0400 Received: from out-26.mta1.migadu.com (out-26.mta1.migadu.com [95.215.58.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A6A71FEA for ; Fri, 7 Jul 2023 21:10:56 -0700 (PDT) Date: Sat, 8 Jul 2023 00:10:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1688789454; h=from:from:reply-to:subject:subject: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=Tua3cusTVAWiQUobwnIpJERruf3dwUSDMjP59oVXpbA=; b=GPa5oZizFI9+msR4SXLzcoMgJkBvTt+D93ZbTGPMlJAQMpdoXXkgJLUbYSbxtydyJAa9pX 9pjJuFDCzcishQaHaAJxvNiBs9GX0r+Opp8+kSD8NI4zmpCHaOtaxGhyMHN/ZVrFYCmCjm WriBPdv1lp+dEH+swlj8FNXEi6ULiIs= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Matthew Wilcox Cc: James Bottomley , Christian Brauner , "Darrick J. Wong" , Josef Bacik , torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-bcachefs@vger.kernel.org, dchinner@redhat.com, sandeen@redhat.com, tytso@mit.edu, bfoster@redhat.com, jack@suse.cz, andreas.gruenbacher@gmail.com, peterz@infradead.org, akpm@linux-foundation.org, dhowells@redhat.com Subject: Re: [GIT PULL] bcachefs Message-ID: <20230708041049.2tdw6fnnjtqwuqlw@moria.home.lan> References: <20230626214656.hcp4puionmtoloat@moria.home.lan> <20230706155602.mnhsylo3pnief2of@moria.home.lan> <20230706164055.GA2306489@perftesting> <20230706173819.36c67pf42ba4gmv4@moria.home.lan> <20230706211914.GB11476@frogsfrogsfrogs> <20230707-badeverbot-gekettet-19ce3c238dac@brauner> <20230707091810.bamrvzcif7ncng46@moria.home.lan> <30661670c55601ff475f2f0698c2be2958e45c38.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 08, 2023 at 04:54:22AM +0100, Matthew Wilcox wrote: > One thing I particularly like about btrfs :) > compared to ntfs3 is that it doesn't use old legacy code like the buffer > heads, which means that it doesn't add to the technical debt. From the > page cache point of view, it's fairly clean. I wish it used iomap, but > iomap would need quite a lot of new features to accommodate everything > bcachefs wants to do. Maybe iomap will grow those features over time. My big complaint with iomap is that it's still the old callback based approach - an indirect function call into the filesystem to get a mapping, then Doing Stuff, for every walk. Instead of calling back and forth, we could be filling out a data structure to represent the IO, then handing it off to the filesystem to look up the mappings and send to the right place, splitting as needed. Best part is, we already have such a data structure: struct bio. That's the approach bcachefs takes. It would be nice sharing the page cache management code, but like you mentioned, iomap would have to grow a bunch of features. But, some of those features other users might like: in particular bcachefs hangs disk reservations and dirty sector (for i_blocks accounting) off the pagecache, which to me is a total no brainer, it eliminates looking up in a second data structure for e.g. the buffered write path. Also worth noting - bcachefs has had large folio support for awhile now :)