ReactOS 0.4.16-dev-297-gc569aee
jbd.h File Reference
#include "jfs_compat.h"
Include dependency graph for jbd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  journal_header_s
 
struct  journal_block_tag_s
 
struct  journal_revoke_header_s
 
struct  journal_superblock_s
 

Macros

#define JFS_DEBUG
 
#define jfs_debug   jbd_debug
 
#define JFS_MAGIC_NUMBER   0xc03b3998U /* The first 4 bytes of /dev/random! */
 
#define JFS_DESCRIPTOR_BLOCK   1
 
#define JFS_COMMIT_BLOCK   2
 
#define JFS_SUPERBLOCK_V1   3
 
#define JFS_SUPERBLOCK_V2   4
 
#define JFS_REVOKE_BLOCK   5
 
#define JFS_FLAG_ESCAPE   1 /* on-disk block is escaped */
 
#define JFS_FLAG_SAME_UUID   2 /* block has same uuid as previous */
 
#define JFS_FLAG_DELETED   4 /* block deleted by this transaction */
 
#define JFS_FLAG_LAST_TAG   8 /* last tag in this descriptor block */
 
#define JFS_HAS_COMPAT_FEATURE(j, mask)
 
#define JFS_HAS_RO_COMPAT_FEATURE(j, mask)
 
#define JFS_HAS_INCOMPAT_FEATURE(j, mask)
 
#define JFS_FEATURE_INCOMPAT_REVOKE   0x00000001
 
#define JFS_KNOWN_COMPAT_FEATURES   0
 
#define JFS_KNOWN_ROCOMPAT_FEATURES   0
 
#define JFS_KNOWN_INCOMPAT_FEATURES   JFS_FEATURE_INCOMPAT_REVOKE
 
#define BJ_None   0 /* Not journaled */
 
#define BJ_SyncData   1 /* Normal data: flush before commit */
 
#define BJ_Metadata   2 /* Normal journaled metadata */
 
#define BJ_Forget   3 /* Buffer superseded by this transaction */
 
#define BJ_IO   4 /* Buffer is for temporary IO use */
 
#define BJ_Shadow   5 /* Buffer contents being shadowed to the log */
 
#define BJ_LogCtl   6 /* Buffer contains log descriptors */
 
#define BJ_Reserved   7 /* Buffer is reserved for access by journal */
 
#define BJ_Locked   8 /* Locked for I/O during commit */
 
#define BJ_Types   9
 

Typedefs

typedef struct journal_header_s journal_header_t
 
typedef struct journal_block_tag_s journal_block_tag_t
 
typedef struct journal_revoke_header_s journal_revoke_header_t
 
typedef struct journal_superblock_s journal_superblock_t
 

Functions

static int tid_gt (tid_t x, tid_t y)
 
static int tid_geq (tid_t x, tid_t y)
 
int journal_blocks_per_page (struct inode *inode)
 
static int jbd_space_needed (journal_t *journal)
 
int jbd_blocks_per_page (struct inode *inode)
 

Macro Definition Documentation

◆ BJ_Forget

#define BJ_Forget   3 /* Buffer superseded by this transaction */

Definition at line 1120 of file jbd.h.

◆ BJ_IO

#define BJ_IO   4 /* Buffer is for temporary IO use */

Definition at line 1121 of file jbd.h.

◆ BJ_Locked

#define BJ_Locked   8 /* Locked for I/O during commit */

Definition at line 1125 of file jbd.h.

◆ BJ_LogCtl

#define BJ_LogCtl   6 /* Buffer contains log descriptors */

Definition at line 1123 of file jbd.h.

◆ BJ_Metadata

#define BJ_Metadata   2 /* Normal journaled metadata */

Definition at line 1119 of file jbd.h.

◆ BJ_None

#define BJ_None   0 /* Not journaled */

Definition at line 1117 of file jbd.h.

◆ BJ_Reserved

#define BJ_Reserved   7 /* Buffer is reserved for access by journal */

Definition at line 1124 of file jbd.h.

◆ BJ_Shadow

#define BJ_Shadow   5 /* Buffer contents being shadowed to the log */

Definition at line 1122 of file jbd.h.

◆ BJ_SyncData

#define BJ_SyncData   1 /* Normal data: flush before commit */

Definition at line 1118 of file jbd.h.

◆ BJ_Types

#define BJ_Types   9

Definition at line 1126 of file jbd.h.

◆ JFS_COMMIT_BLOCK

#define JFS_COMMIT_BLOCK   2

Definition at line 170 of file jbd.h.

◆ JFS_DEBUG

#define JFS_DEBUG

Definition at line 22 of file jbd.h.

◆ jfs_debug

#define jfs_debug   jbd_debug

Definition at line 23 of file jbd.h.

◆ JFS_DESCRIPTOR_BLOCK

#define JFS_DESCRIPTOR_BLOCK   1

