Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
ext3.h File Reference
#include <linux/fs.h>
#include <linux/jbd.h>
#include <linux/magic.h>
#include <linux/bug.h>
#include <linux/blockgroup_lock.h>
#include <trace/events/ext3.h>

Go to the source code of this file.

Data Structures

struct  ext3_group_desc
 
struct  ext3_new_group_input
 
struct  ext3_new_group_data
 
struct  ext3_mount_options
 
struct  ext3_inode
 
struct  ext3_super_block
 
struct  ext3_reserve_window
 
struct  ext3_reserve_window_node
 
struct  ext3_block_alloc_info
 
struct  ext3_inode_info
 
struct  ext3_sb_info
 
struct  ext3_dir_entry
 
struct  ext3_dir_entry_2
 
struct  dx_hash_info
 
struct  ext3_iloc
 
struct  dir_private_info
 

Macros

#define EXT3_DEFAULT_RESERVE_BLOCKS   8
 
#define EXT3_MAX_RESERVE_BLOCKS   1027
 
#define EXT3_RESERVE_WINDOW_NOT_ALLOCATED   0
 
#define ext3_debug(f, a...)   do {} while (0)
 
#define EXT3_BAD_INO   1 /* Bad blocks inode */
 
#define EXT3_ROOT_INO   2 /* Root inode */
 
#define EXT3_BOOT_LOADER_INO   5 /* Boot loader inode */
 
#define EXT3_UNDEL_DIR_INO   6 /* Undelete directory inode */
 
#define EXT3_RESIZE_INO   7 /* Reserved group descriptors inode */
 
#define EXT3_JOURNAL_INO   8 /* Journal inode */
 
#define EXT3_GOOD_OLD_FIRST_INO   11
 
#define EXT3_LINK_MAX   32000
 
#define EXT3_MIN_BLOCK_SIZE   1024
 
#define EXT3_MAX_BLOCK_SIZE   65536
 
#define EXT3_MIN_BLOCK_LOG_SIZE   10
 
#define EXT3_BLOCK_SIZE(s)   ((s)->s_blocksize)
 
#define EXT3_ADDR_PER_BLOCK(s)   (EXT3_BLOCK_SIZE(s) / sizeof (__u32))
 
#define EXT3_BLOCK_SIZE_BITS(s)   ((s)->s_blocksize_bits)
 
#define EXT3_ADDR_PER_BLOCK_BITS(s)   (EXT3_SB(s)->s_addr_per_block_bits)
 
#define EXT3_INODE_SIZE(s)   (EXT3_SB(s)->s_inode_size)
 
#define EXT3_FIRST_INO(s)   (EXT3_SB(s)->s_first_ino)
 
#define EXT3_MIN_FRAG_SIZE   1024
 
#define EXT3_MAX_FRAG_SIZE   4096
 
#define EXT3_MIN_FRAG_LOG_SIZE   10
 
#define EXT3_FRAG_SIZE(s)   (EXT3_SB(s)->s_frag_size)
 
#define EXT3_FRAGS_PER_BLOCK(s)   (EXT3_SB(s)->s_frags_per_block)
 
#define EXT3_BLOCKS_PER_GROUP(s)   (EXT3_SB(s)->s_blocks_per_group)
 
#define EXT3_DESC_PER_BLOCK(s)   (EXT3_SB(s)->s_desc_per_block)
 
#define EXT3_INODES_PER_GROUP(s)   (EXT3_SB(s)->s_inodes_per_group)
 
#define EXT3_DESC_PER_BLOCK_BITS(s)   (EXT3_SB(s)->s_desc_per_block_bits)
 
#define EXT3_NDIR_BLOCKS   12
 
#define EXT3_IND_BLOCK   EXT3_NDIR_BLOCKS
 
#define EXT3_DIND_BLOCK   (EXT3_IND_BLOCK + 1)
 
#define EXT3_TIND_BLOCK   (EXT3_DIND_BLOCK + 1)
 
#define EXT3_N_BLOCKS   (EXT3_TIND_BLOCK + 1)
 
#define EXT3_SECRM_FL   0x00000001 /* Secure deletion */
 
#define EXT3_UNRM_FL   0x00000002 /* Undelete */
 
#define EXT3_COMPR_FL   0x00000004 /* Compress file */
 
#define EXT3_SYNC_FL   0x00000008 /* Synchronous updates */
 
#define EXT3_IMMUTABLE_FL   0x00000010 /* Immutable file */
 
#define EXT3_APPEND_FL   0x00000020 /* writes to file may only append */
 
#define EXT3_NODUMP_FL   0x00000040 /* do not dump file */
 
#define EXT3_NOATIME_FL   0x00000080 /* do not update atime */
 
#define EXT3_DIRTY_FL   0x00000100
 
#define EXT3_COMPRBLK_FL   0x00000200 /* One or more compressed clusters */
 
#define EXT3_NOCOMPR_FL   0x00000400 /* Don't compress */
 
#define EXT3_ECOMPR_FL   0x00000800 /* Compression error */
 
#define EXT3_INDEX_FL   0x00001000 /* hash-indexed directory */
 
#define EXT3_IMAGIC_FL   0x00002000 /* AFS directory */
 
#define EXT3_JOURNAL_DATA_FL   0x00004000 /* file data should be journaled */
 
#define EXT3_NOTAIL_FL   0x00008000 /* file tail should not be merged */
 
#define EXT3_DIRSYNC_FL   0x00010000 /* dirsync behaviour (directories only) */
 
#define EXT3_TOPDIR_FL   0x00020000 /* Top of directory hierarchies*/
 
#define EXT3_RESERVED_FL   0x80000000 /* reserved for ext3 lib */
 
#define EXT3_FL_USER_VISIBLE   0x0003DFFF /* User visible flags */
 
#define EXT3_FL_USER_MODIFIABLE   0x000380FF /* User modifiable flags */
 
#define EXT3_FL_INHERITED
 
#define EXT3_REG_FLMASK   (~(EXT3_DIRSYNC_FL | EXT3_TOPDIR_FL))
 
#define EXT3_OTHER_FLMASK   (EXT3_NODUMP_FL | EXT3_NOATIME_FL)
 
#define EXT3_IOC_GETFLAGS   FS_IOC_GETFLAGS
 
#define EXT3_IOC_SETFLAGS   FS_IOC_SETFLAGS
 
#define EXT3_IOC_GETVERSION   _IOR('f', 3, long)
 
#define EXT3_IOC_SETVERSION   _IOW('f', 4, long)
 
#define EXT3_IOC_GROUP_EXTEND   _IOW('f', 7, unsigned long)
 
#define EXT3_IOC_GROUP_ADD   _IOW('f', 8,struct ext3_new_group_input)
 
#define EXT3_IOC_GETVERSION_OLD   FS_IOC_GETVERSION
 
#define EXT3_IOC_SETVERSION_OLD   FS_IOC_SETVERSION
 
#define EXT3_IOC_GETRSVSZ   _IOR('f', 5, long)
 
#define EXT3_IOC_SETRSVSZ   _IOW('f', 6, long)
 
#define EXT3_IOC32_GETFLAGS   FS_IOC32_GETFLAGS
 
#define EXT3_IOC32_SETFLAGS   FS_IOC32_SETFLAGS
 
#define EXT3_IOC32_GETVERSION   _IOR('f', 3, int)
 
#define EXT3_IOC32_SETVERSION   _IOW('f', 4, int)
 
#define EXT3_IOC32_GETRSVSZ   _IOR('f', 5, int)
 
#define EXT3_IOC32_SETRSVSZ   _IOW('f', 6, int)
 
#define EXT3_IOC32_GROUP_EXTEND   _IOW('f', 7, unsigned int)
 
#define EXT3_IOC32_GETVERSION_OLD   FS_IOC32_GETVERSION
 
#define EXT3_IOC32_SETVERSION_OLD   FS_IOC32_SETVERSION
 
#define i_size_high   i_dir_acl
 
#define i_reserved1   osd1.linux1.l_i_reserved1
 
#define i_frag   osd2.linux2.l_i_frag
 
#define i_fsize   osd2.linux2.l_i_fsize
 
#define i_uid_low   i_uid
 
#define i_gid_low   i_gid
 
#define i_uid_high   osd2.linux2.l_i_uid_high
 
#define i_gid_high   osd2.linux2.l_i_gid_high
 
#define i_reserved2   osd2.linux2.l_i_reserved2
 
