|
|
Log in / Subscribe / Register

allow building a kernel without buffer_heads

From:  Christoph Hellwig <hch-AT-lst.de>
To:  Jens Axboe <axboe-AT-kernel.dk>
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>
Cc:  "Darrick J. Wong" <djwong-AT-kernel.org>, Andrew Morton <akpm-AT-linux-foundation.org>, Matthew Wilcox <willy-AT-infradead.org>, Christian Brauner <christian-AT-brauner.io>, linux-block-AT-vger.kernel.org, linux-fsdevel-AT-vger.kernel.org, linux-xfs-AT-vger.kernel.org, linux-mm-AT-kvack.org, linux-kernel-AT-vger.kernel.org
Archive-link:  Article

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


Copyright © 2023, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds