From b517bea1c74e4773482b3f41b3f493522a8c8e30 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 11 Oct 2006 01:21:08 -0700 Subject: [PATCH] 64-bit jbd2 core Here is the patch to JBD to handle 64 bit block numbers, originally from Zach Brown. This patch is useful only after adding support for 64-bit block numbers in the filesystem. Signed-off-by: Badari Pulavarty Signed-off-by: Zach Brown Signed-off-by: Dave Kleikamp Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/jbd2/journal.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'fs/jbd2/journal.c') diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 8d0f71e562fe..926ebcbf8a7a 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1609,6 +1609,17 @@ int jbd2_journal_blocks_per_page(struct inode *inode) return 1 << (PAGE_CACHE_SHIFT - inode->i_sb->s_blocksize_bits); } +/* + * helper functions to deal with 32 or 64bit block numbers. + */ +size_t journal_tag_bytes(journal_t *journal) +{ + if (JBD2_HAS_INCOMPAT_FEATURE(journal, JBD2_FEATURE_INCOMPAT_64BIT)) + return JBD_TAG_SIZE64; + else + return JBD_TAG_SIZE32; +} + /* * Simple support for retrying memory allocations. Introduced to help to * debug different VM deadlock avoidance strategies. -- cgit v1.2.3