#define EXT3_VALID_FS   0x0001 /* Unmounted cleanly */
 
#define EXT3_ERROR_FS   0x0002 /* Errors detected */
 
#define EXT3_ORPHAN_FS   0x0004 /* Orphans being recovered */
 
#define EXT2_FLAGS_SIGNED_HASH   0x0001 /* Signed dirhash in use */
 
#define EXT2_FLAGS_UNSIGNED_HASH   0x0002 /* Unsigned dirhash in use */
 
#define EXT2_FLAGS_TEST_FILESYS   0x0004 /* to test development code */
 
#define EXT3_MOUNT_CHECK   0x00001 /* Do mount-time checks */
 
#define EXT3_MOUNT_GRPID   0x00004 /* Create files with directory's group */
 
#define EXT3_MOUNT_DEBUG   0x00008 /* Some debugging messages */
 
#define EXT3_MOUNT_ERRORS_CONT   0x00010 /* Continue on errors */
 
#define EXT3_MOUNT_ERRORS_RO   0x00020 /* Remount fs ro on errors */
 
#define EXT3_MOUNT_ERRORS_PANIC   0x00040 /* Panic on errors */
 
#define EXT3_MOUNT_MINIX_DF   0x00080 /* Mimics the Minix statfs */
 
#define EXT3_MOUNT_NOLOAD   0x00100 /* Don't use existing journal*/
 
#define EXT3_MOUNT_ABORT   0x00200 /* Fatal error detected */
 
#define EXT3_MOUNT_DATA_FLAGS   0x00C00 /* Mode for data writes: */
 
#define EXT3_MOUNT_JOURNAL_DATA   0x00400 /* Write data to journal */
 
#define EXT3_MOUNT_ORDERED_DATA   0x00800 /* Flush data before commit */
 
#define EXT3_MOUNT_WRITEBACK_DATA   0x00C00 /* No data ordering */
 
#define EXT3_MOUNT_UPDATE_JOURNAL   0x01000 /* Update the journal format */
 
#define EXT3_MOUNT_NO_UID32   0x02000 /* Disable 32-bit UIDs */
 
#define EXT3_MOUNT_XATTR_USER   0x04000 /* Extended user attributes */
 
#define EXT3_MOUNT_POSIX_ACL   0x08000 /* POSIX Access Control Lists */
 
#define EXT3_MOUNT_RESERVATION   0x10000 /* Preallocation */
 
#define EXT3_MOUNT_BARRIER   0x20000 /* Use block barriers */
 
#define EXT3_MOUNT_QUOTA   0x80000 /* Some quota option set */
 
#define EXT3_MOUNT_USRQUOTA   0x100000 /* "old" user quota */
 
#define EXT3_MOUNT_GRPQUOTA   0x200000 /* "old" group quota */
 
#define EXT3_MOUNT_DATA_ERR_ABORT
 
#define clear_opt(o, opt)   o &= ~EXT3_MOUNT_##opt
 
#define set_opt(o, opt)   o |= EXT3_MOUNT_##opt
 
#define test_opt(sb, opt)
 
#define ext3_set_bit   __set_bit_le
 
#define ext3_set_bit_atomic   ext2_set_bit_atomic
 
#define ext3_clear_bit   __clear_bit_le
 
#define ext3_clear_bit_atomic   ext2_clear_bit_atomic
 
#define ext3_test_bit   test_bit_le
 
#define ext3_find_next_zero_bit   find_next_zero_bit_le
 
#define EXT3_DFL_MAX_MNT_COUNT   20 /* Allow 20 mounts */
 
#define EXT3_DFL_CHECKINTERVAL   0 /* Don't use interval check */
 
#define EXT3_ERRORS_CONTINUE   1 /* Continue execution */
 
#define EXT3_ERRORS_RO   2 /* Remount fs read-only */
 
#define EXT3_ERRORS_PANIC   3 /* Panic */
 
#define EXT3_ERRORS_DEFAULT   EXT3_ERRORS_CONTINUE
 
#define E3FSBLK   "%lu"
 
#define rsv_start   rsv_window._rsv_start
 
#define rsv_end   rsv_window._rsv_end
 
#define NEXT_ORPHAN(inode)   EXT3_I(inode)->i_dtime
 
#define EXT3_OS_LINUX   0
 
#define EXT3_OS_HURD   1
 
#define EXT3_OS_MASIX   2
 
#define EXT3_OS_FREEBSD   3
 
#define EXT3_OS_LITES   4
 
#define EXT3_GOOD_OLD_REV   0 /* The good old (original) format */
 
#define EXT3_DYNAMIC_REV   1 /* V2 format w/ dynamic inode sizes */
 
#define EXT3_CURRENT_REV   EXT3_GOOD_OLD_REV
 
#define EXT3_MAX_SUPP_REV   EXT3_DYNAMIC_REV
 
#define EXT3_GOOD_OLD_INODE_SIZE   128
 
#define EXT3_HAS_COMPAT_FEATURE(sb, mask)   ( EXT3_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask) )
 
#define EXT3_HAS_RO_COMPAT_FEATURE(sb, mask)   ( EXT3_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask) )
 
#define EXT3_HAS_INCOMPAT_FEATURE(sb, mask)   ( EXT3_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(mask) )
 
#define EXT3_SET_COMPAT_FEATURE(sb, mask)   EXT3_SB(sb)->s_es->s_feature_compat |= cpu_to_le32(mask)
 
#define EXT3_SET_RO_COMPAT_FEATURE(sb, mask)   EXT3_SB(sb)->s_es->s_feature_ro_compat |= cpu_to_le32(mask)
 
#define EXT3_SET_INCOMPAT_FEATURE(sb, mask)   EXT3_SB(sb)->s_es->s_feature_incompat |= cpu_to_le32(mask)
 
#define EXT3_CLEAR_COMPAT_FEATURE(sb, mask)   EXT3_SB(sb)->s_es->s_feature_compat &= ~cpu_to_le32(mask)
 
#define EXT3_CLEAR_RO_COMPAT_FEATURE(sb, mask)   EXT3_SB(sb)->s_es->s_feature_ro_compat &= ~cpu_to_le32(mask)
 
#define EXT3_CLEAR_INCOMPAT_FEATURE(sb, mask)   EXT3_SB(sb)->s_es->s_feature_incompat &= ~cpu_to_le32(mask)
 
#define EXT3_FEATURE_COMPAT_DIR_PREALLOC   0x0001
 
#define EXT3_FEATURE_COMPAT_IMAGIC_INODES   0x0002
 
#define EXT3_FEATURE_COMPAT_HAS_JOURNAL   0x0004
 
#define EXT3_FEATURE_COMPAT_EXT_ATTR   0x0008
 
#define EXT3_FEATURE_COMPAT_RESIZE_INODE   0x0010
 
#define EXT3_FEATURE_COMPAT_DIR_INDEX   0x0020
 
#define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER   0x0001
 
#define EXT3_FEATURE_RO_COMPAT_LARGE_FILE   0x0002
 
#define EXT3_FEATURE_RO_COMPAT_BTREE_DIR   0x0004
 
#define EXT3_FEATURE_INCOMPAT_COMPRESSION   0x0001
 
#define EXT3_FEATURE_INCOMPAT_FILETYPE   0x0002
 
#define EXT3_FEATURE_INCOMPAT_RECOVER   0x0004 /* Needs recovery */
 
#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV   0x0008 /* Journal device */
 
#define EXT3_FEATURE_INCOMPAT_META_BG   0x0010
 
#define EXT3_FEATURE_COMPAT_SUPP   EXT2_FEATURE_COMPAT_EXT_ATTR
 
#define EXT3_FEATURE_INCOMPAT_SUPP
 
#define EXT3_FEATURE_RO_COMPAT_SUPP
 
#define EXT3_DEF_RESUID   0
 
#define EXT3_DEF_RESGID   0
 
#define EXT3_DEFM_DEBUG   0x0001
 
#define EXT3_DEFM_BSDGROUPS   0x0002
 
#define EXT3_DEFM_XATTR_USER   0x0004
 
#define EXT3_DEFM_ACL   0x0008
 
#define EXT3_DEFM_UID16   0x0010
 
#define EXT3_DEFM_JMODE   0x0060
 
#define EXT3_DEFM_JMODE_DATA   0x0020
 
#define EXT3_DEFM_JMODE_ORDERED   0x0040
 
#define EXT3_DEFM_JMODE_WBACK   0x0060
 
