Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9642288rwp; Thu, 20 Jul 2023 07:48:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlEMfiyHH54Tmp1r1E7SaK1GfL4Mix+ANg2Iy6bJP5IGMRYrnfRP0Bd7gnhyuP+8epZ2kwmx X-Received: by 2002:a05:6a20:160b:b0:137:53d1:405 with SMTP id l11-20020a056a20160b00b0013753d10405mr5881217pzj.26.1689864496831; Thu, 20 Jul 2023 07:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689864496; cv=none; d=google.com; s=arc-20160816; b=Gn9NYbdGxi2NWSapjcNhSF8arOCP1ND6xtHvzIdP260Fqo3WGECC+UHzhMdDWy3ubH dUG+AQunX8+q19cnJrkYawiaPdIq3JPgnulSllhGziPhf9ZbXhmI9hrwPSSXBk17LFs8 OfWDSX9iVgCEYP//B0ulSbWWJCKK4EWIc4HCxq9Q9J9oX84pUDECS/nDny7a3cEr12cl eHwMXKW6AVnytrUaRgYZgBAzonPYS/I2cp9A8TQUPRARygxdu+SiE3LujhoMNMvRhQHD 6ClJZNWZo9s3tB4KKkgMuZL8EuFZnm4IlI7/MXFRTghqdIOanmsVAEqVKSsSshPOf4m3 klNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=r6VPyu9gsZuH8VJquNMO+URB3eVHSlazkIbeLhLt+jY=; fh=Z8ki5Y40HW1Cj4LTSUUzezOiTJ0KadqB9ku6XsqDfAM=; b=0ASDnOeIf5q3yewTjBSjgYLhjPkzQtlCmlKFByq4l+amJLc+0ewt1RQSnQw19iShLw ZBBxC5oD1z7z0FM7iYFIZwlAdkDcCj0ySe19OfWq/2v1fcEvUwpfLzGrFwzmDNbNAQBV xKcK12ElIxSWPO/w3IK74blb4n9v+xPyO0Q6ZfZx/tzHd9bPcjYyzYPft6wyQX/EhPGy Krfx151/jthUw+g2MsuCXE/VvxXntythVfTnONcDQ6D9+DojYtAfMa6wDhC8Z0fZwa00 rHz4IjXaJL/JD2M3N9TfSZ5v7NGU6bnDP5aSfo9gYukJryx43hkyrua5SO/7jP64wZIz vWuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=anw34U13; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k13-20020a056a00134d00b0067d2eeacacesi1142060pfu.355.2023.07.20.07.48.03; Thu, 20 Jul 2023 07:48:16 -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=@infradead.org header.s=bombadil.20210309 header.b=anw34U13; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231892AbjGTOFD (ORCPT + 99 others); Thu, 20 Jul 2023 10:05:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231840AbjGTOFA (ORCPT ); Thu, 20 Jul 2023 10:05:00 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3B57132; Thu, 20 Jul 2023 07:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=r6VPyu9gsZuH8VJquNMO+URB3eVHSlazkIbeLhLt+jY=; b=anw34U13y7O9T4LymqzZz9xQtJ k+/enaW+JpCm3OEJhNKlx2w+Ni8L2Luy9FamN3UndB2S67Cf77Rychmh9l7eB1AhZuXb6CYz1+1g+ h6+KbKc6Un6+biqn42qgftFra2bfIrgEo+FeJpJJt4Pj+whPgbg1BFsPInxvH8FpJA4Ra6Z6F+2kR VRpCYKFUOoEiw9nvPIHPNZEpG7TgotBdka4TJ+dA+yADs/BZFpTpzRnk74gD+eNEeCC2zyw7afK4t jfsRh+bHFpb59/r6lPphmzSF9Ii5KcXXkW5EVyOIZRzR8DkMG3wKVukMq95nJSpg9qUF9CFbI+e9V itFDCzRQ==; Received: from [2001:4bb8:19a:298e:a587:c3ea:b692:5b8d] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qMUH0-00BKni-2b; Thu, 20 Jul 2023 14:04:55 +0000 From: Christoph Hellwig To: Jens Axboe Cc: "Darrick J. Wong" , Andrew Morton , Matthew Wilcox , Christian Brauner , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: allow building a kernel without buffer_heads Date: Thu, 20 Jul 2023 16:04:46 +0200 Message-Id: <20230720140452.63817-1-hch@lst.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi all, This series allows to build a kernel without buffer_heads, which I think is useful to show where the dependencies are, and maybe also for some very much limited environments, where people just needs xfs and/or btrfs and some of the read-only block based file systems. It first switches buffered writes (but not writeback) for block devices to use iomap unconditionally, but still using buffer_heads, and then adds a CONFIG_BUFFER_HEAD selected by all file systems that need it (which is most block based file systems), makes the buffer_head support in iomap optional, and adds an alternative implementation of the block device address_operations using iomap. This latter implementation will also be useful to support block size > PAGE_SIZE for block device nodes as buffer_heads won't work very well for that. Note that for now the md software raid drivers is also disabled as it has some (rather questionable) buffer_head usage in the unconditionally built bitmap code. I have a series pending to make the bitmap code conditional and deprecated it, but it hasn't been merged yet. Changes since v1: - drop the already merged prep patches - depend on FS_IOMAP not IOMAP - pick a better new name for block_page_mkwrite_return