Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
jbd2.h File Reference
#include "jfs_compat.h"

Go to the source code of this file.

Data Structures

struct  journal_header_s
 
struct  commit_header
 
struct  journal_block_tag_s
 
struct  jbd2_journal_block_tail
 
struct  jbd2_journal_revoke_header_s
 
struct  jbd2_journal_revoke_tail
 
struct  journal_superblock_s
 

Macros

#define JBD2_DEBUG
 
#define jfs_debug   jbd_debug
 
#define journal_oom_retry   1
 
#define JBD2_DEFAULT_MAX_COMMIT_AGE   5
 
#define jbd_debug(f, a...)
 
#define JBD2_MIN_JOURNAL_BLOCKS   1024
 
#define JBD2_MAGIC_NUMBER   0xc03b3998U /* The first 4 bytes of /dev/random! */
 
#define JBD2_DESCRIPTOR_BLOCK   1
 
#define JBD2_COMMIT_BLOCK   2
 
#define JBD2_SUPERBLOCK_V1   3
 
#define JBD2_SUPERBLOCK_V2   4
 
#define JBD2_REVOKE_BLOCK   5
 
#define JBD2_CRC32_CHKSUM   1
 
#define JBD2_MD5_CHKSUM   2
 
#define JBD2_SHA1_CHKSUM   3
 
#define JBD2_CRC32C_CHKSUM   4
 
#define JBD2_CRC32_CHKSUM_SIZE   4
 
#define JBD2_CHECKSUM_BYTES   (32 / sizeof(u32))
 
#define JBD2_TAG_SIZE32   (offsetof(journal_block_tag_t, t_blocknr_high))
 
#define JBD2_TAG_SIZE64   (sizeof(journal_block_tag_t))
 
#define JBD2_FLAG_ESCAPE   1 /* on-disk block is escaped */
 
#define JBD2_FLAG_SAME_UUID   2 /* block has same uuid as previous */
 
#define JBD2_FLAG_DELETED   4 /* block deleted by this transaction */
 
#define JBD2_FLAG_LAST_TAG   8 /* last tag in this descriptor block */
 
#define JBD2_HAS_COMPAT_FEATURE(j, mask)
 
#define JBD2_HAS_RO_COMPAT_FEATURE(j, mask)
 
#define JBD2_HAS_INCOMPAT_FEATURE(j, mask)
 
#define JBD2_FEATURE_COMPAT_CHECKSUM   0x00000001
 
#define JBD2_FEATURE_INCOMPAT_REVOKE   0x00000001
 
#define JBD2_FEATURE_INCOMPAT_64BIT   0x00000002
 
#define JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT   0x00000004
 
#define JBD2_FEATURE_INCOMPAT_CSUM_V2   0x00000008
 
#define JBD2_KNOWN_COMPAT_FEATURES   JBD2_FEATURE_COMPAT_CHECKSUM
 
#define JBD2_KNOWN_ROCOMPAT_FEATURES   0
 
#define JBD2_KNOWN_INCOMPAT_FEATURES
 
#define BJ_None   0 /* Not journaled */
 
#define BJ_Metadata   1 /* Normal journaled metadata */
 
#define BJ_Forget   2 /* Buffer superseded by this transaction */
 
#define BJ_IO   3 /* Buffer is for temporary IO use */
 
#define BJ_Shadow   4 /* Buffer contents being shadowed to the log */
 
#define BJ_LogCtl   5 /* Buffer contains log descriptors */
 
#define BJ_Reserved   6 /* Buffer is reserved for access by journal */
 
#define BJ_Types   7
 

Typedefs

typedef struct journal_header_s journal_header_t
 
typedef struct journal_block_tag_s journal_block_tag_t
 
typedef struct
jbd2_journal_revoke_header_s 
jbd2_journal_revoke_header_t
 
typedef struct journal_superblock_s journal_superblock_t
 

Functions

voidjbd2_alloc (size_t size, gfp_t flags)
 
void jbd2_free (void *ptr, size_t size)
 
int jbd2_journal_blocks_per_page (struct inode *inode)
 
size_t journal_tag_bytes (journal_t *journal)
 
int jbd_blocks_per_page (struct inode *inode)
 

Macro Definition Documentation

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

Definition at line 1297 of file jbd2.h.

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

Definition at line 1298 of file jbd2.h.

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

Definition at line 1300 of file jbd2.h.

#define BJ_Metadata   1 /* Normal journaled metadata */