#define EXT3_NAME_LEN   255
 
#define EXT3_FT_UNKNOWN   0
 
#define EXT3_FT_REG_FILE   1
 
#define EXT3_FT_DIR   2
 
#define EXT3_FT_CHRDEV   3
 
#define EXT3_FT_BLKDEV   4
 
#define EXT3_FT_FIFO   5
 
#define EXT3_FT_SOCK   6
 
#define EXT3_FT_SYMLINK   7
 
#define EXT3_FT_MAX   8
 
#define EXT3_DIR_PAD   4
 
#define EXT3_DIR_ROUND   (EXT3_DIR_PAD - 1)
 
#define EXT3_DIR_REC_LEN(name_len)
 
#define EXT3_MAX_REC_LEN   ((1<<16)-1)
 
#define is_dx(dir)
 
#define EXT3_DIR_LINK_MAX(dir)   (!is_dx(dir) && (dir)->i_nlink >= EXT3_LINK_MAX)
 
#define EXT3_DIR_LINK_EMPTY(dir)   ((dir)->i_nlink == 2 || (dir)->i_nlink == 1)
 
#define DX_HASH_LEGACY   0
 
#define DX_HASH_HALF_MD4   1
 
#define DX_HASH_TEA   2
 
#define DX_HASH_LEGACY_UNSIGNED   3
 
#define DX_HASH_HALF_MD4_UNSIGNED   4
 
#define DX_HASH_TEA_UNSIGNED   5
 
#define EXT3_HTREE_EOF_32BIT   ((1UL << (32 - 1)) - 1)
 
#define EXT3_HTREE_EOF_64BIT   ((1ULL << (64 - 1)) - 1)
 
#define HASH_NB_ALWAYS   1
 
#define ERR_BAD_DX_DIR   -75000
 
#define NORET_TYPE
 
#define ATTRIB_NORET   __attribute__((noreturn))
 
#define NORET_AND   noreturn,
 
#define ext3_std_error(sb, errno)
 
#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)   (EXT3_MAXQUOTAS_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_MAXQUOTAS_TRANS_BLOCKS(sb)   (MAXQUOTAS*EXT3_QUOTA_TRANS_BLOCKS(sb))
 
#define EXT3_MAXQUOTAS_INIT_BLOCKS(sb)   (MAXQUOTAS*EXT3_QUOTA_INIT_BLOCKS(sb))
 
#define EXT3_MAXQUOTAS_DEL_BLOCKS(sb)   (MAXQUOTAS*EXT3_QUOTA_DEL_BLOCKS(sb))
 
#define ext3_journal_get_undo_access(handle, bh)   __ext3_journal_get_undo_access(__func__, (handle), (bh))
 
#define ext3_journal_get_write_access(handle, bh)   __ext3_journal_get_write_access(__func__, (handle), (bh))
 
#define ext3_journal_revoke(handle, blocknr, bh)   __ext3_journal_revoke(__func__, (handle), (blocknr), (bh))
 
#define ext3_journal_get_create_access(handle, bh)   __ext3_journal_get_create_access(__func__, (handle), (bh))
 
#define ext3_journal_dirty_metadata(handle, bh)   __ext3_journal_dirty_metadata(__func__, (handle), (bh))
 
#define ext3_journal_forget(handle, bh)   __ext3_journal_forget(__func__, (handle), (bh))
 
#define ext3_journal_stop(handle)   __ext3_journal_stop(__func__, (handle))
 

Typedefs

typedef int ext3_grpblk_t
 
typedef unsigned long ext3_fsblk_t
 

Enumerations

enum  { EXT3_STATE_JDATA, EXT3_STATE_NEW, EXT3_STATE_XATTR, EXT3_STATE_FLUSH_ON_CLOSE }
 

Functions

int ext3_bg_has_super (struct super_block *sb, int group)
 
unsigned long ext3_bg_num_gdb (struct super_block *sb, int group)
 
ext3_fsblk_t ext3_new_block (handle_t *handle, struct inode *inode, ext3_fsblk_t goal, int *errp)
 
ext3_fsblk_t ext3_new_blocks (handle_t *handle, struct inode *inode, ext3_fsblk_t goal, unsigned long *count, int *errp)
 
void ext3_free_blocks (handle_t *handle, struct inode *inode, ext3_fsblk_t block, unsigned long count)
 
void ext3_free_blocks_sb (handle_t *handle, struct super_block *sb, ext3_fsblk_t block, unsigned long count, unsigned long *pdquot_freed_blocks)
 
ext3_fsblk_t ext3_count_free_blocks (struct super_block *)
 
void ext3_check_blocks_bitmap (struct super_block *)
 
struct ext3_group_descext3_get_group_desc (struct super_block *sb, unsigned int block_group, struct buffer_head **bh)
 
int ext3_should_retry_alloc (struct super_block *sb, int *retries)
 
void ext3_init_block_alloc_info (struct inode *)
 
void ext3_rsv_window_add (struct super_block *sb, struct ext3_reserve_window_node *rsv)
 
int ext3_trim_fs (struct super_block *sb, struct fstrim_range *range)
 
int ext3_check_dir_entry (const char *, struct inode *, struct ext3_dir_entry_2 *, struct buffer_head *, unsigned long)
 
int ext3_htree_store_dirent (struct file *dir_file, __u32 hash, __u32 minor_hash, struct ext3_dir_entry_2 *dirent)
 
void ext3_htree_free_dir_info (struct dir_private_info *p)
 
int ext3_sync_file (struct file *, loff_t, loff_t, int)
 
int ext3fs_dirhash (const char *name, int len, struct dx_hash_info *hinfo)
 
struct inodeext3_new_inode (handle_t *, struct inode *, const struct qstr *, umode_t)
 
void ext3_free_inode (handle_t *, struct inode *)
 
struct inodeext3_orphan_get (struct super_block *, unsigned long)
 
unsigned long ext3_count_free_inodes (struct super_block *)
 
unsigned long ext3_count_dirs (struct super_block *)
 
void ext3_check_inodes_bitmap (struct super_block *)
 
unsigned long ext3_count_free (struct buffer_head *, unsigned)
 
int ext3_forget (handle_t *handle, int is_metadata, struct inode *inode, struct buffer_head *bh, ext3_fsblk_t blocknr)
 
struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *)
 
struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *)
 
int ext3_get_blocks_handle (handle_t *handle, struct inode *inode, sector_t iblock, unsigned long maxblocks, struct buffer_head *bh_result, int create)
 
struct inodeext3_iget (struct super_block *, unsigned long)
 
int ext3_write_inode (struct inode *, struct writeback_control *)
 
int ext3_setattr (struct dentry *, struct iattr *)
 
void ext3_evict_inode (struct inode *)
 
int ext3_sync_inode (handle_t *, struct inode *)
 
void ext3_discard_reservation (struct inode *)
 
void ext3_dirty_inode (struct inode *, int)
 
int ext3_change_inode_journal_flag (struct inode *, int)
 
int ext3_get_inode_loc (struct inode *, struct ext3_iloc *)
 
int ext3_can_truncate (struct inode *inode)
 
void ext3_truncate (struct inode *inode)
 
void ext3_set_inode_flags (struct inode *)
 
void ext3_get_inode_flags (struct ext3_inode_info *)
 
void ext3_set_aops (struct inode *inode)
 
int ext3_fiemap (struct inode *inode, struct fiemap_extent_info *fieinfo, u64 start, u64 len)
 
long ext3_ioctl (struct file *, unsigned int, unsigned long)
 
long ext3_compat_ioctl (struct file *, unsigned int, unsigned long)
 
int ext3_orphan_add (handle_t *, struct inode *)
 
int ext3_orphan_del (handle_t *, struct inode *)
 
int ext3_htree_fill_tree (struct file *dir_file, __u32 start_hash, __u32 start_minor_hash, __u32 *next_hash)
 
int ext3_group_add (struct super_block *sb, struct ext3_new_group_data *input)
 
int ext3_group_extend (struct super_block *sb, struct ext3_super_block *es, ext3_fsblk_t n_blocks_count)
 
 __printf (3, 4) void ext3_error(struct super_block *
 
const char const char void __ext3_std_error (struct super_block *, const char *, int)
 
const char const char const
char const char const char
const char void 
ext3_update_dynamic_rev (struct super_block *sb)
 
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)
 
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_t * ext3_journal_start_sb (struct super_block *sb, int nblocks)
 
