ReactOS  0.4.15-dev-994-ga9f6032
ext3_jbd.h File Reference
#include <linux/fs.h>
#include <linux/jbd.h>
#include <linux/ext3_fs.h>
Include dependency graph for ext3_jbd.h:

Go to the source code of this file.

Macros

#define EXT3_JOURNAL(inode)   (EXT3_SB((inode)->i_sb)->s_journal)
 
#define EXT3_SINGLEDATA_TRANS_BLOCKS   8U
 
#define EXT3_XATTR_TRANS_BLOCKS   6U
 
#define EXT3_DATA_TRANS_BLOCKS(sb)
 
#define EXT3_DELETE_TRANS_BLOCKS(sb)   (2 * EXT3_DATA_TRANS_BLOCKS(sb) + 64)
 
#define EXT3_MAX_TRANS_DATA   64U
 
#define EXT3_RESERVE_TRANS_BLOCKS   12U
 
#define EXT3_INDEX_EXTRA_TRANS_BLOCKS   8
 
#define EXT3_QUOTA_TRANS_BLOCKS(sb)   0
 
#define EXT3_QUOTA_INIT_BLOCKS(sb)   0
 
#define EXT3_QUOTA_DEL_BLOCKS(sb)   0
 
#define ext3_journal_get_undo_access(handle, bh)   __ext3_journal_get_undo_access(__FUNCTION__, (handle), (bh))
 
#define ext3_journal_get_write_access(handle, bh)   __ext3_journal_get_write_access(__FUNCTION__, (handle), (bh))
 
#define ext3_journal_revoke(handle, blocknr, bh)   __ext3_journal_revoke(__FUNCTION__, (handle), (blocknr), (bh))
 
#define ext3_journal_get_create_access(handle, bh)   __ext3_journal_get_create_access(__FUNCTION__, (handle), (bh))
 
#define ext3_journal_dirty_metadata(handle, bh)   __ext3_journal_dirty_metadata(__FUNCTION__, (handle), (bh))
 
#define ext3_journal_forget(handle, bh)   __ext3_journal_forget(__FUNCTION__, (handle), (bh))
 
#define ext3_journal_stop(handle)   __ext3_journal_stop(__FUNCTION__, (handle))
 

Functions

int ext3_mark_iloc_dirty (handle_t *handle, struct inode *inode, struct ext3_iloc *iloc)
 
int ext3_reserve_inode_write (handle_t *handle, struct inode *inode, struct ext3_iloc *iloc)
 
int ext3_mark_inode_dirty (handle_t *handle, struct inode *inode)
 
static void ext3_journal_release_buffer (handle_t *handle, struct buffer_head *bh)
 
void ext3_journal_abort_handle (const char *caller, const char *err_fn, struct buffer_head *bh, handle_t *handle, int err)
 
int __ext3_journal_get_undo_access (const char *where, handle_t *handle, struct buffer_head *bh)
 
int __ext3_journal_get_write_access (const char *where, handle_t *handle, struct buffer_head *bh)
 
int __ext3_journal_forget (const char *where, handle_t *handle, struct buffer_head *bh)
 
int __ext3_journal_revoke (const char *where, handle_t *handle, unsigned long blocknr, struct buffer_head *bh)
 
int __ext3_journal_get_create_access (const char *where, handle_t *handle, struct buffer_head *bh)
 
int __ext3_journal_dirty_metadata (const char *where, handle_t *handle, struct buffer_head *bh)
 
int ext3_journal_dirty_data (handle_t *handle, struct buffer_head *bh)
 
handle_text3_journal_start_sb (struct super_block *sb, int nblocks)
 
int __ext3_journal_stop (const char *where, handle_t *handle)
 
static handle_text3_journal_start (struct inode *inode, int nblocks)
 
static handle_text3_journal_current_handle (void)
 
static int ext3_journal_extend (handle_t *handle, int nblocks)
 
