aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/buffer_head.h
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-12-15 21:43:51 +0000
committerAndrew Morton <akpm@linux-foundation.org>2023-01-18 17:12:39 -0800
commitd685c668b0695dff927c85e27ef27d4f404f16a3 (patch)
tree12dc6df7ee71fc26e275deb48df0a44979db8965 /include/linux/buffer_head.h
parentmm/hugetlb: introduce hugetlb_walk() (diff)
downloadwireguard-linux-d685c668b0695dff927c85e27ef27d4f404f16a3.tar.xz
wireguard-linux-d685c668b0695dff927c85e27ef27d4f404f16a3.zip
buffer: add b_folio as an alias of b_page
Patch series "Start converting buffer_heads to use folios". I was hoping that filesystems would convert from buffer_heads to iomap, but that's not happening particularly quickly. So the buffer_head infrastructure needs to be converted from being page-based to being folio-based. This patch (of 12): Buffer heads point to the allocation (ie the folio), not the page. This is currently the same thing for all filesystems that use buffer heads, so this is a safe transitional step. Link: https://lkml.kernel.org/r/20221215214402.3522366-1-willy@infradead.org Link: https://lkml.kernel.org/r/20221215214402.3522366-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/buffer_head.h')
-rw-r--r--include/linux/buffer_head.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 33fa5e94aa80..8f14dca5fed7 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -61,7 +61,10 @@ typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate);
struct buffer_head {
unsigned long b_state; /* buffer state bitmap (see above) */
struct buffer_head *b_this_page;/* circular list of page's buffers */
- struct page *b_page; /* the page this bh is mapped to */
+ union {
+ struct page *b_page; /* the page this bh is mapped to */
+ struct folio *b_folio; /* the folio this bh is mapped to */
+ };
sector_t b_blocknr; /* start block number */
size_t b_size; /* size of mapping */