int __ext3_journal_stop (const char *where, handle_t *handle)
 
int ext3_force_commit (struct super_block *sb)
 

Variables

struct file_operations ext3_dir_operations
 
struct inode_operations ext3_file_inode_operations
 
struct file_operations ext3_file_operations
 
struct inode_operations ext3_dir_inode_operations
 
struct inode_operations ext3_special_inode_operations
 
struct inode_operations ext3_symlink_inode_operations
 
struct inode_operations ext3_fast_symlink_inode_operations
 

Macro Definition Documentation

#define ATTRIB_NORET   __attribute__((noreturn))

Definition at line 986 of file ext3.h.

#define clear_opt (   o,
  opt 
)    o &= ~EXT3_MOUNT_##opt

Definition at line 369 of file ext3.h.

#define DX_HASH_HALF_MD4   1

Definition at line 907 of file ext3.h.

#define DX_HASH_HALF_MD4_UNSIGNED   4

Definition at line 910 of file ext3.h.

#define DX_HASH_LEGACY   0

Definition at line 906 of file ext3.h.

#define DX_HASH_LEGACY_UNSIGNED   3

Definition at line 909 of file ext3.h.

#define DX_HASH_TEA   2

Definition at line 908 of file ext3.h.

#define DX_HASH_TEA_UNSIGNED   5

Definition at line 911 of file ext3.h.

#define E3FSBLK   "%lu"

Definition at line 497 of file ext3.h.

#define ERR_BAD_DX_DIR   -75000

Definition at line 975 of file ext3.h.

#define EXT2_FLAGS_SIGNED_HASH   0x0001 /* Signed dirhash in use */

Definition at line 335 of file ext3.h.

#define EXT2_FLAGS_TEST_FILESYS   0x0004 /* to test development code */

Definition at line 337 of file ext3.h.

#define EXT2_FLAGS_UNSIGNED_HASH   0x0002 /* Unsigned dirhash in use */

Definition at line 336 of file ext3.h.

#define EXT3_ADDR_PER_BLOCK (   s)    (EXT3_BLOCK_SIZE(s) / sizeof (__u32))

Definition at line 84 of file ext3.h.

#define EXT3_ADDR_PER_BLOCK_BITS (   s)    (EXT3_SB(s)->s_addr_per_block_bits)

Definition at line 86 of file ext3.h.

#define EXT3_APPEND_FL   0x00000020 /* writes to file may only append */

Definition at line 139 of file ext3.h.

#define EXT3_BAD_INO   1 /* Bad blocks inode */

Definition at line 62 of file ext3.h.

#define EXT3_BLOCK_SIZE (   s)    ((s)->s_blocksize)

Definition at line 83 of file ext3.h.

#define EXT3_BLOCK_SIZE_BITS (   s)    ((s)->s_blocksize_bits)

Definition at line 85 of file ext3.h.

#define EXT3_BLOCKS_PER_GROUP (   s)    (EXT3_SB(s)->s_blocks_per_group)

Definition at line 117 of file ext3.h.

#define EXT3_BOOT_LOADER_INO   5 /* Boot loader inode */

Definition at line 64 of file ext3.h.

#define ext3_clear_bit   __clear_bit_le

Definition at line 381 of file ext3.h.

#define ext3_clear_bit_atomic   ext2_clear_bit_atomic

Definition at line 382 of file ext3.h.

#define EXT3_CLEAR_COMPAT_FEATURE (   sb,
  mask 
)    EXT3_SB(sb)->s_es->s_feature_compat &= ~cpu_to_le32(mask)

Definition at line 763 of file ext3.h.

#define EXT3_CLEAR_INCOMPAT_FEATURE (   sb,
  mask 
)    EXT3_SB(sb)->s_es->s_feature_incompat &= ~cpu_to_le32(mask)

Definition at line 767 of file ext3.h.

#define EXT3_CLEAR_RO_COMPAT_FEATURE (   sb,
  mask 
)    EXT3_SB(sb)->s_es->s_feature_ro_compat &= ~cpu_to_le32(mask)

Definition at line 765 of file ext3.h.

#define EXT3_COMPR_FL   0x00000004 /* Compress file */

Definition at line 136 of file ext3.h.

#define EXT3_COMPRBLK_FL   0x00000200 /* One or more compressed clusters */

Definition at line 144 of file ext3.h.

#define EXT3_CURRENT_REV   EXT3_GOOD_OLD_REV

Definition at line 742 of file ext3.h.

#define EXT3_DATA_TRANS_BLOCKS (   sb)
Value:
EXT3_XATTR_TRANS_BLOCKS - 2 + \
EXT3_MAXQUOTAS_TRANS_BLOCKS(sb))

Definition at line 1141 of file ext3.h.

#define ext3_debug (   f,
  a... 
)    do {} while (0)

Definition at line 56 of file ext3.h.

#define EXT3_DEF_RESGID   0

Definition at line 799 of file ext3.h.

#define EXT3_DEF_RESUID   0

Definition at line 798 of file ext3.h.

#define EXT3_DEFAULT_RESERVE_BLOCKS   8

Definition at line 40 of file ext3.h.

#define EXT3_DEFM_ACL   0x0008

Definition at line 807 of file ext3.h.

#define EXT3_DEFM_BSDGROUPS   0x0002

Definition at line 805 of file ext3.h.

#define EXT3_DEFM_DEBUG   0x0001

Definition at line 804 of file ext3.h.

#define EXT3_DEFM_JMODE   0x0060

Definition at line 809 of file ext3.h.

#define EXT3_DEFM_JMODE_DATA   0x0020

Definition at line 810 of file ext3.h.

#define EXT3_DEFM_JMODE_ORDERED   0x0040

Definition at line 811 of file ext3.h.

#define EXT3_DEFM_JMODE_WBACK   0x0060

Definition at line 812 of file ext3.h.

#define EXT3_DEFM_UID16   0x0010

Definition at line 808 of file ext3.h.

#define EXT3_DEFM_XATTR_USER   0x0004

Definition at line 806 of file ext3.h.

#define EXT3_DELETE_TRANS_BLOCKS (   sb)    (EXT3_MAXQUOTAS_TRANS_BLOCKS(sb) + 64)

Definition at line 1149 of file ext3.h.

#define EXT3_DESC_PER_BLOCK (   s)    (EXT3_SB(s)->s_desc_per_block)

Definition at line 118 of file ext3.h.

#define EXT3_DESC_PER_BLOCK_BITS (   s)    (EXT3_SB(s)->s_desc_per_block_bits)

Definition at line 120 of file ext3.h.

#define EXT3_DFL_CHECKINTERVAL   0 /* Don't use interval check */

Definition at line 390 of file ext3.h.

#define EXT3_DFL_MAX_MNT_COUNT   20 /* Allow 20 mounts */

Definition at line 389 of file ext3.h.

#define EXT3_DIND_BLOCK   (EXT3_IND_BLOCK + 1)

Definition at line 127 of file ext3.h.

#define EXT3_DIR_LINK_EMPTY (   dir)    ((dir)->i_nlink == 2 || (dir)->i_nlink == 1)

Definition at line 902 of file ext3.h.

#define EXT3_DIR_LINK_MAX (   dir)    (!is_dx(dir) && (dir)->i_nlink >= EXT3_LINK_MAX)

Definition at line 901 of file ext3.h.

#define EXT3_DIR_PAD   4

Definition at line 860 of file ext3.h.

#define EXT3_DIR_REC_LEN (   name_len)
Value:
(((name_len) + 8 + EXT3_DIR_ROUND) & \
~EXT3_DIR_ROUND)

Definition at line 862 of file ext3.h.

#define EXT3_DIR_ROUND   (EXT3_DIR_PAD - 1)

Definition at line 861 of file ext3.h.

#define EXT3_DIRSYNC_FL   0x00010000 /* dirsync behaviour (directories only) */

Definition at line 152 of file ext3.h.

#define EXT3_DIRTY_FL   0x00000100

Definition at line 143 of file ext3.h.

#define EXT3_DYNAMIC_REV   1 /* V2 format w/ dynamic inode sizes */

Definition at line 740 of file ext3.h.

#define EXT3_ECOMPR_FL   0x00000800 /* Compression error */

Definition at line 146 of file ext3.h.

#define EXT3_ERROR_FS   0x0002 /* Errors detected */

Definition at line 329 of file ext3.h.

#define EXT3_ERRORS_CONTINUE   1 /* Continue execution */

Definition at line 395 of file ext3.h.