Definition at line 1296 of file jbd2.h.

#define BJ_None   0 /* Not journaled */

Definition at line 1295 of file jbd2.h.

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

Definition at line 1301 of file jbd2.h.

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

Definition at line 1299 of file jbd2.h.

#define BJ_Types   7

Definition at line 1302 of file jbd2.h.

#define JBD2_CHECKSUM_BYTES   (32 / sizeof(u32))

Definition at line 155 of file jbd2.h.

#define JBD2_COMMIT_BLOCK   2

Definition at line 130 of file jbd2.h.

#define JBD2_CRC32_CHKSUM   1

Definition at line 148 of file jbd2.h.

#define JBD2_CRC32_CHKSUM_SIZE   4

Definition at line 153 of file jbd2.h.

#define JBD2_CRC32C_CHKSUM   4

Definition at line 151 of file jbd2.h.

#define JBD2_DEBUG

Definition at line 22 of file jbd2.h.

#define JBD2_DEFAULT_MAX_COMMIT_AGE   5

Definition at line 51 of file jbd2.h.

#define JBD2_DESCRIPTOR_BLOCK   1

Definition at line 129 of file jbd2.h.

#define JBD2_FEATURE_COMPAT_CHECKSUM   0x00000001

Definition at line 287 of file jbd2.h.

#define JBD2_FEATURE_INCOMPAT_64BIT   0x00000002

Definition at line 290 of file jbd2.h.

#define JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT   0x00000004

Definition at line 291 of file jbd2.h.

#define JBD2_FEATURE_INCOMPAT_CSUM_V2   0x00000008

Definition at line 292 of file jbd2.h.

#define JBD2_FEATURE_INCOMPAT_REVOKE   0x00000001

Definition at line 289 of file jbd2.h.

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

Definition at line 222 of file jbd2.h.

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

Definition at line 220 of file jbd2.h.

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

Definition at line 223 of file jbd2.h.

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

Definition at line 221 of file jbd2.h.

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

Definition at line 277 of file jbd2.h.

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

Definition at line 283 of file jbd2.h.

#define JBD2_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 280 of file jbd2.h.

#define JBD2_KNOWN_COMPAT_FEATURES   JBD2_FEATURE_COMPAT_CHECKSUM

Definition at line 295 of file jbd2.h.

#define JBD2_KNOWN_INCOMPAT_FEATURES
Value:
JBD2_FEATURE_INCOMPAT_64BIT | \
JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT | \
JBD2_FEATURE_INCOMPAT_CSUM_V2)

Definition at line 297 of file jbd2.h.

#define JBD2_KNOWN_ROCOMPAT_FEATURES   0

Definition at line 296 of file jbd2.h.

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

Definition at line 119 of file jbd2.h.

#define JBD2_MD5_CHKSUM   2

Definition at line 149 of file jbd2.h.

#define JBD2_MIN_JOURNAL_BLOCKS   1024

Definition at line 77 of file jbd2.h.

#define JBD2_REVOKE_BLOCK   5

Definition at line 133 of file jbd2.h.

#define JBD2_SHA1_CHKSUM   3

Definition at line 150 of file jbd2.h.

#define JBD2_SUPERBLOCK_V1   3

Definition at line 131 of file jbd2.h.

#define JBD2_SUPERBLOCK_V2   4

Definition at line 132 of file jbd2.h.

#define JBD2_TAG_SIZE32   (offsetof(journal_block_tag_t, t_blocknr_high))

Definition at line 196 of file jbd2.h.

#define JBD2_TAG_SIZE64   (sizeof(journal_block_tag_t))

Definition at line 197 of file jbd2.h.

#define jbd_debug (   f,
  a... 
)

Definition at line 71 of file jbd2.h.

#define jfs_debug   jbd_debug

Definition at line 23 of file jbd2.h.

#define journal_oom_retry   1

Definition at line 37 of file jbd2.h.

Typedef Documentation

Function Documentation

void* jbd2_alloc ( size_t  size,
gfp_t  flags 
)

Definition at line 2195 of file journal.c.

void jbd2_free ( void ptr,
size_t  size 
)

Definition at line 2221 of file journal.c.

int jbd2_journal_blocks_per_page ( struct inode inode)

Definition at line 2096 of file journal.c.

int jbd_blocks_per_page ( struct inode inode)
size_t journal_tag_bytes ( journal_t *  journal)

Definition at line 2104 of file journal.c.