Definition at line 169 of file jbd.h.

◆ JFS_FEATURE_INCOMPAT_REVOKE

#define JFS_FEATURE_INCOMPAT_REVOKE   0x00000001

Definition at line 271 of file jbd.h.

◆ JFS_FLAG_DELETED

#define JFS_FLAG_DELETED   4 /* block deleted by this transaction */

Definition at line 209 of file jbd.h.

◆ JFS_FLAG_ESCAPE

#define JFS_FLAG_ESCAPE   1 /* on-disk block is escaped */

Definition at line 207 of file jbd.h.

◆ JFS_FLAG_LAST_TAG

#define JFS_FLAG_LAST_TAG   8 /* last tag in this descriptor block */

Definition at line 210 of file jbd.h.

◆ JFS_FLAG_SAME_UUID

#define JFS_FLAG_SAME_UUID   2 /* block has same uuid as previous */

Definition at line 208 of file jbd.h.

◆ JFS_HAS_COMPAT_FEATURE

#define JFS_HAS_COMPAT_FEATURE (   j,
  mask 
)
Value:
((j)->j_format_version >= 2 && \
((j)->j_superblock->s_feature_compat & cpu_to_be32((mask))))
GLenum GLint GLuint mask
Definition: glext.h:6028
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define cpu_to_be32
Definition: module.h:156

Definition at line 261 of file jbd.h.

◆ JFS_HAS_INCOMPAT_FEATURE

#define JFS_HAS_INCOMPAT_FEATURE (   j,
  mask 
)
Value:
((j)->j_format_version >= 2 && \
((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))

Definition at line 267 of file jbd.h.

◆ JFS_HAS_RO_COMPAT_FEATURE

#define JFS_HAS_RO_COMPAT_FEATURE (   j,
  mask 
)
Value:
((j)->j_format_version >= 2 && \
((j)->j_superblock->s_feature_ro_compat & cpu_to_be32((mask))))

Definition at line 264 of file jbd.h.

◆ JFS_KNOWN_COMPAT_FEATURES

#define JFS_KNOWN_COMPAT_FEATURES   0

Definition at line 274 of file jbd.h.

◆ JFS_KNOWN_INCOMPAT_FEATURES

#define JFS_KNOWN_INCOMPAT_FEATURES   JFS_FEATURE_INCOMPAT_REVOKE

Definition at line 276 of file jbd.h.

◆ JFS_KNOWN_ROCOMPAT_FEATURES

#define JFS_KNOWN_ROCOMPAT_FEATURES   0

Definition at line 275 of file jbd.h.

◆ JFS_MAGIC_NUMBER

#define JFS_MAGIC_NUMBER   0xc03b3998U /* The first 4 bytes of /dev/random! */

Definition at line 159 of file jbd.h.

◆ JFS_REVOKE_BLOCK

#define JFS_REVOKE_BLOCK   5

Definition at line 173 of file jbd.h.

◆ JFS_SUPERBLOCK_V1

#define JFS_SUPERBLOCK_V1   3

Definition at line 171 of file jbd.h.

◆ JFS_SUPERBLOCK_V2

#define JFS_SUPERBLOCK_V2   4

Definition at line 172 of file jbd.h.

Typedef Documentation

◆ journal_block_tag_t

◆ journal_header_t

◆ journal_revoke_header_t

◆ journal_superblock_t

Function Documentation

◆ jbd_blocks_per_page()

int jbd_blocks_per_page ( struct inode inode)

◆ jbd_space_needed()

static int jbd_space_needed ( journal_t *  journal)
inlinestatic

Definition at line 1103 of file jbd.h.

1104{
1105 int nblocks = journal->j_max_transaction_buffers;
1106 if (journal->j_committing_transaction)
1107 nblocks += journal->j_committing_transaction->
1108 t_outstanding_credits;
1109 return nblocks;
1110}

◆ journal_blocks_per_page()

int journal_blocks_per_page ( struct inode inode)

Definition at line 207 of file replay.c.

208{
209 return 1 << (PAGE_CACHE_SHIFT - inode->i_sb->s_blocksize_bits);
210}
#define PAGE_CACHE_SHIFT
Definition: module.h:706
Definition: fs.h:78
struct super_block * i_sb
Definition: fs.h:96

Referenced by ext3_journal_blocks_per_page().

◆ tid_geq()

static int tid_geq ( tid_t  x,
tid_t  y 
)
inlinestatic

Definition at line 1091 of file jbd.h.

1092{
1093 int difference = (x - y);
1094 return (difference >= 0);
1095}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

Referenced by __log_start_commit(), and do_one_pass().

◆ tid_gt()

static int tid_gt ( tid_t  x,
tid_t  y 
)
inlinestatic

Definition at line 1085 of file jbd.h.

1086{
1087 int difference = (x - y);
1088 return (difference > 0);
1089}

Referenced by journal_set_revoke(), and journal_test_revoke().