#define EXT3_ERRORS_DEFAULT   EXT3_ERRORS_CONTINUE

Definition at line 398 of file ext3.h.

#define EXT3_ERRORS_PANIC   3 /* Panic */

Definition at line 397 of file ext3.h.

#define EXT3_ERRORS_RO   2 /* Remount fs read-only */

Definition at line 396 of file ext3.h.

#define EXT3_FEATURE_COMPAT_DIR_INDEX   0x0020

Definition at line 775 of file ext3.h.

#define EXT3_FEATURE_COMPAT_DIR_PREALLOC   0x0001

Definition at line 770 of file ext3.h.

#define EXT3_FEATURE_COMPAT_EXT_ATTR   0x0008

Definition at line 773 of file ext3.h.

#define EXT3_FEATURE_COMPAT_HAS_JOURNAL   0x0004

Definition at line 772 of file ext3.h.

#define EXT3_FEATURE_COMPAT_IMAGIC_INODES   0x0002

Definition at line 771 of file ext3.h.

#define EXT3_FEATURE_COMPAT_RESIZE_INODE   0x0010

Definition at line 774 of file ext3.h.

#define EXT3_FEATURE_COMPAT_SUPP   EXT2_FEATURE_COMPAT_EXT_ATTR

Definition at line 787 of file ext3.h.

#define EXT3_FEATURE_INCOMPAT_COMPRESSION   0x0001

Definition at line 781 of file ext3.h.

#define EXT3_FEATURE_INCOMPAT_FILETYPE   0x0002

Definition at line 782 of file ext3.h.

#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV   0x0008 /* Journal device */

Definition at line 784 of file ext3.h.

#define EXT3_FEATURE_INCOMPAT_META_BG   0x0010

Definition at line 785 of file ext3.h.

#define EXT3_FEATURE_INCOMPAT_RECOVER   0x0004 /* Needs recovery */

Definition at line 783 of file ext3.h.

#define EXT3_FEATURE_INCOMPAT_SUPP
Value:
EXT3_FEATURE_INCOMPAT_RECOVER| \
EXT3_FEATURE_INCOMPAT_META_BG)

Definition at line 788 of file ext3.h.

#define EXT3_FEATURE_RO_COMPAT_BTREE_DIR   0x0004

Definition at line 779 of file ext3.h.

#define EXT3_FEATURE_RO_COMPAT_LARGE_FILE   0x0002

Definition at line 778 of file ext3.h.

#define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER   0x0001

Definition at line 777 of file ext3.h.

#define EXT3_FEATURE_RO_COMPAT_SUPP
Value:
EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
EXT3_FEATURE_RO_COMPAT_BTREE_DIR)

Definition at line 791 of file ext3.h.

#define ext3_find_next_zero_bit   find_next_zero_bit_le

Definition at line 384 of file ext3.h.

#define EXT3_FIRST_INO (   s)    (EXT3_SB(s)->s_first_ino)

Definition at line 88 of file ext3.h.

#define EXT3_FL_INHERITED
Value:
EXT3_SYNC_FL | EXT3_NODUMP_FL |\
EXT3_NOATIME_FL | EXT3_COMPRBLK_FL |\
EXT3_NOCOMPR_FL | EXT3_JOURNAL_DATA_FL |\
EXT3_NOTAIL_FL | EXT3_DIRSYNC_FL)

Definition at line 160 of file ext3.h.

#define EXT3_FL_USER_MODIFIABLE   0x000380FF /* User modifiable flags */

Definition at line 157 of file ext3.h.

#define EXT3_FL_USER_VISIBLE   0x0003DFFF /* User visible flags */

Definition at line 156 of file ext3.h.

#define EXT3_FRAG_SIZE (   s)    (EXT3_SB(s)->s_frag_size)

Definition at line 96 of file ext3.h.

#define EXT3_FRAGS_PER_BLOCK (   s)    (EXT3_SB(s)->s_frags_per_block)

Definition at line 97 of file ext3.h.

#define EXT3_FT_BLKDEV   4

Definition at line 848 of file ext3.h.

#define EXT3_FT_CHRDEV   3

Definition at line 847 of file ext3.h.

#define EXT3_FT_DIR   2

Definition at line 846 of file ext3.h.

#define EXT3_FT_FIFO   5

Definition at line 849 of file ext3.h.

#define EXT3_FT_MAX   8

Definition at line 853 of file ext3.h.

#define EXT3_FT_REG_FILE   1

Definition at line 845 of file ext3.h.

#define EXT3_FT_SOCK   6

Definition at line 850 of file ext3.h.

#define EXT3_FT_SYMLINK   7

Definition at line 851 of file ext3.h.

#define EXT3_FT_UNKNOWN   0

Definition at line 844 of file ext3.h.

#define EXT3_GOOD_OLD_FIRST_INO   11

Definition at line 70 of file ext3.h.

#define EXT3_GOOD_OLD_INODE_SIZE   128

Definition at line 745 of file ext3.h.

#define EXT3_GOOD_OLD_REV   0 /* The good old (original) format */

Definition at line 739 of file ext3.h.

#define EXT3_HAS_COMPAT_FEATURE (   sb,
  mask 
)    ( EXT3_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask) )

Definition at line 751 of file ext3.h.

#define EXT3_HAS_INCOMPAT_FEATURE (   sb,
  mask 
)    ( EXT3_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(mask) )

Definition at line 755 of file ext3.h.

#define EXT3_HAS_RO_COMPAT_FEATURE (   sb,
  mask 
)    ( EXT3_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask) )

Definition at line 753 of file ext3.h.

#define EXT3_HTREE_EOF_32BIT   ((1UL << (32 - 1)) - 1)

Definition at line 924 of file ext3.h.

#define EXT3_HTREE_EOF_64BIT   ((1ULL << (64 - 1)) - 1)

Definition at line 925 of file ext3.h.

#define EXT3_IMAGIC_FL   0x00002000 /* AFS directory */

Definition at line 149 of file ext3.h.

#define EXT3_IMMUTABLE_FL   0x00000010 /* Immutable file */

Definition at line 138 of file ext3.h.

#define EXT3_IND_BLOCK   EXT3_NDIR_BLOCKS

Definition at line 126 of file ext3.h.

#define EXT3_INDEX_EXTRA_TRANS_BLOCKS   8

Definition at line 1168 of file ext3.h.

#define EXT3_INDEX_FL   0x00001000 /* hash-indexed directory */

Definition at line 148 of file ext3.h.

#define EXT3_INODE_SIZE (   s)    (EXT3_SB(s)->s_inode_size)

Definition at line 87 of file ext3.h.

#define EXT3_INODES_PER_GROUP (   s)    (EXT3_SB(s)->s_inodes_per_group)

Definition at line 119 of file ext3.h.

#define EXT3_IOC32_GETFLAGS   FS_IOC32_GETFLAGS

Definition at line 227 of file ext3.h.

#define EXT3_IOC32_GETRSVSZ   _IOR('f', 5, int)

Definition at line 231 of file ext3.h.

#define EXT3_IOC32_GETVERSION   _IOR('f', 3, int)

Definition at line 229 of file ext3.h.

#define EXT3_IOC32_GETVERSION_OLD   FS_IOC32_GETVERSION

Definition at line 237 of file ext3.h.

#define EXT3_IOC32_GROUP_EXTEND   _IOW('f', 7, unsigned int)

Definition at line 233 of file ext3.h.

#define EXT3_IOC32_SETFLAGS   FS_IOC32_SETFLAGS

Definition at line 228 of file ext3.h.

#define EXT3_IOC32_SETRSVSZ   _IOW('f', 6, int)

Definition at line 232 of file ext3.h.

#define EXT3_IOC32_SETVERSION   _IOW('f', 4, int)

Definition at line 230 of file ext3.h.

#define EXT3_IOC32_SETVERSION_OLD   FS_IOC32_SETVERSION

Definition at line 238 of file ext3.h.

#define EXT3_IOC_GETFLAGS   FS_IOC_GETFLAGS

Definition at line 210 of file ext3.h.

#define EXT3_IOC_GETRSVSZ   _IOR('f', 5, long)

Definition at line 221 of file ext3.h.

#define EXT3_IOC_GETVERSION   _IOR('f', 3, long)

Definition at line 212 of file ext3.h.

#define EXT3_IOC_GETVERSION_OLD   FS_IOC_GETVERSION

Definition at line 216 of file ext3.h.

