15 #ifndef _LINUX_EXT3_JBD_H 16 #define _LINUX_EXT3_JBD_H 19 #include <linux/jbd.h> 22 #define EXT3_JOURNAL(inode) (EXT3_SB((inode)->i_sb)->s_journal) 31 #define EXT3_SINGLEDATA_TRANS_BLOCKS 8U 37 #define EXT3_XATTR_TRANS_BLOCKS 6U 45 #define EXT3_DATA_TRANS_BLOCKS(sb) (EXT3_SINGLEDATA_TRANS_BLOCKS + \ 46 EXT3_XATTR_TRANS_BLOCKS - 2 + \ 47 2*EXT3_QUOTA_TRANS_BLOCKS(sb)) 53 #define EXT3_DELETE_TRANS_BLOCKS(sb) (2 * EXT3_DATA_TRANS_BLOCKS(sb) + 64) 61 #define EXT3_MAX_TRANS_DATA 64U 70 #define EXT3_RESERVE_TRANS_BLOCKS 12U 72 #define EXT3_INDEX_EXTRA_TRANS_BLOCKS 8 77 #define EXT3_QUOTA_TRANS_BLOCKS(sb) (test_opt(sb, QUOTA) ? 2 : 0) 80 #define EXT3_QUOTA_INIT_BLOCKS(sb) (test_opt(sb, QUOTA) ? (DQUOT_INIT_ALLOC*\ 81 (EXT3_SINGLEDATA_TRANS_BLOCKS-3)+3+DQUOT_INIT_REWRITE) : 0) 82 #define EXT3_QUOTA_DEL_BLOCKS(sb) (test_opt(sb, QUOTA) ? (DQUOT_DEL_ALLOC*\ 83 (EXT3_SINGLEDATA_TRANS_BLOCKS-3)+3+DQUOT_DEL_REWRITE) : 0) 85 #define EXT3_QUOTA_TRANS_BLOCKS(sb) 0 86 #define EXT3_QUOTA_INIT_BLOCKS(sb) 0 87 #define EXT3_QUOTA_DEL_BLOCKS(sb) 0 93 struct ext3_iloc *iloc);
101 struct ext3_iloc *iloc);
139 #define ext3_journal_get_undo_access(handle, bh) \ 140 __ext3_journal_get_undo_access(__FUNCTION__, (handle), (bh)) 141 #define ext3_journal_get_write_access(handle, bh) \ 142 __ext3_journal_get_write_access(__FUNCTION__, (handle), (bh)) 143 #define ext3_journal_revoke(handle, blocknr, bh) \ 144 __ext3_journal_revoke(__FUNCTION__, (handle), (blocknr), (bh)) 145 #define ext3_journal_get_create_access(handle, bh) \ 146 __ext3_journal_get_create_access(__FUNCTION__, (handle), (bh)) 147 #define ext3_journal_dirty_metadata(handle, bh) \ 148 __ext3_journal_dirty_metadata(__FUNCTION__, (handle), (bh)) 149 #define ext3_journal_forget(handle, bh) \ 150 __ext3_journal_forget(__FUNCTION__, (handle), (bh)) 162 #define ext3_journal_stop(handle) \ 163 __ext3_journal_stop(__FUNCTION__, (handle)) 167 return journal_current_handle();
172 return journal_extend(
handle, nblocks);
177 return journal_restart(
handle, nblocks);
187 return journal_force_commit(journal);
int ext3_force_commit(struct super_block *sb)
int ext3_reserve_inode_write(handle_t *handle, struct inode *inode, struct ext3_iloc *iloc)
#define EXT3_MOUNT_ORDERED_DATA
void journal_release_buffer(handle_t *handle, struct buffer_head *bh)
#define EXT3_JOURNAL_DATA_FL
handle_t * ext3_journal_start_sb(struct super_block *sb, int nblocks)
int __ext3_journal_get_write_access(const char *where, handle_t *handle, struct buffer_head *bh)
int __ext3_journal_get_undo_access(const char *where, handle_t *handle, struct buffer_head *bh)
static void ext3_journal_release_buffer(handle_t *handle, struct buffer_head *bh)
int journal_blocks_per_page(struct inode *inode)
static int ext3_should_journal_data(struct inode *inode)
int __ext3_journal_get_create_access(const char *where, handle_t *handle, struct buffer_head *bh)
static int ext3_journal_blocks_per_page(struct inode *inode)
int __ext3_journal_dirty_metadata(const char *where, handle_t *handle, struct buffer_head *bh)
static handle_t * ext3_journal_current_handle(void)
static int ext3_should_order_data(struct inode *inode)
int __ext3_journal_stop(const char *where, handle_t *handle)
static handle_t * ext3_journal_start(struct inode *inode, int nblocks)
int __ext3_journal_revoke(const char *where, handle_t *handle, unsigned long blocknr, struct buffer_head *bh)
int ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh)
static int ext3_should_writeback_data(struct inode *inode)
void ext3_journal_abort_handle(const char *caller, const char *err_fn, struct buffer_head *bh, handle_t *handle, int err)
int ext3_mark_inode_dirty(handle_t *handle, struct inode *inode)
#define EXT3_MOUNT_WRITEBACK_DATA
static int ext3_journal_extend(handle_t *handle, int nblocks)
#define test_opt(sb, opt)
static int ext3_journal_force_commit(journal_t *journal)
int __ext3_journal_forget(const char *where, handle_t *handle, struct buffer_head *bh)
struct super_block * i_sb
int ext3_mark_iloc_dirty(handle_t *handle, struct inode *inode, struct ext3_iloc *iloc)
#define EXT3_MOUNT_JOURNAL_DATA
static int ext3_journal_restart(handle_t *handle, int nblocks)