static int ext3_journal_restart (handle_t *handle, int nblocks)
 
static int ext3_journal_blocks_per_page (struct inode *inode)
 
static int ext3_journal_force_commit (journal_t *journal)
 
int ext3_force_commit (struct super_block *sb)
 
static int ext3_should_journal_data (struct inode *inode)
 
static int ext3_should_order_data (struct inode *inode)
 
static int ext3_should_writeback_data (struct inode *inode)
 

Macro Definition Documentation

◆ EXT3_DATA_TRANS_BLOCKS

#define EXT3_DATA_TRANS_BLOCKS (   sb)
Value:
EXT3_XATTR_TRANS_BLOCKS - 2 + \
superblock * sb
Definition: btrfs.c:4220
#define EXT3_QUOTA_TRANS_BLOCKS(sb)
Definition: ext3_jbd.h:85
#define EXT3_SINGLEDATA_TRANS_BLOCKS
Definition: ext3_jbd.h:31

Definition at line 45 of file ext3_jbd.h.

◆ EXT3_DELETE_TRANS_BLOCKS

#define EXT3_DELETE_TRANS_BLOCKS (   sb)    (2 * EXT3_DATA_TRANS_BLOCKS(sb) + 64)

Definition at line 53 of file ext3_jbd.h.

◆ EXT3_INDEX_EXTRA_TRANS_BLOCKS

#define EXT3_INDEX_EXTRA_TRANS_BLOCKS   8

Definition at line 72 of file ext3_jbd.h.

◆ EXT3_JOURNAL

#define EXT3_JOURNAL (   inode)    (EXT3_SB((inode)->i_sb)->s_journal)

Definition at line 22 of file ext3_jbd.h.

◆ ext3_journal_dirty_metadata

#define ext3_journal_dirty_metadata (   handle,
  bh 
)    __ext3_journal_dirty_metadata(__FUNCTION__, (handle), (bh))

Definition at line 147 of file ext3_jbd.h.

◆ ext3_journal_forget

#define ext3_journal_forget (   handle,
  bh 
)    __ext3_journal_forget(__FUNCTION__, (handle), (bh))

Definition at line 149 of file ext3_jbd.h.

◆ ext3_journal_get_create_access

#define ext3_journal_get_create_access (   handle,
  bh 
)    __ext3_journal_get_create_access(__FUNCTION__, (handle), (bh))

Definition at line 145 of file ext3_jbd.h.

◆ ext3_journal_get_undo_access

#define ext3_journal_get_undo_access (   handle,
  bh 
)    __ext3_journal_get_undo_access(__FUNCTION__, (handle), (bh))

Definition at line 139 of file ext3_jbd.h.

◆ ext3_journal_get_write_access

#define ext3_journal_get_write_access (   handle,
  bh 
)    __ext3_journal_get_write_access(__FUNCTION__, (handle), (bh))

Definition at line 141 of file ext3_jbd.h.

◆ ext3_journal_revoke

#define ext3_journal_revoke (   handle,
  blocknr,
  bh 
)    __ext3_journal_revoke(__FUNCTION__, (handle), (blocknr), (bh))

Definition at line 143 of file ext3_jbd.h.

◆ ext3_journal_stop

#define ext3_journal_stop (   handle)    __ext3_journal_stop(__FUNCTION__, (handle))

Definition at line 162 of file ext3_jbd.h.

◆ EXT3_MAX_TRANS_DATA

#define EXT3_MAX_TRANS_DATA   64U

Definition at line 61 of file ext3_jbd.h.

◆ EXT3_QUOTA_DEL_BLOCKS

#define EXT3_QUOTA_DEL_BLOCKS (   sb)    0

Definition at line 87 of file ext3_jbd.h.

◆ EXT3_QUOTA_INIT_BLOCKS

#define EXT3_QUOTA_INIT_BLOCKS (   sb)    0