#define EXT3_IOC_GROUP_ADD   _IOW('f', 8,struct ext3_new_group_input)

Definition at line 215 of file ext3.h.

#define EXT3_IOC_GROUP_EXTEND   _IOW('f', 7, unsigned long)

Definition at line 214 of file ext3.h.

#define EXT3_IOC_SETFLAGS   FS_IOC_SETFLAGS

Definition at line 211 of file ext3.h.

#define EXT3_IOC_SETRSVSZ   _IOW('f', 6, long)

Definition at line 222 of file ext3.h.

#define EXT3_IOC_SETVERSION   _IOW('f', 4, long)

Definition at line 213 of file ext3.h.

#define EXT3_IOC_SETVERSION_OLD   FS_IOC_SETVERSION

Definition at line 217 of file ext3.h.

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

Definition at line 1118 of file ext3.h.

#define EXT3_JOURNAL_DATA_FL   0x00004000 /* file data should be journaled */

Definition at line 150 of file ext3.h.

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

Definition at line 1246 of file ext3.h.

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

Definition at line 1248 of file ext3.h.

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

Definition at line 1244 of file ext3.h.

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

Definition at line 1238 of file ext3.h.

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

Definition at line 1240 of file ext3.h.

#define EXT3_JOURNAL_INO   8 /* Journal inode */

Definition at line 67 of file ext3.h.

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

Definition at line 1242 of file ext3.h.

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

Definition at line 1261 of file ext3.h.

#define EXT3_LINK_MAX   32000

Definition at line 75 of file ext3.h.

#define EXT3_MAX_BLOCK_SIZE   65536

Definition at line 81 of file ext3.h.

#define EXT3_MAX_FRAG_SIZE   4096

Definition at line 94 of file ext3.h.

#define EXT3_MAX_REC_LEN   ((1<<16)-1)

Definition at line 864 of file ext3.h.

#define EXT3_MAX_RESERVE_BLOCKS   1027

Definition at line 42 of file ext3.h.

#define EXT3_MAX_SUPP_REV   EXT3_DYNAMIC_REV

Definition at line 743 of file ext3.h.

#define EXT3_MAX_TRANS_DATA   64U

Definition at line 1157 of file ext3.h.

#define EXT3_MAXQUOTAS_DEL_BLOCKS (   sb)    (MAXQUOTAS*EXT3_QUOTA_DEL_BLOCKS(sb))

Definition at line 1187 of file ext3.h.

#define EXT3_MAXQUOTAS_INIT_BLOCKS (   sb)    (MAXQUOTAS*EXT3_QUOTA_INIT_BLOCKS(sb))

Definition at line 1186 of file ext3.h.

#define EXT3_MAXQUOTAS_TRANS_BLOCKS (   sb)    (MAXQUOTAS*EXT3_QUOTA_TRANS_BLOCKS(sb))

Definition at line 1185 of file ext3.h.

#define EXT3_MIN_BLOCK_LOG_SIZE   10

Definition at line 82 of file ext3.h.

#define EXT3_MIN_BLOCK_SIZE   1024

Definition at line 80 of file ext3.h.

#define EXT3_MIN_FRAG_LOG_SIZE   10

Definition at line 95 of file ext3.h.

#define EXT3_MIN_FRAG_SIZE   1024

Definition at line 93 of file ext3.h.

#define EXT3_MOUNT_ABORT   0x00200 /* Fatal error detected */

Definition at line 351 of file ext3.h.

#define EXT3_MOUNT_BARRIER   0x20000 /* Use block barriers */

Definition at line 361 of file ext3.h.

#define EXT3_MOUNT_CHECK   0x00001 /* Do mount-time checks */

Definition at line 342 of file ext3.h.

#define EXT3_MOUNT_DATA_ERR_ABORT
Value:
0x400000 /* Abort on file data write
* error in ordered mode */

Definition at line 365 of file ext3.h.

#define EXT3_MOUNT_DATA_FLAGS   0x00C00 /* Mode for data writes: */

Definition at line 352 of file ext3.h.

#define EXT3_MOUNT_DEBUG   0x00008 /* Some debugging messages */

Definition at line 345 of file ext3.h.

#define EXT3_MOUNT_ERRORS_CONT   0x00010 /* Continue on errors */

Definition at line 346 of file ext3.h.

#define EXT3_MOUNT_ERRORS_PANIC   0x00040 /* Panic on errors */

Definition at line 348 of file ext3.h.

#define EXT3_MOUNT_ERRORS_RO   0x00020 /* Remount fs ro on errors */

Definition at line 347 of file ext3.h.

#define EXT3_MOUNT_GRPID   0x00004 /* Create files with directory's group */

Definition at line 344 of file ext3.h.

#define EXT3_MOUNT_GRPQUOTA   0x200000 /* "old" group quota */

Definition at line 364 of file ext3.h.

#define EXT3_MOUNT_JOURNAL_DATA   0x00400 /* Write data to journal */

Definition at line 353 of file ext3.h.

#define EXT3_MOUNT_MINIX_DF   0x00080 /* Mimics the Minix statfs */

Definition at line 349 of file ext3.h.

#define EXT3_MOUNT_NO_UID32   0x02000 /* Disable 32-bit UIDs */

Definition at line 357 of file ext3.h.

#define EXT3_MOUNT_NOLOAD   0x00100 /* Don't use existing journal*/

Definition at line 350 of file ext3.h.

#define EXT3_MOUNT_ORDERED_DATA   0x00800 /* Flush data before commit */

Definition at line 354 of file ext3.h.

#define EXT3_MOUNT_POSIX_ACL   0x08000 /* POSIX Access Control Lists */

Definition at line 359 of file ext3.h.

#define EXT3_MOUNT_QUOTA   0x80000 /* Some quota option set */

Definition at line 362 of file ext3.h.

#define EXT3_MOUNT_RESERVATION   0x10000 /* Preallocation */

Definition at line 360 of file ext3.h.

#define EXT3_MOUNT_UPDATE_JOURNAL   0x01000 /* Update the journal format */

Definition at line 356 of file ext3.h.

#define EXT3_MOUNT_USRQUOTA   0x100000 /* "old" user quota */

Definition at line 363 of file ext3.h.

#define EXT3_MOUNT_WRITEBACK_DATA   0x00C00 /* No data ordering */

Definition at line 355 of file ext3.h.

#define EXT3_MOUNT_XATTR_USER   0x04000 /* Extended user attributes */

Definition at line 358 of file ext3.h.

#define EXT3_N_BLOCKS   (EXT3_TIND_BLOCK + 1)

Definition at line 129 of file ext3.h.

#define EXT3_NAME_LEN   255

Definition at line 817 of file ext3.h.

#define EXT3_NDIR_BLOCKS   12

Definition at line 125 of file ext3.h.

#define EXT3_NOATIME_FL   0x00000080 /* do not update atime */

Definition at line 141 of file ext3.h.

#define EXT3_NOCOMPR_FL   0x00000400 /* Don't compress */

Definition at line 145 of file ext3.h.

#define EXT3_NODUMP_FL   0x00000040 /* do not dump file */

Definition at line 140 of file ext3.h.

#define EXT3_NOTAIL_FL   0x00008000 /* file tail should not be merged */

Definition at line 151 of file ext3.h.

#define EXT3_ORPHAN_FS   0x0004 /* Orphans being recovered */

Definition at line 330 of file ext3.h.

#define EXT3_OS_FREEBSD   3

Definition at line 733 of file ext3.h.

#define EXT3_OS_HURD   1

Definition at line 731 of file ext3.h.

#define EXT3_OS_LINUX   0

Definition at line 730 of file ext3.h.

#define EXT3_OS_LITES   4

Definition at line 734 of file ext3.h.

#define EXT3_OS_MASIX   2

Definition at line 732 of file ext3.h.

#define EXT3_OTHER_FLMASK   (EXT3_NODUMP_FL | EXT3_NOATIME_FL)

Definition at line 170 of file ext3.h.

#define EXT3_QUOTA_DEL_BLOCKS (   sb)    0

Definition at line 1183 of file ext3.h.

#define EXT3_QUOTA_INIT_BLOCKS (   sb)    0

Definition at line 1182 of file ext3.h.

#define EXT3_QUOTA_TRANS_BLOCKS (   sb)    0

Definition at line 1181 of file ext3.h.

#define EXT3_REG_FLMASK   (~(EXT3_DIRSYNC_FL | EXT3_TOPDIR_FL))

