aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMingming Cao <cmm@us.ibm.com>2006-10-11 04:20:59 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 14:14:15 -0400
commitf7f4bccb729844a0fa873e224e3a6f7eeed095bb (patch)
treeb5b8ce65b5c17b4a7d45e43a3530f2cc977fb894 /include/linux
parent470decc613ab2048b619a01028072d932d9086ee (diff)
[PATCH] jbd2: rename jbd2 symbols to avoid duplication of jbd symbols
Mingming Cao originally did this work, and Shaggy reproduced it using some scripts from her. Signed-off-by: Mingming Cao <cmm@us.ibm.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/ext4_jbd2.h26
-rw-r--r--include/linux/jbd2.h248
2 files changed, 137 insertions, 137 deletions
diff --git a/include/linux/ext4_jbd2.h b/include/linux/ext4_jbd2.h
index 3dbf6c779037..99d37557cbb4 100644
--- a/include/linux/ext4_jbd2.h
+++ b/include/linux/ext4_jbd2.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/include/linux/ext4_jbd.h 2 * linux/include/linux/ext4_jbd2.h
3 * 3 *
4 * Written by Stephen C. Tweedie <sct@redhat.com>, 1999 4 * Written by Stephen C. Tweedie <sct@redhat.com>, 1999
5 * 5 *
@@ -16,7 +16,7 @@
16#define _LINUX_EXT4_JBD_H 16#define _LINUX_EXT4_JBD_H
17 17
18#include <linux/fs.h> 18#include <linux/fs.h>
19#include <linux/jbd.h> 19#include <linux/jbd2.h>
20#include <linux/ext4_fs.h> 20#include <linux/ext4_fs.h>
21 21
22#define EXT4_JOURNAL(inode) (EXT4_SB((inode)->i_sb)->s_journal) 22#define EXT4_JOURNAL(inode) (EXT4_SB((inode)->i_sb)->s_journal)
@@ -116,7 +116,7 @@ static inline int
116__ext4_journal_get_undo_access(const char *where, handle_t *handle, 116__ext4_journal_get_undo_access(const char *where, handle_t *handle,
117 struct buffer_head *bh) 117 struct buffer_head *bh)
118{ 118{
119 int err = journal_get_undo_access(handle, bh); 119 int err = jbd2_journal_get_undo_access(handle, bh);
120 if (err) 120 if (err)
121 ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); 121 ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
122 return err; 122 return err;
@@ -126,7 +126,7 @@ static inline int
126__ext4_journal_get_write_access(const char *where, handle_t *handle, 126__ext4_journal_get_write_access(const char *where, handle_t *handle,
127 struct buffer_head *bh) 127 struct buffer_head *bh)
128{ 128{
129 int err = journal_get_write_access(handle, bh); 129 int err = jbd2_journal_get_write_access(handle, bh);
130 if (err) 130 if (err)
131 ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); 131 ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
132 return err; 132 return err;
@@ -135,13 +135,13 @@ __ext4_journal_get_write_access(const char *where, handle_t *handle,
135static inline void 135static inline void
136ext4_journal_release_buffer(handle_t *handle, struct buffer_head *bh) 136ext4_journal_release_buffer(handle_t *handle, struct buffer_head *bh)
137{ 137{
138 journal_release_buffer(handle, bh); 138 jbd2_journal_release_buffer(handle, bh);
139} 139}
140 140
141static inline int 141static inline int
142__ext4_journal_forget(const char *where, handle_t *handle, struct buffer_head *bh) 142__ext4_journal_forget(const char *where, handle_t *handle, struct buffer_head *bh)
143{ 143{
144 int err = journal_forget(handle, bh); 144 int err = jbd2_journal_forget(handle, bh);
145 if (err) 145 if (err)
146 ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); 146 ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
147 return err; 147 return err;
@@ -151,7 +151,7 @@ static inline int
151__ext4_journal_revoke(const char *where, handle_t *handle, 151__ext4_journal_revoke(const char *where, handle_t *handle,
152 unsigned long blocknr, struct buffer_head *bh) 152 unsigned long blocknr, struct buffer_head *bh)
153{ 153{
154 int err = journal_revoke(handle, blocknr, bh); 154 int err = jbd2_journal_revoke(handle, blocknr, bh);
155 if (err) 155 if (err)
156 ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); 156 ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
157 return err; 157 return err;
@@ -161,7 +161,7 @@ static inline int
161__ext4_journal_get_create_access(const char *where, 161__ext4_journal_get_create_access(const char *where,
162 handle_t *handle, struct buffer_head *bh) 162 handle_t *handle, struct buffer_head *bh)
163{ 163{
164 int err = journal_get_create_access(handle, bh); 164 int err = jbd2_journal_get_create_access(handle, bh);
165 if (err) 165 if (err)
166 ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); 166 ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
167 return err; 167 return err;
@@ -171,7 +171,7 @@ static inline int
171__ext4_journal_dirty_metadata(const char *where, 171__ext4_journal_dirty_metadata(const char *where,
172 handle_t *handle, struct buffer_head *bh) 172 handle_t *handle, struct buffer_head *bh)
173{ 173{
174 int err = journal_dirty_metadata(handle, bh); 174 int err = jbd2_journal_dirty_metadata(handle, bh);
175 if (err) 175 if (err)
176 ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err); 176 ext4_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
177 return err; 177 return err;
@@ -211,22 +211,22 @@ static inline handle_t *ext4_journal_current_handle(void)
211 211
212static inline int ext4_journal_extend(handle_t *handle, int nblocks) 212static inline int ext4_journal_extend(handle_t *handle, int nblocks)
213{ 213{
214 return journal_extend(handle, nblocks); 214 return jbd2_journal_extend(handle, nblocks);
215} 215}
216 216
217static inline int ext4_journal_restart(handle_t *handle, int nblocks) 217static inline int ext4_journal_restart(handle_t *handle, int nblocks)
218{ 218{
219 return journal_restart(handle, nblocks); 219 return jbd2_journal_restart(handle, nblocks);
220} 220}
221 221
222static inline int ext4_journal_blocks_per_page(struct inode *inode) 222static inline int ext4_journal_blocks_per_page(struct inode *inode)
223{ 223{
224 return journal_blocks_per_page(inode); 224 return jbd2_journal_blocks_per_page(inode);
225} 225}
226 226
227static inline int ext4_journal_force_commit(journal_t *journal) 227static inline int ext4_journal_force_commit(journal_t *journal)
228{ 228{
229 return journal_force_commit(journal); 229 return jbd2_journal_force_commit(journal);
230} 230}
231 231
232/* super.c */ 232/* super.c */
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index fe89444b1c6f..3251f7abb57d 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/include/linux/jbd.h 2 * linux/include/linux/jbd2.h
3 * 3 *
4 * Written by Stephen C. Tweedie <sct@redhat.com> 4 * Written by Stephen C. Tweedie <sct@redhat.com>
5 * 5 *
@@ -19,7 +19,7 @@
19/* Allow this file to be included directly into e2fsprogs */ 19/* Allow this file to be included directly into e2fsprogs */
20#ifndef __KERNEL__ 20#ifndef __KERNEL__
21#include "jfs_compat.h" 21#include "jfs_compat.h"
22#define JFS_DEBUG 22#define JBD2_DEBUG
23#define jfs_debug jbd_debug 23#define jfs_debug jbd_debug
24#else 24#else
25 25
@@ -57,11 +57,11 @@
57 * CONFIG_JBD_DEBUG is on. 57 * CONFIG_JBD_DEBUG is on.
58 */ 58 */
59#define JBD_EXPENSIVE_CHECKING 59#define JBD_EXPENSIVE_CHECKING
60extern int journal_enable_debug; 60extern int jbd2_journal_enable_debug;
61 61
62#define jbd_debug(n, f, a...) \ 62#define jbd_debug(n, f, a...) \
63 do { \ 63 do { \
64 if ((n) <= journal_enable_debug) { \ 64 if ((n) <= jbd2_journal_enable_debug) { \
65 printk (KERN_DEBUG "(%s, %d): %s: ", \ 65 printk (KERN_DEBUG "(%s, %d): %s: ", \
66 __FILE__, __LINE__, __FUNCTION__); \ 66 __FILE__, __LINE__, __FUNCTION__); \
67 printk (f, ## a); \ 67 printk (f, ## a); \
@@ -71,16 +71,16 @@ extern int journal_enable_debug;
71#define jbd_debug(f, a...) /**/ 71#define jbd_debug(f, a...) /**/
72#endif 72#endif
73 73
74extern void * __jbd_kmalloc (const char *where, size_t size, gfp_t flags, int retry); 74extern void * __jbd2_kmalloc (const char *where, size_t size, gfp_t flags, int retry);
75extern void * jbd_slab_alloc(size_t size, gfp_t flags); 75extern void * jbd2_slab_alloc(size_t size, gfp_t flags);
76extern void jbd_slab_free(void *ptr, size_t size); 76extern void jbd2_slab_free(void *ptr, size_t size);
77 77
78#define jbd_kmalloc(size, flags) \ 78#define jbd_kmalloc(size, flags) \
79 __jbd_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry) 79 __jbd2_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry)
80#define jbd_rep_kmalloc(size, flags) \ 80#define jbd_rep_kmalloc(size, flags) \
81 __jbd_kmalloc(__FUNCTION__, (size), (flags), 1) 81 __jbd2_kmalloc(__FUNCTION__, (size), (flags), 1)
82 82
83#define JFS_MIN_JOURNAL_BLOCKS 1024 83#define JBD2_MIN_JOURNAL_BLOCKS 1024
84 84
85#ifdef __KERNEL__ 85#ifdef __KERNEL__
86 86
@@ -122,7 +122,7 @@ typedef struct journal_s journal_t; /* Journal control structure */
122 * Internal structures used by the logging mechanism: 122 * Internal structures used by the logging mechanism:
123 */ 123 */
124 124
125#define JFS_MAGIC_NUMBER 0xc03b3998U /* The first 4 bytes of /dev/random! */ 125#define JBD2_MAGIC_NUMBER 0xc03b3998U /* The first 4 bytes of /dev/random! */
126 126
127/* 127/*
128 * On-disk structures 128 * On-disk structures
@@ -132,11 +132,11 @@ typedef struct journal_s journal_t; /* Journal control structure */
132 * Descriptor block types: 132 * Descriptor block types:
133 */ 133 */
134 134
135#define JFS_DESCRIPTOR_BLOCK 1 135#define JBD2_DESCRIPTOR_BLOCK 1
136#define JFS_COMMIT_BLOCK 2 136#define JBD2_COMMIT_BLOCK 2
137#define JFS_SUPERBLOCK_V1 3 137#define JBD2_SUPERBLOCK_V1 3
138#define JFS_SUPERBLOCK_V2 4 138#define JBD2_SUPERBLOCK_V2 4
139#define JFS_REVOKE_BLOCK 5 139#define JBD2_REVOKE_BLOCK 5
140 140
141/* 141/*
142 * Standard header for all descriptor blocks: 142 * Standard header for all descriptor blocks:
@@ -162,18 +162,18 @@ typedef struct journal_block_tag_s
162 * The revoke descriptor: used on disk to describe a series of blocks to 162 * The revoke descriptor: used on disk to describe a series of blocks to
163 * be revoked from the log 163 * be revoked from the log
164 */ 164 */
165typedef struct journal_revoke_header_s 165typedef struct jbd2_journal_revoke_header_s
166{ 166{
167 journal_header_t r_header; 167 journal_header_t r_header;
168 __be32 r_count; /* Count of bytes used in the block */ 168 __be32 r_count; /* Count of bytes used in the block */
169} journal_revoke_header_t; 169} jbd2_journal_revoke_header_t;
170 170
171 171
172/* Definitions for the journal tag flags word: */ 172/* Definitions for the journal tag flags word: */
173#define JFS_FLAG_ESCAPE 1 /* on-disk block is escaped */ 173#define JBD2_FLAG_ESCAPE 1 /* on-disk block is escaped */
174#define JFS_FLAG_SAME_UUID 2 /* block has same uuid as previous */ 174#define JBD2_FLAG_SAME_UUID 2 /* block has same uuid as previous */
175#define JFS_FLAG_DELETED 4 /* block deleted by this transaction */ 175#define JBD2_FLAG_DELETED 4 /* block deleted by this transaction */
176#define JFS_FLAG_LAST_TAG 8 /* last tag in this descriptor block */ 176#define JBD2_FLAG_LAST_TAG 8 /* last tag in this descriptor block */
177 177
178 178
179/* 179/*
@@ -196,7 +196,7 @@ typedef struct journal_superblock_s
196 __be32 s_start; /* blocknr of start of log */ 196 __be32 s_start; /* blocknr of start of log */
197 197
198/* 0x0020 */ 198/* 0x0020 */
199 /* Error value, as set by journal_abort(). */ 199 /* Error value, as set by jbd2_journal_abort(). */
200 __be32 s_errno; 200 __be32 s_errno;
201 201
202/* 0x0024 */ 202/* 0x0024 */
@@ -224,22 +224,22 @@ typedef struct journal_superblock_s
224/* 0x0400 */ 224/* 0x0400 */
225} journal_superblock_t; 225} journal_superblock_t;
226 226
227#define JFS_HAS_COMPAT_FEATURE(j,mask) \ 227#define JBD2_HAS_COMPAT_FEATURE(j,mask) \
228 ((j)->j_format_version >= 2 && \ 228 ((j)->j_format_version >= 2 && \
229 ((j)->j_superblock->s_feature_compat & cpu_to_be32((mask)))) 229 ((j)->j_superblock->s_feature_compat & cpu_to_be32((mask))))
230#define JFS_HAS_RO_COMPAT_FEATURE(j,mask) \ 230#define JBD2_HAS_RO_COMPAT_FEATURE(j,mask) \
231 ((j)->j_format_version >= 2 && \ 231 ((j)->j_format_version >= 2 && \
232 ((j)->j_superblock->s_feature_ro_compat & cpu_to_be32((mask)))) 232 ((j)->j_superblock->s_feature_ro_compat & cpu_to_be32((mask))))
233#define JFS_HAS_INCOMPAT_FEATURE(j,mask) \ 233#define JBD2_HAS_INCOMPAT_FEATURE(j,mask) \
234 ((j)->j_format_version >= 2 && \ 234 ((j)->j_format_version >= 2 && \
235 ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask)))) 235 ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))
236 236
237#define JFS_FEATURE_INCOMPAT_REVOKE 0x00000001 237#define JBD2_FEATURE_INCOMPAT_REVOKE 0x00000001
238 238
239/* Features known to this kernel version: */ 239/* Features known to this kernel version: */
240#define JFS_KNOWN_COMPAT_FEATURES 0 240#define JBD2_KNOWN_COMPAT_FEATURES 0
241#define JFS_KNOWN_ROCOMPAT_FEATURES 0 241#define JBD2_KNOWN_ROCOMPAT_FEATURES 0
242#define JFS_KNOWN_INCOMPAT_FEATURES JFS_FEATURE_INCOMPAT_REVOKE 242#define JBD2_KNOWN_INCOMPAT_FEATURES JBD2_FEATURE_INCOMPAT_REVOKE
243 243
244#ifdef __KERNEL__ 244#ifdef __KERNEL__
245 245
@@ -359,7 +359,7 @@ static inline void jbd_unlock_bh_journal_head(struct buffer_head *bh)
359 bit_spin_unlock(BH_JournalHead, &bh->b_state); 359 bit_spin_unlock(BH_JournalHead, &bh->b_state);
360} 360}
361 361
362struct jbd_revoke_table_s; 362struct jbd2_revoke_table_s;
363 363
364/** 364/**
365 * struct handle_s - The handle_s type is the concrete type associated with 365 * struct handle_s - The handle_s type is the concrete type associated with
@@ -445,7 +445,7 @@ struct transaction_s
445 445
446 /* 446 /*
447 * Transaction's current state 447 * Transaction's current state
448 * [no locking - only kjournald alters this] 448 * [no locking - only kjournald2 alters this]
449 * FIXME: needs barriers 449 * FIXME: needs barriers
450 * KLUDGE: [use j_state_lock] 450 * KLUDGE: [use j_state_lock]
451 */ 451 */
@@ -621,7 +621,7 @@ struct transaction_s
621 * @j_revoke: The revoke table - maintains the list of revoked blocks in the 621 * @j_revoke: The revoke table - maintains the list of revoked blocks in the
622 * current transaction. 622 * current transaction.
623 * @j_revoke_table: alternate revoke tables for j_revoke 623 * @j_revoke_table: alternate revoke tables for j_revoke
624 * @j_wbuf: array of buffer_heads for journal_commit_transaction 624 * @j_wbuf: array of buffer_heads for jbd2_journal_commit_transaction
625 * @j_wbufsize: maximum number of buffer_heads allowed in j_wbuf, the 625 * @j_wbufsize: maximum number of buffer_heads allowed in j_wbuf, the
626 * number that will fit in j_blocksize 626 * number that will fit in j_blocksize
627 * @j_last_sync_writer: most recent pid which did a synchronous write 627 * @j_last_sync_writer: most recent pid which did a synchronous write
@@ -805,11 +805,11 @@ struct journal_s
805 * current transaction. [j_revoke_lock] 805 * current transaction. [j_revoke_lock]
806 */ 806 */
807 spinlock_t j_revoke_lock; 807 spinlock_t j_revoke_lock;
808 struct jbd_revoke_table_s *j_revoke; 808 struct jbd2_revoke_table_s *j_revoke;
809 struct jbd_revoke_table_s *j_revoke_table[2]; 809 struct jbd2_revoke_table_s *j_revoke_table[2];
810 810
811 /* 811 /*
812 * array of bhs for journal_commit_transaction 812 * array of bhs for jbd2_journal_commit_transaction
813 */ 813 */
814 struct buffer_head **j_wbuf; 814 struct buffer_head **j_wbuf;
815 int j_wbufsize; 815 int j_wbufsize;
@@ -826,12 +826,12 @@ struct journal_s
826/* 826/*
827 * Journal flag definitions 827 * Journal flag definitions
828 */ 828 */
829#define JFS_UNMOUNT 0x001 /* Journal thread is being destroyed */ 829#define JBD2_UNMOUNT 0x001 /* Journal thread is being destroyed */
830#define JFS_ABORT 0x002 /* Journaling has been aborted for errors. */ 830#define JBD2_ABORT 0x002 /* Journaling has been aborted for errors. */
831#define JFS_ACK_ERR 0x004 /* The errno in the sb has been acked */ 831#define JBD2_ACK_ERR 0x004 /* The errno in the sb has been acked */
832#define JFS_FLUSHED 0x008 /* The journal superblock has been flushed */ 832#define JBD2_FLUSHED 0x008 /* The journal superblock has been flushed */
833#define JFS_LOADED 0x010 /* The journal superblock has been loaded */ 833#define JBD2_LOADED 0x010 /* The journal superblock has been loaded */
834#define JFS_BARRIER 0x020 /* Use IDE barriers */ 834#define JBD2_BARRIER 0x020 /* Use IDE barriers */
835 835
836/* 836/*
837 * Function declarations for the journaling transaction and buffer 837 * Function declarations for the journaling transaction and buffer
@@ -839,31 +839,31 @@ struct journal_s
839 */ 839 */
840 840
841/* Filing buffers */ 841/* Filing buffers */
842extern void __journal_temp_unlink_buffer(struct journal_head *jh); 842extern void __jbd2_journal_temp_unlink_buffer(struct journal_head *jh);
843extern void journal_unfile_buffer(journal_t *, struct journal_head *); 843extern void jbd2_journal_unfile_buffer(journal_t *, struct journal_head *);
844extern void __journal_unfile_buffer(struct journal_head *); 844extern void __jbd2_journal_unfile_buffer(struct journal_head *);
845extern void __journal_refile_buffer(struct journal_head *); 845extern void __jbd2_journal_refile_buffer(struct journal_head *);
846extern void journal_refile_buffer(journal_t *, struct journal_head *); 846extern void jbd2_journal_refile_buffer(journal_t *, struct journal_head *);
847extern void __journal_file_buffer(struct journal_head *, transaction_t *, int); 847extern void __jbd2_journal_file_buffer(struct journal_head *, transaction_t *, int);
848extern void __journal_free_buffer(struct journal_head *bh); 848extern void __journal_free_buffer(struct journal_head *bh);
849extern void journal_file_buffer(struct journal_head *, transaction_t *, int); 849extern void jbd2_journal_file_buffer(struct journal_head *, transaction_t *, int);
850extern void __journal_clean_data_list(transaction_t *transaction); 850extern void __journal_clean_data_list(transaction_t *transaction);
851 851
852/* Log buffer allocation */ 852/* Log buffer allocation */
853extern struct journal_head * journal_get_descriptor_buffer(journal_t *); 853extern struct journal_head * jbd2_journal_get_descriptor_buffer(journal_t *);
854int journal_next_log_block(journal_t *, unsigned long *); 854int jbd2_journal_next_log_block(journal_t *, unsigned long *);
855 855
856/* Commit management */ 856/* Commit management */
857extern void journal_commit_transaction(journal_t *); 857extern void jbd2_journal_commit_transaction(journal_t *);
858 858
859/* Checkpoint list management */ 859/* Checkpoint list management */
860int __journal_clean_checkpoint_list(journal_t *journal); 860int __jbd2_journal_clean_checkpoint_list(journal_t *journal);
861int __journal_remove_checkpoint(struct journal_head *); 861int __jbd2_journal_remove_checkpoint(struct journal_head *);
862void __journal_insert_checkpoint(struct journal_head *, transaction_t *); 862void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *);
863 863
864/* Buffer IO */ 864/* Buffer IO */
865extern int 865extern int
866journal_write_metadata_buffer(transaction_t *transaction, 866jbd2_journal_write_metadata_buffer(transaction_t *transaction,
867 struct journal_head *jh_in, 867 struct journal_head *jh_in,
868 struct journal_head **jh_out, 868 struct journal_head **jh_out,
869 unsigned long blocknr); 869 unsigned long blocknr);
@@ -893,91 +893,91 @@ static inline handle_t *journal_current_handle(void)
893 * Register buffer modifications against the current transaction. 893 * Register buffer modifications against the current transaction.
894 */ 894 */
895 895
896extern handle_t *journal_start(journal_t *, int nblocks); 896extern handle_t *jbd2_journal_start(journal_t *, int nblocks);
897extern int journal_restart (handle_t *, int nblocks); 897extern int jbd2_journal_restart (handle_t *, int nblocks);
898extern int journal_extend (handle_t *, int nblocks); 898extern int jbd2_journal_extend (handle_t *, int nblocks);
899extern int journal_get_write_access(handle_t *, struct buffer_head *); 899extern int jbd2_journal_get_write_access(handle_t *, struct buffer_head *);
900extern int journal_get_create_access (handle_t *, struct buffer_head *); 900extern int jbd2_journal_get_create_access (handle_t *, struct buffer_head *);
901extern int journal_get_undo_access(handle_t *, struct buffer_head *); 901extern int jbd2_journal_get_undo_access(handle_t *, struct buffer_head *);
902extern int journal_dirty_data (handle_t *, struct buffer_head *); 902extern int jbd2_journal_dirty_data (handle_t *, struct buffer_head *);
903extern int journal_dirty_metadata (handle_t *, struct buffer_head *); 903extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *);
904extern void journal_release_buffer (handle_t *, struct buffer_head *); 904extern void jbd2_journal_release_buffer (handle_t *, struct buffer_head *);
905extern int journal_forget (handle_t *, struct buffer_head *); 905extern int jbd2_journal_forget (handle_t *, struct buffer_head *);
906extern void journal_sync_buffer (struct buffer_head *); 906extern void journal_sync_buffer (struct buffer_head *);
907extern void journal_invalidatepage(journal_t *, 907extern void jbd2_journal_invalidatepage(journal_t *,
908 struct page *, unsigned long); 908 struct page *, unsigned long);
909extern int journal_try_to_free_buffers(journal_t *, struct page *, gfp_t); 909extern int jbd2_journal_try_to_free_buffers(journal_t *, struct page *, gfp_t);
910extern int journal_stop(handle_t *); 910extern int jbd2_journal_stop(handle_t *);
911extern int journal_flush (journal_t *); 911extern int jbd2_journal_flush (journal_t *);
912extern void journal_lock_updates (journal_t *); 912extern void jbd2_journal_lock_updates (journal_t *);
913extern void journal_unlock_updates (journal_t *); 913extern void jbd2_journal_unlock_updates (journal_t *);
914 914
915extern journal_t * journal_init_dev(struct block_device *bdev, 915extern journal_t * jbd2_journal_init_dev(struct block_device *bdev,
916 struct block_device *fs_dev, 916 struct block_device *fs_dev,
917 int start, int len, int bsize); 917 int start, int len, int bsize);
918extern journal_t * journal_init_inode (struct inode *); 918extern journal_t * jbd2_journal_init_inode (struct inode *);
919extern int journal_update_format (journal_t *); 919extern int jbd2_journal_update_format (journal_t *);
920extern int journal_check_used_features 920extern int jbd2_journal_check_used_features
921 (journal_t *, unsigned long, unsigned long, unsigned long); 921 (journal_t *, unsigned long, unsigned long, unsigned long);
922extern int journal_check_available_features 922extern int jbd2_journal_check_available_features
923 (journal_t *, unsigned long, unsigned long, unsigned long); 923 (journal_t *, unsigned long, unsigned long, unsigned long);
924extern int journal_set_features 924extern int jbd2_journal_set_features
925 (journal_t *, unsigned long, unsigned long, unsigned long); 925 (journal_t *, unsigned long, unsigned long, unsigned long);
926extern int journal_create (journal_t *); 926extern int jbd2_journal_create (journal_t *);
927extern int journal_load (journal_t *journal); 927extern int jbd2_journal_load (journal_t *journal);
928extern void journal_destroy (journal_t *); 928extern void jbd2_journal_destroy (journal_t *);
929extern int journal_recover (journal_t *journal); 929extern int jbd2_journal_recover (journal_t *journal);
930extern int journal_wipe (journal_t *, int); 930extern int jbd2_journal_wipe (journal_t *, int);
931extern int journal_skip_recovery (journal_t *); 931extern int jbd2_journal_skip_recovery (journal_t *);
932extern void journal_update_superblock (journal_t *, int); 932extern void jbd2_journal_update_superblock (journal_t *, int);
933extern void __journal_abort_hard (journal_t *); 933extern void __jbd2_journal_abort_hard (journal_t *);
934extern void journal_abort (journal_t *, int); 934extern void jbd2_journal_abort (journal_t *, int);
935extern int journal_errno (journal_t *); 935extern int jbd2_journal_errno (journal_t *);
936extern void journal_ack_err (journal_t *); 936extern void jbd2_journal_ack_err (journal_t *);
937extern int journal_clear_err (journal_t *); 937extern int jbd2_journal_clear_err (journal_t *);
938extern int journal_bmap(journal_t *, unsigned long, unsigned long *); 938extern int jbd2_journal_bmap(journal_t *, unsigned long, unsigned long *);
939extern int journal_force_commit(journal_t *); 939extern int jbd2_journal_force_commit(journal_t *);
940 940
941/* 941/*
942 * journal_head management 942 * journal_head management
943 */ 943 */
944struct journal_head *journal_add_journal_head(struct buffer_head *bh); 944struct journal_head *jbd2_journal_add_journal_head(struct buffer_head *bh);
945struct journal_head *journal_grab_journal_head(struct buffer_head *bh); 945struct journal_head *jbd2_journal_grab_journal_head(struct buffer_head *bh);
946void journal_remove_journal_head(struct buffer_head *bh); 946void jbd2_journal_remove_journal_head(struct buffer_head *bh);
947void journal_put_journal_head(struct journal_head *jh); 947void jbd2_journal_put_journal_head(struct journal_head *jh);
948 948
949/* 949/*
950 * handle management 950 * handle management
951 */ 951 */
952extern kmem_cache_t *jbd_handle_cache; 952extern kmem_cache_t *jbd2_handle_cache;
953 953
954static inline handle_t *jbd_alloc_handle(gfp_t gfp_flags) 954static inline handle_t *jbd_alloc_handle(gfp_t gfp_flags)
955{ 955{
956 return kmem_cache_alloc(jbd_handle_cache, gfp_flags); 956 return kmem_cache_alloc(jbd2_handle_cache, gfp_flags);
957} 957}
958 958
959static inline void jbd_free_handle(handle_t *handle) 959static inline void jbd_free_handle(handle_t *handle)
960{ 960{
961 kmem_cache_free(jbd_handle_cache, handle); 961 kmem_cache_free(jbd2_handle_cache, handle);
962} 962}
963 963
964/* Primary revoke support */ 964/* Primary revoke support */
965#define JOURNAL_REVOKE_DEFAULT_HASH 256 965#define JOURNAL_REVOKE_DEFAULT_HASH 256
966extern int journal_init_revoke(journal_t *, int); 966extern int jbd2_journal_init_revoke(journal_t *, int);
967extern void journal_destroy_revoke_caches(void); 967extern void jbd2_journal_destroy_revoke_caches(void);
968extern int journal_init_revoke_caches(void); 968extern int jbd2_journal_init_revoke_caches(void);
969 969
970extern void journal_destroy_revoke(journal_t *); 970extern void jbd2_journal_destroy_revoke(journal_t *);
971extern int journal_revoke (handle_t *, 971extern int jbd2_journal_revoke (handle_t *,
972 unsigned long, struct buffer_head *); 972 unsigned long, struct buffer_head *);
973extern int journal_cancel_revoke(handle_t *, struct journal_head *); 973extern int jbd2_journal_cancel_revoke(handle_t *, struct journal_head *);
974extern void journal_write_revoke_records(journal_t *, transaction_t *); 974extern void jbd2_journal_write_revoke_records(journal_t *, transaction_t *);
975 975
976/* Recovery revoke support */ 976/* Recovery revoke support */
977extern int journal_set_revoke(journal_t *, unsigned long, tid_t); 977extern int jbd2_journal_set_revoke(journal_t *, unsigned long, tid_t);
978extern int journal_test_revoke(journal_t *, unsigned long, tid_t); 978extern int jbd2_journal_test_revoke(journal_t *, unsigned long, tid_t);
979extern void journal_clear_revoke(journal_t *); 979extern void jbd2_journal_clear_revoke(journal_t *);
980extern void journal_switch_revoke_table(journal_t *journal); 980extern void jbd2_journal_switch_revoke_table(journal_t *journal);
981 981
982/* 982/*
983 * The log thread user interface: 983 * The log thread user interface:
@@ -986,17 +986,17 @@ extern void journal_switch_revoke_table(journal_t *journal);
986 * transitions on demand. 986 * transitions on demand.
987 */ 987 */
988 988
989int __log_space_left(journal_t *); /* Called with journal locked */ 989int __jbd2_log_space_left(journal_t *); /* Called with journal locked */
990int log_start_commit(journal_t *journal, tid_t tid); 990int jbd2_log_start_commit(journal_t *journal, tid_t tid);
991int __log_start_commit(journal_t *journal, tid_t tid); 991int __jbd2_log_start_commit(journal_t *journal, tid_t tid);
992int journal_start_commit(journal_t *journal, tid_t *tid); 992int jbd2_journal_start_commit(journal_t *journal, tid_t *tid);
993int journal_force_commit_nested(journal_t *journal); 993int jbd2_journal_force_commit_nested(journal_t *journal);
994int log_wait_commit(journal_t *journal, tid_t tid); 994int jbd2_log_wait_commit(journal_t *journal, tid_t tid);
995int log_do_checkpoint(journal_t *journal); 995int jbd2_log_do_checkpoint(journal_t *journal);
996 996
997void __log_wait_for_space(journal_t *journal); 997void __jbd2_log_wait_for_space(journal_t *journal);
998extern void __journal_drop_transaction(journal_t *, transaction_t *); 998extern void __jbd2_journal_drop_transaction(journal_t *, transaction_t *);
999extern int cleanup_journal_tail(journal_t *); 999extern int jbd2_cleanup_journal_tail(journal_t *);
1000 1000
1001/* Debugging code only: */ 1001/* Debugging code only: */
1002 1002
@@ -1010,7 +1010,7 @@ do { \
1010/* 1010/*
1011 * is_journal_abort 1011 * is_journal_abort
1012 * 1012 *
1013 * Simple test wrapper function to test the JFS_ABORT state flag. This 1013 * Simple test wrapper function to test the JBD2_ABORT state flag. This
1014 * bit, when set, indicates that we have had a fatal error somewhere, 1014 * bit, when set, indicates that we have had a fatal error somewhere,
1015 * either inside the journaling layer or indicated to us by the client 1015 * either inside the journaling layer or indicated to us by the client
1016 * (eg. ext3), and that we and should not commit any further 1016 * (eg. ext3), and that we and should not commit any further
@@ -1019,7 +1019,7 @@ do { \
1019 1019
1020static inline int is_journal_aborted(journal_t *journal) 1020static inline int is_journal_aborted(journal_t *journal)
1021{ 1021{
1022 return journal->j_flags & JFS_ABORT; 1022 return journal->j_flags & JBD2_ABORT;
1023} 1023}
1024 1024
1025static inline int is_handle_aborted(handle_t *handle) 1025static inline int is_handle_aborted(handle_t *handle)
@@ -1029,7 +1029,7 @@ static inline int is_handle_aborted(handle_t *handle)
1029 return is_journal_aborted(handle->h_transaction->t_journal); 1029 return is_journal_aborted(handle->h_transaction->t_journal);
1030} 1030}
1031 1031
1032static inline void journal_abort_handle(handle_t *handle) 1032static inline void jbd2_journal_abort_handle(handle_t *handle)
1033{ 1033{
1034 handle->h_aborted = 1; 1034 handle->h_aborted = 1;
1035} 1035}
@@ -1051,7 +1051,7 @@ static inline int tid_geq(tid_t x, tid_t y)
1051 return (difference >= 0); 1051 return (difference >= 0);
1052} 1052}
1053 1053
1054extern int journal_blocks_per_page(struct inode *inode); 1054extern int jbd2_journal_blocks_per_page(struct inode *inode);
1055 1055
1056/* 1056/*
1057 * Return the minimum number of blocks which must be free in the journal 1057 * Return the minimum number of blocks which must be free in the journal