aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorZach Brown <zach.brown@oracle.com>2006-10-11 04:21:08 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 14:14:16 -0400
commitb517bea1c74e4773482b3f41b3f493522a8c8e30 (patch)
tree1e98110151f1a35cde84ce1a2cb6f0cb871e9551 /include/linux
parentd0d856e8bd6e697cb44b2b4dd038f3bec576a70e (diff)
[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 <pbadari@us.ibm.com> Signed-off-by: Zach Brown <zach.brown@oracle.com> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/jbd2.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 3251f7abb57d..5e5aa64f1261 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -150,14 +150,21 @@ typedef struct journal_header_s
150 150
151 151
152/* 152/*
153 * The block tag: used to describe a single buffer in the journal 153 * The block tag: used to describe a single buffer in the journal.
154 * t_blocknr_high is only used if INCOMPAT_64BIT is set, so this
155 * raw struct shouldn't be used for pointer math or sizeof() - use
156 * journal_tag_bytes(journal) instead to compute this.
154 */ 157 */
155typedef struct journal_block_tag_s 158typedef struct journal_block_tag_s
156{ 159{
157 __be32 t_blocknr; /* The on-disk block number */ 160 __be32 t_blocknr; /* The on-disk block number */
158 __be32 t_flags; /* See below */ 161 __be32 t_flags; /* See below */
162 __be32 t_blocknr_high; /* most-significant high 32bits. */
159} journal_block_tag_t; 163} journal_block_tag_t;
160 164
165#define JBD_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high))
166#define JBD_TAG_SIZE64 (sizeof(journal_block_tag_t))
167
161/* 168/*
162 * The revoke descriptor: used on disk to describe a series of blocks to 169 * The revoke descriptor: used on disk to describe a series of blocks to
163 * be revoked from the log 170 * be revoked from the log
@@ -235,11 +242,13 @@ typedef struct journal_superblock_s
235 ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask)))) 242 ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))
236 243
237#define JBD2_FEATURE_INCOMPAT_REVOKE 0x00000001 244#define JBD2_FEATURE_INCOMPAT_REVOKE 0x00000001
245#define JBD2_FEATURE_INCOMPAT_64BIT 0x00000002
238 246
239/* Features known to this kernel version: */ 247/* Features known to this kernel version: */
240#define JBD2_KNOWN_COMPAT_FEATURES 0 248#define JBD2_KNOWN_COMPAT_FEATURES 0
241#define JBD2_KNOWN_ROCOMPAT_FEATURES 0 249#define JBD2_KNOWN_ROCOMPAT_FEATURES 0
242#define JBD2_KNOWN_INCOMPAT_FEATURES JBD2_FEATURE_INCOMPAT_REVOKE 250#define JBD2_KNOWN_INCOMPAT_FEATURES (JBD2_FEATURE_INCOMPAT_REVOKE | \
251 JBD2_FEATURE_INCOMPAT_64BIT)
243 252
244#ifdef __KERNEL__ 253#ifdef __KERNEL__
245 254
@@ -1052,6 +1061,7 @@ static inline int tid_geq(tid_t x, tid_t y)
1052} 1061}
1053 1062
1054extern int jbd2_journal_blocks_per_page(struct inode *inode); 1063extern int jbd2_journal_blocks_per_page(struct inode *inode);
1064extern size_t journal_tag_bytes(journal_t *journal);
1055 1065
1056/* 1066/*
1057 * Return the minimum number of blocks which must be free in the journal 1067 * Return the minimum number of blocks which must be free in the journal