Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp82336rwo; Tue, 1 Aug 2023 13:18:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHZSEbZPKX0QilDgeAmI6jBQ2+/JdQuX8rj22LX9hb0UQANqiSpWXnSlb+k0zf9+F1HRZxy X-Received: by 2002:a17:902:b28b:b0:1bc:32f2:812a with SMTP id u11-20020a170902b28b00b001bc32f2812amr116333plr.27.1690921099012; Tue, 01 Aug 2023 13:18:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690921098; cv=none; d=google.com; s=arc-20160816; b=D4Sp75EplYwkYwE1bRuMee712Z0bX4qBjXNoRcevwB7ZWvQoI/EyDUyAnGWupUFTdi PXXFu1cm80qsEv42QbMQPdvMMKNDZJHgRpbS6n8ejcAJbJJqh91sG0XQuPI3aF36FJHy xgybY6Kba74Vhhu/8v1t2i+xFixs/8yUQe8QpEJGsYWtPyNqRxazj8Ov/EE4UkX6v16/ X2QAnEjg6Fok/3zMmzgP0EccO/XgpdTAyU6RK1RQXh6ZjeD87TIZ5gk6L/ybH/4re1tZ k97+Ea47xiKdZ4wLimhDz1ehJFINa1w2E37s1XCiHB7t6RTBhxXjV6vFxSVnRumtC/XT oxUg== 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=IC+hkFzsraORVL28A/kjM0OytUDIOrQlr7SfFeohqy8=; fh=4ZoXP1ZiBGNANv9Bx/y8KEdYkOdAVeWSfmFGTd1wWnQ=; b=tGjfIbb1AOkDlOsIRYBdu08rZeWFzRkB5NhE+HVTdnzKW/Clo+AWhCoQqqAbtvdTgk Hv9A6OMS5/BxFraQ/F+i98U0cuc7ysx6VCpcD5dry48sD7Q4wt36ohZ/3R/N1rkIV/U5 ZabmXhGjqFe1IYbYKSCtjL+RS/5Q/V4FW3dROhcaaaBKkDRhIBkXccamF0T66+dGWO+t m8a463wAw0ahLljXWlgy++uT2Ebwk9jkERsB18B4fatX6WcdqQ52fLW2j7yJzMtGrhlj UhloDFgI2ZHVhfaDIlomsi6kcpUgYwRi20H7C8ni015EeKy273NXUUTW8IuFbQabfODJ 5rJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=c2RD5mZR; 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 s1-20020a170902ea0100b001b8a3a8d707si9867091plg.573.2023.08.01.13.18.04; Tue, 01 Aug 2023 13:18:18 -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=c2RD5mZR; 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 S231200AbjHATAC (ORCPT + 99 others); Tue, 1 Aug 2023 15:00:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231833AbjHAS7s (ORCPT ); Tue, 1 Aug 2023 14:59:48 -0400 Received: from out-77.mta0.migadu.com (out-77.mta0.migadu.com [91.218.175.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1ED8D1BE3 for ; Tue, 1 Aug 2023 11:59:46 -0700 (PDT) Date: Tue, 1 Aug 2023 14:59:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1690916384; 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=IC+hkFzsraORVL28A/kjM0OytUDIOrQlr7SfFeohqy8=; b=c2RD5mZRt+9NuyWas53Mgwnpp+VIhPCcbfY6GEax8AgF9MRqweC6dyjeiGAS2hUNb+xO4L MfR1rncIoVyDfLJQ5ojrCE4x+JmyTPldISLsk+X4ubRnesBhI4kWaFJBbT6Og+bsefSjDH LkvBWXPu05W12WWSRhtXe4/Y9bePJOY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Christoph Hellwig Cc: linux-bcachefs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Kent Overstreet , linux-block@vger.kernel.org, Jens Axboe Subject: Re: [PATCH 04/20] block: Add some exports for bcachefs Message-ID: <20230801185940.b4vsd62fjxwzv7ft@moria.home.lan> References: <20230712211115.2174650-1-kent.overstreet@linux.dev> <20230712211115.2174650-5-kent.overstreet@linux.dev> <20230725030037.minycb3oxubajuqw@moria.home.lan> 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,RCVD_IN_DNSWL_BLOCKED, 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 Wed, Jul 26, 2023 at 06:20:42AM -0700, Christoph Hellwig wrote: > On Mon, Jul 24, 2023 at 11:00:37PM -0400, Kent Overstreet wrote: > > In short, iomap is heavily callback based, the bcachefs io paths are > > not - we pass around data structures instead. I discussed this with > > people when iomap was first being written, but iomap ended up being a > > much more conservative approach, more in line with the old buffer heads > > code where the generic code calls into the filesystem to obtain > > mappings. > > > > I'm gradually convincing people of the merits of the bcachefs approach - > > in particular reducing indirect function calls is getting more attention > > these days. > > FYI, Matthew has had patches that convert iomap to be an iterator, > and I've massage the first half of them and actuall got them in > before. I'd much rather finish off that work (even if only for > direct I/O initially) than adding another direct I/O code. But > even with out that we should be able to easily pass more private > data, in fact btrfs makes pretty heavy use of that. That's wonderful, but getting iomap up to the level of what bcachefs needs is still going to be a pretty big project and it's not going to be my highest priority. bcachefs also hangs more state off of the pagecache, in bcachefs's equivvalent of iomap_page - we store reservations for dirty data there and a few other things, which means the buffered IO paths don't have to walk any other data structures. I think that's another idea you guys will want to steal, but a higher priority for me is getting a proper FUSE port done - and making bcachefs more tightly weddded to VFS library code is not likely to make that process any easier. Once a proper fuse port is done and we know what that looks like will be a better time for some consolidation.