Definition at line 167 of file ext3.h.

#define EXT3_RESERVE_TRANS_BLOCKS   12U

Definition at line 1166 of file ext3.h.

#define EXT3_RESERVE_WINDOW_NOT_ALLOCATED   0

Definition at line 43 of file ext3.h.

#define EXT3_RESERVED_FL   0x80000000 /* reserved for ext3 lib */

Definition at line 154 of file ext3.h.

#define EXT3_RESIZE_INO   7 /* Reserved group descriptors inode */

Definition at line 66 of file ext3.h.

#define EXT3_ROOT_INO   2 /* Root inode */

Definition at line 63 of file ext3.h.

#define EXT3_SECRM_FL   0x00000001 /* Secure deletion */

Definition at line 134 of file ext3.h.

#define ext3_set_bit   __set_bit_le

Definition at line 379 of file ext3.h.

#define ext3_set_bit_atomic   ext2_set_bit_atomic

Definition at line 380 of file ext3.h.

#define EXT3_SET_COMPAT_FEATURE (   sb,
  mask 
)    EXT3_SB(sb)->s_es->s_feature_compat |= cpu_to_le32(mask)

Definition at line 757 of file ext3.h.

#define EXT3_SET_INCOMPAT_FEATURE (   sb,
  mask 
)    EXT3_SB(sb)->s_es->s_feature_incompat |= cpu_to_le32(mask)

Definition at line 761 of file ext3.h.

#define EXT3_SET_RO_COMPAT_FEATURE (   sb,
  mask 
)    EXT3_SB(sb)->s_es->s_feature_ro_compat |= cpu_to_le32(mask)

Definition at line 759 of file ext3.h.

#define EXT3_SINGLEDATA_TRANS_BLOCKS   8U

Definition at line 1127 of file ext3.h.

#define ext3_std_error (   sb,
  errno 
)
Value:
do { \
if ((errno)) \
__ext3_std_error((sb), __func__, (errno)); \
} while (0)

Definition at line 1093 of file ext3.h.

#define EXT3_SYNC_FL   0x00000008 /* Synchronous updates */

Definition at line 137 of file ext3.h.

#define ext3_test_bit   test_bit_le

Definition at line 383 of file ext3.h.

#define EXT3_TIND_BLOCK   (EXT3_DIND_BLOCK + 1)

Definition at line 128 of file ext3.h.

#define EXT3_TOPDIR_FL   0x00020000 /* Top of directory hierarchies*/

Definition at line 153 of file ext3.h.

#define EXT3_UNDEL_DIR_INO   6 /* Undelete directory inode */

Definition at line 65 of file ext3.h.

#define EXT3_UNRM_FL   0x00000002 /* Undelete */

Definition at line 135 of file ext3.h.

#define EXT3_VALID_FS   0x0001 /* Unmounted cleanly */

Definition at line 328 of file ext3.h.

#define EXT3_XATTR_TRANS_BLOCKS   6U

Definition at line 1133 of file ext3.h.

#define HASH_NB_ALWAYS   1

Definition at line 931 of file ext3.h.

#define i_frag   osd2.linux2.l_i_frag

Definition at line 317 of file ext3.h.

#define i_fsize   osd2.linux2.l_i_fsize

Definition at line 318 of file ext3.h.

#define i_gid_high   osd2.linux2.l_i_gid_high

Definition at line 322 of file ext3.h.

#define i_gid_low   i_gid

Definition at line 320 of file ext3.h.

#define i_reserved1   osd1.linux1.l_i_reserved1

Definition at line 316 of file ext3.h.

#define i_reserved2   osd2.linux2.l_i_reserved2

Definition at line 323 of file ext3.h.

#define i_size_high   i_dir_acl

Definition at line 314 of file ext3.h.

#define i_uid_high   osd2.linux2.l_i_uid_high

Definition at line 321 of file ext3.h.

#define i_uid_low   i_uid

Definition at line 319 of file ext3.h.

#define is_dx (   dir)
Value:
(EXT3_I(dir)->i_flags & EXT3_INDEX_FL))

Definition at line 898 of file ext3.h.

#define NEXT_ORPHAN (   inode)    EXT3_I(inode)->i_dtime

Definition at line 725 of file ext3.h.

#define NORET_AND   noreturn,

Definition at line 987 of file ext3.h.

#define NORET_TYPE

Definition at line 985 of file ext3.h.

#define rsv_end   rsv_window._rsv_end

Definition at line 532 of file ext3.h.

#define rsv_start   rsv_window._rsv_start

Definition at line 531 of file ext3.h.

#define set_opt (   o,
  opt 
)    o |= EXT3_MOUNT_##opt

Definition at line 370 of file ext3.h.

