summaryrefslogtreecommitdiffstats
path: root/include/linux/jbd2.h
diff options
context:
space:
mode:
authorZach Brown <zach.brown@oracle.com>2006-10-11 01:21:08 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 11:14:16 -0700
commitb517bea1c74e4773482b3f41b3f493522a8c8e30 (patch)
tree1e98110151f1a35cde84ce1a2cb6f0cb871e9551 /include/linux/jbd2.h
parentd0d856e8bd6e697cb44b2b4dd038f3bec576a70e (diff)
downloadblackbird-op-linux-b517bea1c74e4773482b3f41b3f493522a8c8e30.tar.gz
blackbird-op-linux-b517bea1c74e4773482b3f41b3f493522a8c8e30.zip
[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/jbd2.h')
-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
/*
- * The block tag: used to describe a single buffer in the journal
+ * The block tag: used to describe a single buffer in the journal.
+ * t_blocknr_high is only used if INCOMPAT_64BIT is set, so this
+ * raw struct shouldn't be used for pointer math or sizeof() - use
+ * journal_tag_bytes(journal) instead to compute this.
*/
typedef struct journal_block_tag_s
{
__be32 t_blocknr; /* The on-disk block number */
__be32 t_flags; /* See below */
+ __be32 t_blocknr_high; /* most-significant high 32bits. */
} journal_block_tag_t;
+#define JBD_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high))
+#define JBD_TAG_SIZE64 (sizeof(journal_block_tag_t))
+
/*
* The revoke descriptor: used on disk to describe a series of blocks to
* be revoked from the log
@@ -235,11 +242,13 @@ typedef struct journal_superblock_s
((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))
#define JBD2_FEATURE_INCOMPAT_REVOKE 0x00000001
+#define JBD2_FEATURE_INCOMPAT_64BIT 0x00000002
/* Features known to this kernel version: */
#define JBD2_KNOWN_COMPAT_FEATURES 0
#define JBD2_KNOWN_ROCOMPAT_FEATURES 0
-#define JBD2_KNOWN_INCOMPAT_FEATURES JBD2_FEATURE_INCOMPAT_REVOKE
+#define JBD2_KNOWN_INCOMPAT_FEATURES (JBD2_FEATURE_INCOMPAT_REVOKE | \
+ JBD2_FEATURE_INCOMPAT_64BIT)
#ifdef __KERNEL__
@@ -1052,6 +1061,7 @@ static inline int tid_geq(tid_t x, tid_t y)
}
extern int jbd2_journal_blocks_per_page(struct inode *inode);
+extern size_t journal_tag_bytes(journal_t *journal);
/*
* Return the minimum number of blocks which must be free in the journal
OpenPOWER on IntegriCloud