Definition at line 86 of file ext3_jbd.h.

◆ EXT3_QUOTA_TRANS_BLOCKS

#define EXT3_QUOTA_TRANS_BLOCKS (   sb)    0

Definition at line 85 of file ext3_jbd.h.

◆ EXT3_RESERVE_TRANS_BLOCKS

#define EXT3_RESERVE_TRANS_BLOCKS   12U

Definition at line 70 of file ext3_jbd.h.

◆ EXT3_SINGLEDATA_TRANS_BLOCKS

#define EXT3_SINGLEDATA_TRANS_BLOCKS   8U

Definition at line 31 of file ext3_jbd.h.

◆ EXT3_XATTR_TRANS_BLOCKS

#define EXT3_XATTR_TRANS_BLOCKS   6U

Definition at line 37 of file ext3_jbd.h.

Function Documentation

◆ __ext3_journal_dirty_metadata()

int __ext3_journal_dirty_metadata ( const char where,
handle_t handle,
struct buffer_head bh 
)

◆ __ext3_journal_forget()

int __ext3_journal_forget ( const char where,
handle_t handle,
struct buffer_head bh 
)

◆ __ext3_journal_get_create_access()

int __ext3_journal_get_create_access ( const char where,
handle_t handle,
struct buffer_head bh 
)

◆ __ext3_journal_get_undo_access()

int __ext3_journal_get_undo_access ( const char where,
handle_t handle,
struct buffer_head bh 
)

◆ __ext3_journal_get_write_access()

int __ext3_journal_get_write_access ( const char where,
handle_t handle,
struct buffer_head bh 
)

◆ __ext3_journal_revoke()

int __ext3_journal_revoke ( const char where,
handle_t handle,
unsigned long  blocknr,
struct buffer_head bh 
)

◆ __ext3_journal_stop()

int __ext3_journal_stop ( const char where,
handle_t handle 
)

◆ ext3_force_commit()

int ext3_force_commit ( struct super_block sb)

◆ ext3_journal_abort_handle()

void ext3_journal_abort_handle ( const char caller,
const char err_fn,
struct buffer_head bh,
handle_t handle,
int  err 
)

◆ ext3_journal_blocks_per_page()

static int ext3_journal_blocks_per_page ( struct inode inode)
inlinestatic

Definition at line 180 of file ext3_jbd.h.

181 {
183 }
Definition: fs.h:78
int journal_blocks_per_page(struct inode *inode)
Definition: replay.c:207

◆ ext3_journal_current_handle()

static handle_t* ext3_journal_current_handle ( void  )
inlinestatic

Definition at line 165 of file ext3_jbd.h.

166 {
167  return journal_current_handle();
168 }

◆ ext3_journal_dirty_data()

int ext3_journal_dirty_data ( handle_t handle,
struct buffer_head bh 
)

◆ ext3_journal_extend()

static int ext3_journal_extend ( handle_t handle,
int  nblocks 
)
inlinestatic

Definition at line 170 of file ext3_jbd.h.

171 {
172  return journal_extend(handle, nblocks);
173 }

◆ ext3_journal_force_commit()

static int ext3_journal_force_commit ( journal_t *  journal)
inlinestatic

Definition at line 185 of file ext3_jbd.h.

186 {
187  return journal_force_commit(journal);
188 }

◆ ext3_journal_release_buffer()

static void ext3_journal_release_buffer ( handle_t handle,
struct buffer_head bh 
)
inlinestatic

Definition at line 112 of file ext3_jbd.h.

114 {
116 }
void journal_release_buffer(handle_t *handle, struct buffer_head *bh)
Definition: replay.c:1425

◆ ext3_journal_restart()

static int ext3_journal_restart ( handle_t handle,
int  nblocks 
)
inlinestatic

Definition at line 175 of file ext3_jbd.h.

176 {
177  return journal_restart(handle, nblocks);
178 }

◆ ext3_journal_start()