#define test_opt (   sb,
  opt 
)
Value:
(EXT3_SB(sb)->s_mount_opt & \
EXT3_MOUNT_##opt)

Definition at line 371 of file ext3.h.

Typedef Documentation

typedef unsigned long ext3_fsblk_t

Definition at line 495 of file ext3.h.

typedef int ext3_grpblk_t

Definition at line 492 of file ext3.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
EXT3_STATE_JDATA 
EXT3_STATE_NEW 
EXT3_STATE_XATTR 
EXT3_STATE_FLUSH_ON_CLOSE 

Definition at line 703 of file ext3.h.

Function Documentation

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

Definition at line 52 of file ext3_jbd.c.

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

Definition at line 25 of file ext3_jbd.c.

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

Definition at line 43 of file ext3_jbd.c.

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

Definition at line 7 of file ext3_jbd.c.

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

Definition at line 16 of file ext3_jbd.c.

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

Definition at line 34 of file ext3_jbd.c.

int __ext3_journal_stop ( const char where,
handle_t *  handle 
)

Definition at line 88 of file super.c.

const char const char void __ext3_std_error ( struct super_block ,
const char ,
int   
)

Definition at line 240 of file super.c.

__printf ( ,
 
)
int ext3_bg_has_super ( struct super_block sb,
int  group 
)

ext3_bg_has_super - number of blocks used by the superblock in group : superblock for filesystem : group number to check

Return the number of blocks used by the superblock (primary or backup) in this group. Currently this will be only 0 or 1.

Definition at line 1860 of file balloc.c.

unsigned long ext3_bg_num_gdb ( struct super_block sb,
int  group 
)

ext3_bg_num_gdb - number of blocks used by the group table in group : superblock for filesystem : group number to check

Return the number of blocks used by the group descriptor table (primary or backup) in this group. In the future there may be a different number of descriptor blocks in each group.

Definition at line 1894 of file balloc.c.

struct buffer_head* ext3_bread ( handle_t *  ,
struct inode ,
int  ,
int  ,
int  
)
read

Definition at line 1123 of file inode.c.

int ext3_can_truncate ( struct inode inode)

Definition at line 2489 of file inode.c.

int ext3_change_inode_journal_flag ( struct inode ,
int   
)

Definition at line 3553 of file inode.c.

void ext3_check_blocks_bitmap ( struct super_block )
int ext3_check_dir_entry ( const char ,
struct inode ,
struct ext3_dir_entry_2 ,
struct buffer_head *  ,
unsigned  long 
)

Definition at line 63 of file dir.c.

void ext3_check_inodes_bitmap ( struct super_block )
long ext3_compat_ioctl ( struct file ,
unsigned  int,
unsigned  long 
)
unsigned long ext3_count_dirs ( struct super_block )

Definition at line 693 of file ialloc.c.

unsigned long ext3_count_free ( struct buffer_head *  ,
unsigned   
)
ext3_fsblk_t ext3_count_free_blocks ( struct super_block sb)

ext3_count_free_blocks() – count filesystem free blocks : superblock

Adds up the number of free blocks from each block group.

Definition at line 1780 of file balloc.c.

unsigned long ext3_count_free_inodes ( struct super_block )

Definition at line 646 of file ialloc.c.

void ext3_dirty_inode ( struct inode ,
int   
)

Definition at line 3501 of file inode.c.

void ext3_discard_reservation ( struct inode inode)

ext3_discard_reservation() : inode

Discard(free) block reservation window on last file close, or truncate or at last iput().

It is being called in three cases: ext3_release_file(): last writer close the file ext3_clear_inode(): last iput(), when nobody link to this file. ext3_truncate(): when the block indirect map is about to change.

Definition at line 461 of file balloc.c.

void ext3_evict_inode ( struct inode )

Definition at line 187 of file inode.c.

int ext3_fiemap ( struct inode inode,
struct fiemap_extent_info fieinfo,
u64  start,
u64  len 
)

Definition at line 1046 of file inode.c.

int ext3_force_commit ( struct super_block sb)

Definition at line 2508 of file super.c.

int ext3_forget ( handle_t *  handle,
int  is_metadata,
struct inode inode,
struct buffer_head *  bh,
ext3_fsblk_t  blocknr 
)

Definition at line 57 of file inode.c.

void ext3_free_blocks ( handle_t *  handle,
struct inode inode,
ext3_fsblk_t  block,
unsigned long  count 
)

ext3_free_blocks() – Free given blocks and update quota : handle for this transaction : inode : start physical block to free : number of blocks to count

Definition at line 680 of file balloc.c.

void ext3_free_blocks_sb ( handle_t *  handle,
struct super_block sb,
ext3_fsblk_t  block,
unsigned long  count,
unsigned long pdquot_freed_blocks 
)

ext3_free_blocks_sb() – Free given blocks and update quota : handle to this transaction : super block : start physical block to free : number of blocks to free : pointer to quota

Definition at line 490 of file balloc.c.

void ext3_free_inode ( handle_t *  ,
struct inode  
)

Definition at line 79 of file ialloc.c.

int ext3_get_blocks_handle ( handle_t *  handle,
struct inode inode,
sector_t  iblock,
unsigned long  maxblocks,
struct buffer_head *  bh_result,
int  create 
)

Definition at line 851 of file inode.c.

struct ext3_group_desc* ext3_get_group_desc ( struct super_block sb,
unsigned int  block_group,
struct buffer_head **  bh 
)
read

ext3_get_group_desc() – load group descriptor from disk : super block : given block group : pointer to the buffer head to store the block group descriptor

Definition at line 58 of file balloc.c.

void ext3_get_inode_flags ( struct ext3_inode_info )

Definition at line 2865 of file inode.c.

int ext3_get_inode_loc ( struct inode ,
struct ext3_iloc  
)

Definition at line 2840 of file inode.c.

struct buffer_head* ext3_getblk ( handle_t *  ,
struct inode ,
long  ,
int  ,
int  
)
read

Definition at line 1056 of file inode.c.

int ext3_group_add ( struct super_block sb,
struct ext3_new_group_data input 
)

Definition at line 783 of file resize.c.

int ext3_group_extend ( struct super_block sb,
struct ext3_super_block es,
ext3_fsblk_t  n_blocks_count 
)

Definition at line 991 of file resize.c.

int ext3_htree_fill_tree ( struct file dir_file,
__u32  start_hash,
__u32  start_minor_hash,
__u32 next_hash 
)

Definition at line 613 of file namei.c.

void ext3_htree_free_dir_info ( struct dir_private_info p)

Definition at line 384 of file dir.c.

int ext3_htree_store_dirent ( struct file dir_file,
__u32  hash,
__u32  minor_hash,
struct ext3_dir_entry_2 dirent 
)

Definition at line 393 of file dir.c.

struct inode* ext3_iget ( struct super_block ,
unsigned  long 
)
read

Definition at line 2883 of file inode.c.

void ext3_init_block_alloc_info ( struct inode inode)

ext3_init_block_alloc_info() : file inode structure

Allocate and initialize the reservation window structure, and link the window to the ext3 inode structure at last

The reservation window structure is only dynamically allocated and linked to ext3 inode the first time the open file needs a new block. So, before every ext3_new_block(s) call, for regular files, we should check whether the reservation window structure exists or not. In the latter case, this function is called. Fail to do so will result in block reservation being turned off for that open file.

This function is called from ext3_get_blocks_handle(), also called when setting the reservation window size through ioctl before the file is open for write (needs block allocation).

Needs truncate_mutex protection prior to call this function.

Definition at line 419 of file balloc.c.

long ext3_ioctl ( struct file ,
unsigned  int,
unsigned  long 
)

Definition at line 15 of file ioctl.c.

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

Definition at line 105 of file super.c.

int ext3_journal_dirty_data ( handle_t *  handle,
struct buffer_head *  bh 
)

Definition at line 1313 of file inode.c.

handle_t* ext3_journal_start_sb ( struct super_block sb,
int  nblocks 
)

Definition at line 68 of file super.c.

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

Definition at line 3422 of file inode.c.

int ext3_mark_inode_dirty ( handle_t *  handle,
struct inode inode 
)

Definition at line 3474 of file inode.c.

ext3_fsblk_t ext3_new_block ( handle_t *  handle,
struct inode inode,
ext3_fsblk_t  goal,
int errp 
)

Definition at line 1766 of file balloc.c.

ext3_fsblk_t ext3_new_blocks ( handle_t *  handle,
struct inode inode,
ext3_fsblk_t  goal,
unsigned long count,
int errp 
)

ext3_new_blocks() – core block(s) allocation function : handle to this transaction : file inode : given target block(filesystem wide) : target number of blocks to allocate : error code

ext3_new_blocks uses a goal block to assist allocation. It tries to allocate block(s) from the block group contains the goal block first. If that fails, it will try to allocate block(s) from other block groups without any specific goal block.

Definition at line 1486 of file balloc.c.

struct inode* ext3_new_inode ( handle_t *  ,
struct inode ,
const struct qstr ,
umode_t   
)
read

Definition at line 346 of file ialloc.c.

int ext3_orphan_add ( handle_t *  ,
struct inode  
)

Definition at line 1933 of file namei.c.

int ext3_orphan_del ( handle_t *  ,
struct inode  
)

Definition at line 2000 of file namei.c.

struct inode* ext3_orphan_get ( struct super_block ,
unsigned  long 
)
read

Definition at line 570 of file ialloc.c.

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

Definition at line 3442 of file inode.c.

void ext3_rsv_window_add ( struct super_block sb,
struct ext3_reserve_window_node rsv 
)

ext3_rsv_window_add() – Insert a window to the block reservation rb tree. : super block : reservation window to add

Must be called with rsv_lock hold.

Definition at line 337 of file balloc.c.

void ext3_set_aops ( struct inode inode)

Definition at line 2014 of file inode.c.

void ext3_set_inode_flags ( struct inode )

Definition at line 2847 of file inode.c.

int ext3_setattr ( struct dentry ,
struct iattr  
)

Definition at line 3272 of file inode.c.

int ext3_should_retry_alloc ( struct super_block sb,
int retries 
)

ext3_should_retry_alloc() : super block number of attemps has been made

ext3_should_retry_alloc() is called when ENOSPC is returned, and if it is profitable to retry the operation, this function will wait for the current or committing transaction to complete, and then return TRUE.

if the total number of retries exceed three times, return FALSE.

Definition at line 1462 of file balloc.c.

int ext3_sync_file ( struct file ,
loff_t  ,
loff_t  ,
int   
)

Definition at line 41 of file fsync.c.

int ext3_sync_inode ( handle_t *  ,
struct inode  
)
int ext3_trim_fs ( struct super_block sb,
struct fstrim_range range 
)

ext3_trim_fs() – trim ioctl handle function : superblock for filesystem : First Byte to trim : number of Bytes to trim from start : minimum extent length in Bytes

ext3_trim_fs goes through all allocation groups containing Bytes from start to start+len. For each such a group ext3_trim_all_free function is invoked to trim all free space.

Definition at line 2088 of file balloc.c.

void ext3_truncate ( struct inode inode)

Definition at line 2528 of file inode.c.

const char const char const char const char const char const char void ext3_update_dynamic_rev ( struct super_block sb)

Definition at line 317 of file super.c.

int ext3_write_inode ( struct inode ,
struct writeback_control  
)

Definition at line 3238 of file inode.c.

int ext3fs_dirhash ( const char name,
int  len,
struct dx_hash_info hinfo 
)

Definition at line 137 of file hash.c.

Variable Documentation

struct inode_operations ext3_dir_inode_operations

Definition at line 2514 of file namei.c.

struct file_operations ext3_dir_operations

Definition at line 582 of file dir.c.

struct inode_operations ext3_fast_symlink_inode_operations

Definition at line 44 of file symlink.c.

struct inode_operations ext3_file_inode_operations

Definition at line 69 of file file.c.

struct file_operations ext3_file_operations

Definition at line 51 of file file.c.

struct inode_operations ext3_special_inode_operations

Definition at line 2534 of file namei.c.

struct inode_operations ext3_symlink_inode_operations

Definition at line 31 of file symlink.c.