[PATCH] x86-64: x86-64 add Intel Core related PMU MSRs definitions
[safe/jmp/linux-2.6] / include / linux / jbd2.h
index 3251f7a..ddb1287 100644 (file)
@@ -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__
 
@@ -732,7 +741,7 @@ struct journal_s
         */
        struct block_device     *j_dev;
        int                     j_blocksize;
-       unsigned long           j_blk_offset;
+       unsigned long long              j_blk_offset;
 
        /*
         * Device which holds the client fs.  For internal journal this will be
@@ -851,7 +860,7 @@ extern void __journal_clean_data_list(transaction_t *transaction);
 
 /* Log buffer allocation */
 extern struct journal_head * jbd2_journal_get_descriptor_buffer(journal_t *);
-int jbd2_journal_next_log_block(journal_t *, unsigned long *);
+int jbd2_journal_next_log_block(journal_t *, unsigned long long *);
 
 /* Commit management */
 extern void jbd2_journal_commit_transaction(journal_t *);
@@ -866,7 +875,7 @@ extern int
 jbd2_journal_write_metadata_buffer(transaction_t         *transaction,
                              struct journal_head  *jh_in,
                              struct journal_head **jh_out,
-                             unsigned long        blocknr);
+                             unsigned long long   blocknr);
 
 /* Transaction locking */
 extern void            __wait_on_journal (journal_t *);
@@ -914,7 +923,7 @@ extern void  jbd2_journal_unlock_updates (journal_t *);
 
 extern journal_t * jbd2_journal_init_dev(struct block_device *bdev,
                                struct block_device *fs_dev,
-                               int start, int len, int bsize);
+                               unsigned long long start, int len, int bsize);
 extern journal_t * jbd2_journal_init_inode (struct inode *);
 extern int        jbd2_journal_update_format (journal_t *);
 extern int        jbd2_journal_check_used_features
@@ -935,7 +944,7 @@ extern void    jbd2_journal_abort      (journal_t *, int);
 extern int        jbd2_journal_errno      (journal_t *);
 extern void       jbd2_journal_ack_err    (journal_t *);
 extern int        jbd2_journal_clear_err  (journal_t *);
-extern int        jbd2_journal_bmap(journal_t *, unsigned long, unsigned long *);
+extern int        jbd2_journal_bmap(journal_t *, unsigned long, unsigned long long *);
 extern int        jbd2_journal_force_commit(journal_t *);
 
 /*
@@ -968,14 +977,13 @@ extern void          jbd2_journal_destroy_revoke_caches(void);
 extern int        jbd2_journal_init_revoke_caches(void);
 
 extern void       jbd2_journal_destroy_revoke(journal_t *);
-extern int        jbd2_journal_revoke (handle_t *,
-                               unsigned long, struct buffer_head *);
+extern int        jbd2_journal_revoke (handle_t *, unsigned long long, struct buffer_head *);
 extern int        jbd2_journal_cancel_revoke(handle_t *, struct journal_head *);
 extern void       jbd2_journal_write_revoke_records(journal_t *, transaction_t *);
 
 /* Recovery revoke support */
-extern int     jbd2_journal_set_revoke(journal_t *, unsigned long, tid_t);
-extern int     jbd2_journal_test_revoke(journal_t *, unsigned long, tid_t);
+extern int     jbd2_journal_set_revoke(journal_t *, unsigned long long, tid_t);
+extern int     jbd2_journal_test_revoke(journal_t *, unsigned long long, tid_t);
 extern void    jbd2_journal_clear_revoke(journal_t *);
 extern void    jbd2_journal_switch_revoke_table(journal_t *journal);
 
@@ -1052,6 +1060,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