Home | History | Annotate | Download | only in ext4_utils
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef _EXT4_JBD2_H
     13 #define _EXT4_JBD2_H
     14 
     15 #include "ext4.h"
     16 
     17 #define EXT4_JOURNAL(inode) (EXT4_SB((inode)->i_sb)->s_journal)
     18 
     19 #define EXT4_SINGLEDATA_TRANS_BLOCKS(sb)   (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)   ? 27U : 8U)
     20 
     21 #define EXT4_XATTR_TRANS_BLOCKS 6U
     22 
     23 #define EXT4_DATA_TRANS_BLOCKS(sb) (EXT4_SINGLEDATA_TRANS_BLOCKS(sb) +   EXT4_XATTR_TRANS_BLOCKS - 2 +   EXT4_MAXQUOTAS_TRANS_BLOCKS(sb))
     24 
     25 #define EXT4_META_TRANS_BLOCKS(sb) (EXT4_XATTR_TRANS_BLOCKS +   EXT4_MAXQUOTAS_TRANS_BLOCKS(sb))
     26 
     27 #define EXT4_DELETE_TRANS_BLOCKS(sb) (2 * EXT4_DATA_TRANS_BLOCKS(sb) + 64)
     28 
     29 #define EXT4_MAX_TRANS_DATA 64U
     30 
     31 #define EXT4_RESERVE_TRANS_BLOCKS 12U
     32 
     33 #define EXT4_INDEX_EXTRA_TRANS_BLOCKS 8
     34 
     35 #define EXT4_QUOTA_TRANS_BLOCKS(sb) 0
     36 #define EXT4_QUOTA_INIT_BLOCKS(sb) 0
     37 #define EXT4_QUOTA_DEL_BLOCKS(sb) 0
     38 #define EXT4_MAXQUOTAS_TRANS_BLOCKS(sb) (MAXQUOTAS*EXT4_QUOTA_TRANS_BLOCKS(sb))
     39 #define EXT4_MAXQUOTAS_INIT_BLOCKS(sb) (MAXQUOTAS*EXT4_QUOTA_INIT_BLOCKS(sb))
     40 #define EXT4_MAXQUOTAS_DEL_BLOCKS(sb) (MAXQUOTAS*EXT4_QUOTA_DEL_BLOCKS(sb))
     41 
     42 #define ext4_journal_get_undo_access(handle, bh)   __ext4_journal_get_undo_access(__func__, (handle), (bh))
     43 #define ext4_journal_get_write_access(handle, bh)   __ext4_journal_get_write_access(__func__, (handle), (bh))
     44 #define ext4_forget(handle, is_metadata, inode, bh, block_nr)   __ext4_forget(__func__, (handle), (is_metadata), (inode), (bh),  (block_nr))
     45 #define ext4_journal_get_create_access(handle, bh)   __ext4_journal_get_create_access(__func__, (handle), (bh))
     46 #define ext4_handle_dirty_metadata(handle, inode, bh)   __ext4_handle_dirty_metadata(__func__, (handle), (inode), (bh))
     47 
     48 #define EXT4_NOJOURNAL_MAX_REF_COUNT ((unsigned long) 4096)
     49 
     50 #define ext4_journal_stop(handle)   __ext4_journal_stop(__func__, (handle))
     51 
     52 #endif
     53 
     54