static handle_t* ext3_journal_start ( struct inode inode,
int  nblocks 
)
inlinestatic

Definition at line 157 of file ext3_jbd.h.

158 {
159  return ext3_journal_start_sb(inode->i_sb, nblocks);
160 }
handle_t * ext3_journal_start_sb(struct super_block *sb, int nblocks)
Definition: fs.h:78
struct super_block * i_sb
Definition: fs.h:96

◆ ext3_journal_start_sb()

handle_t* ext3_journal_start_sb ( struct super_block sb,
int  nblocks 
)

Referenced by ext3_journal_start().

◆ ext3_mark_iloc_dirty()

int ext3_mark_iloc_dirty ( handle_t handle,
struct inode inode,
struct ext3_iloc *  iloc 
)

◆ ext3_mark_inode_dirty()

int ext3_mark_inode_dirty ( handle_t handle,
struct inode inode 
)

◆ ext3_reserve_inode_write()

int ext3_reserve_inode_write ( handle_t handle,
struct inode inode,
struct ext3_iloc *  iloc 
)

◆ ext3_should_journal_data()

static int ext3_should_journal_data ( struct inode inode)
inlinestatic

Definition at line 193 of file ext3_jbd.h.

194 {
195  if (!S_ISREG(inode->i_mode))
196  return 1;
197  if (test_opt(inode->i_sb, DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA)
198  return 1;
199  if (EXT3_I(inode)->i_flags & EXT3_JOURNAL_DATA_FL)
200  return 1;
201  return 0;
202 }
#define EXT3_JOURNAL_DATA_FL
Definition: ext3_fs.h:222
umode_t i_mode
Definition: fs.h:87
Definition: fs.h:78
#define test_opt(sb, opt)
Definition: ext2_fs.h:327
struct super_block * i_sb
Definition: fs.h:96
#define S_ISREG(mode)
Definition: various.h:17
#define EXT3_MOUNT_JOURNAL_DATA
Definition: ext3_fs.h:437

◆ ext3_should_order_data()

static int ext3_should_order_data ( struct inode inode)
inlinestatic

Definition at line 204 of file ext3_jbd.h.

205 {
206  if (!S_ISREG(inode->i_mode))
207  return 0;
208  if (EXT3_I(inode)->i_flags & EXT3_JOURNAL_DATA_FL)
209  return 0;
210  if (test_opt(inode->i_sb, DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA)
211  return 1;
212  return 0;
213 }
#define EXT3_MOUNT_ORDERED_DATA
Definition: ext3_fs.h:438
#define EXT3_JOURNAL_DATA_FL
Definition: ext3_fs.h:222
umode_t i_mode
Definition: fs.h:87
Definition: fs.h:78
#define test_opt(sb, opt)
Definition: ext2_fs.h:327
struct super_block * i_sb
Definition: fs.h:96
#define S_ISREG(mode)
Definition: various.h:17

◆ ext3_should_writeback_data()

static int ext3_should_writeback_data ( struct inode inode)
inlinestatic

Definition at line 215 of file ext3_jbd.h.

216 {
217  if (!S_ISREG(inode->i_mode))
218  return 0;
219  if (EXT3_I(inode)->i_flags & EXT3_JOURNAL_DATA_FL)
220  return 0;
221  if (test_opt(inode->i_sb, DATA_FLAGS) == EXT3_MOUNT_WRITEBACK_DATA)
222  return 1;
223  return 0;
224 }
#define EXT3_JOURNAL_DATA_FL
Definition: ext3_fs.h:222
umode_t i_mode
Definition: fs.h:87
Definition: fs.h:78
#define EXT3_MOUNT_WRITEBACK_DATA
Definition: ext3_fs.h:439
#define test_opt(sb, opt)
Definition: ext2_fs.h:327
struct super_block * i_sb
Definition: fs.h:96
#define S_ISREG(mode)
Definition: various.h:17