ext4/jbd2: convert jbd2_journal_blocks_per_page() to support large folio

jbd2_journal_blocks_per_page() returns the number of blocks in a single
page. Rename it to jbd2_journal_blocks_per_folio() and make it returns
the number of blocks in the largest folio, preparing for the calculation
of journal credits blocks when allocating blocks within a large folio in
the writeback path.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20250512063319.3539411-5-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
Zhang Yi
2025-05-12 14:33:15 +08:00
committed by Theodore Ts'o
parent 2e9466fc5d
commit d6bf294773
4 changed files with 10 additions and 9 deletions

View File

@@ -1723,7 +1723,7 @@ static inline int tid_geq(tid_t x, tid_t y)
return (difference >= 0);
}
extern int jbd2_journal_blocks_per_page(struct inode *inode);
extern int jbd2_journal_blocks_per_folio(struct inode *inode);
extern size_t journal_tag_bytes(journal_t *journal);
static inline int jbd2_journal_has_csum_v2or3(journal_t *journal)