#ifndef _EXT4_H
#define _EXT4_H
#include <linux/refcount.h>
#include <linux/types.h>
#include <linux/blkdev.h>
#include <linux/magic.h>
#include <linux/jbd2.h>
#include <linux/quota.h>
#include <linux/rwsem.h>
#include <linux/rbtree.h>
#include <linux/seqlock.h>
#include <linux/mutex.h>
#include <linux/timer.h>
#include <linux/wait.h>
#include <linux/sched/signal.h>
#include <linux/blockgroup_lock.h>
#include <linux/percpu_counter.h>
#include <linux/ratelimit.h>
#include <crypto/hash.h>
#include <linux/falloc.h>
#include <linux/percpu-rwsem.h>
#include <linux/fiemap.h>
#ifdef __KERNEL__
#include <linux/compat.h>
#endif
#include <uapi/linux/ext4.h>
#include <linux/fscrypt.h>
#include <linux/fsverity.h>
#include <linux/compiler.h>
#define AGGRESSIVE_CHECK__
#define DOUBLE_CHECK__
#undef EXT4FS_DEBUG
#ifdef EXT4FS_DEBUG
#define ext4_debug …
#else
#define ext4_debug(fmt, ...) …
#endif
#define EXT_DEBUG__
#ifdef CONFIG_EXT4_DEBUG
#define ext_debug(ino, fmt, ...) …
#else
#define ext_debug …
#endif
#define ASSERT(assert) …
ext4_grpblk_t;
ext4_fsblk_t;
ext4_lblk_t;
ext4_group_t;
enum SHIFT_DIRECTION { … };
enum criteria { … };
#define EXT4_MB_HINT_MERGE …
#define EXT4_MB_HINT_RESERVED …
#define EXT4_MB_HINT_METADATA …
#define EXT4_MB_HINT_FIRST …
#define EXT4_MB_HINT_BEST …
#define EXT4_MB_HINT_DATA …
#define EXT4_MB_HINT_NOPREALLOC …
#define EXT4_MB_HINT_GROUP_ALLOC …
#define EXT4_MB_HINT_GOAL_ONLY …
#define EXT4_MB_HINT_TRY_GOAL …
#define EXT4_MB_DELALLOC_RESERVED …
#define EXT4_MB_STREAM_ALLOC …
#define EXT4_MB_USE_ROOT_BLOCKS …
#define EXT4_MB_USE_RESERVED …
#define EXT4_MB_STRICT_CHECK …
#define EXT4_MB_CR_POWER2_ALIGNED_OPTIMIZED …
#define EXT4_MB_CR_GOAL_LEN_FAST_OPTIMIZED …
#define EXT4_MB_CR_BEST_AVAIL_LEN_OPTIMIZED …
struct ext4_allocation_request { … };
#define EXT4_MAP_NEW …
#define EXT4_MAP_MAPPED …
#define EXT4_MAP_UNWRITTEN …
#define EXT4_MAP_BOUNDARY …
#define EXT4_MAP_DELAYED …
#define EXT4_MAP_FLAGS …
struct ext4_map_blocks { … };
struct ext4_system_blocks { … };
#define EXT4_IO_END_UNWRITTEN …
struct ext4_io_end_vec { … };
ext4_io_end_t;
struct ext4_io_submit { … };
#define EXT4_BAD_INO …
#define EXT4_ROOT_INO …
#define EXT4_USR_QUOTA_INO …
#define EXT4_GRP_QUOTA_INO …
#define EXT4_BOOT_LOADER_INO …
#define EXT4_UNDEL_DIR_INO …
#define EXT4_RESIZE_INO …
#define EXT4_JOURNAL_INO …
#define EXT4_GOOD_OLD_FIRST_INO …
#define EXT4_LINK_MAX …
#define EXT4_MIN_BLOCK_SIZE …
#define EXT4_MAX_BLOCK_SIZE …
#define EXT4_MIN_BLOCK_LOG_SIZE …
#define EXT4_MAX_BLOCK_LOG_SIZE …
#define EXT4_MAX_CLUSTER_LOG_SIZE …
#ifdef __KERNEL__
#define EXT4_BLOCK_SIZE(s) …
#else
#define EXT4_BLOCK_SIZE …
#endif
#define EXT4_ADDR_PER_BLOCK(s) …
#define EXT4_CLUSTER_SIZE(s) …
#ifdef __KERNEL__
#define EXT4_BLOCK_SIZE_BITS(s) …
#define EXT4_CLUSTER_BITS(s) …
#else
#define EXT4_BLOCK_SIZE_BITS …
#endif
#ifdef __KERNEL__
#define EXT4_ADDR_PER_BLOCK_BITS(s) …
#define EXT4_INODE_SIZE(s) …
#define EXT4_FIRST_INO(s) …
#else
#define EXT4_INODE_SIZE …
#define EXT4_FIRST_INO …
#endif
#define EXT4_BLOCK_ALIGN(size, blkbits) …
#define EXT4_MAX_BLOCKS(size, offset, blkbits) …
#define EXT4_B2C(sbi, blk) …
#define EXT4_C2B(sbi, cluster) …
#define EXT4_NUM_B2C(sbi, blks) …
#define EXT4_PBLK_CMASK(s, pblk) …
#define EXT4_LBLK_CMASK(s, lblk) …
#define EXT4_LBLK_CFILL(sbi, lblk) …
#define EXT4_PBLK_COFF(s, pblk) …
#define EXT4_LBLK_COFF(s, lblk) …
struct ext4_group_desc
{ … };
#define EXT4_BG_INODE_BITMAP_CSUM_HI_END …
#define EXT4_BG_BLOCK_BITMAP_CSUM_HI_END …
struct flex_groups { … };
#define EXT4_BG_INODE_UNINIT …
#define EXT4_BG_BLOCK_UNINIT …
#define EXT4_BG_INODE_ZEROED …
#define EXT4_MIN_DESC_SIZE …
#define EXT4_MIN_DESC_SIZE_64BIT …
#define EXT4_MAX_DESC_SIZE …
#define EXT4_DESC_SIZE(s) …
#ifdef __KERNEL__
#define EXT4_BLOCKS_PER_GROUP(s) …
#define EXT4_CLUSTERS_PER_GROUP(s) …
#define EXT4_DESC_PER_BLOCK(s) …
#define EXT4_INODES_PER_GROUP(s) …
#define EXT4_DESC_PER_BLOCK_BITS(s) …
#else
#define EXT4_BLOCKS_PER_GROUP …
#define EXT4_DESC_PER_BLOCK …
#define EXT4_INODES_PER_GROUP …
#endif
#define EXT4_NDIR_BLOCKS …
#define EXT4_IND_BLOCK …
#define EXT4_DIND_BLOCK …
#define EXT4_TIND_BLOCK …
#define EXT4_N_BLOCKS …
#define EXT4_SECRM_FL …
#define EXT4_UNRM_FL …
#define EXT4_COMPR_FL …
#define EXT4_SYNC_FL …
#define EXT4_IMMUTABLE_FL …
#define EXT4_APPEND_FL …
#define EXT4_NODUMP_FL …
#define EXT4_NOATIME_FL …
#define EXT4_DIRTY_FL …
#define EXT4_COMPRBLK_FL …
#define EXT4_NOCOMPR_FL …
#define EXT4_ENCRYPT_FL …
#define EXT4_INDEX_FL …
#define EXT4_IMAGIC_FL …
#define EXT4_JOURNAL_DATA_FL …
#define EXT4_NOTAIL_FL …
#define EXT4_DIRSYNC_FL …
#define EXT4_TOPDIR_FL …
#define EXT4_HUGE_FILE_FL …
#define EXT4_EXTENTS_FL …
#define EXT4_VERITY_FL …
#define EXT4_EA_INODE_FL …
#define EXT4_DAX_FL …
#define EXT4_INLINE_DATA_FL …
#define EXT4_PROJINHERIT_FL …
#define EXT4_CASEFOLD_FL …
#define EXT4_RESERVED_FL …
#define EXT4_FL_USER_MODIFIABLE …
#define EXT4_FL_USER_VISIBLE …
#define EXT4_FL_INHERITED …
#define EXT4_REG_FLMASK …
#define EXT4_OTHER_FLMASK …
#define EXT4_FL_SHOULD_SWAP …
#define EXT4_DAX_MUT_EXCL …
static inline __u32 ext4_mask_flags(umode_t mode, __u32 flags)
{ … }
enum { … };
#define TEST_FLAG_VALUE(FLAG) …
#define CHECK_FLAG_VALUE(FLAG) …
static inline void ext4_check_flag_values(void)
{ … }
#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
struct compat_ext4_new_group_input { … };
#endif
struct ext4_new_group_data { … };
enum { … };
#define EXT4_GET_BLOCKS_CREATE …
#define EXT4_GET_BLOCKS_UNWRIT_EXT …
#define EXT4_GET_BLOCKS_CREATE_UNWRIT_EXT …
#define EXT4_GET_BLOCKS_DELALLOC_RESERVE …
#define EXT4_GET_BLOCKS_PRE_IO …
#define EXT4_GET_BLOCKS_CONVERT …
#define EXT4_GET_BLOCKS_IO_CREATE_EXT …
#define EXT4_GET_BLOCKS_IO_CONVERT_EXT …
#define EXT4_GET_BLOCKS_METADATA_NOFAIL …
#define EXT4_GET_BLOCKS_NO_NORMALIZE …
#define EXT4_GET_BLOCKS_CONVERT_UNWRITTEN …
#define EXT4_GET_BLOCKS_ZERO …
#define EXT4_GET_BLOCKS_CREATE_ZERO …
#define EXT4_GET_BLOCKS_IO_SUBMIT …
#define EXT4_GET_BLOCKS_CACHED_NOWAIT …
#define EXT4_EX_NOCACHE …
#define EXT4_EX_FORCE_CACHE …
#define EXT4_EX_NOFAIL …
#define EXT4_FREE_BLOCKS_METADATA …
#define EXT4_FREE_BLOCKS_FORGET …
#define EXT4_FREE_BLOCKS_VALIDATED …
#define EXT4_FREE_BLOCKS_NO_QUOT_UPDATE …
#define EXT4_FREE_BLOCKS_NOFREE_FIRST_CLUSTER …
#define EXT4_FREE_BLOCKS_NOFREE_LAST_CLUSTER …
#define EXT4_FREE_BLOCKS_RERESERVE_CLUSTER …
#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
#define EXT4_IOC32_GETVERSION …
#define EXT4_IOC32_SETVERSION …
#define EXT4_IOC32_GETRSVSZ …
#define EXT4_IOC32_SETRSVSZ …
#define EXT4_IOC32_GROUP_EXTEND …
#define EXT4_IOC32_GROUP_ADD …
#define EXT4_IOC32_GETVERSION_OLD …
#define EXT4_IOC32_SETVERSION_OLD …
#endif
#define EXT4_MAX_BLOCK_FILE_PHYS …
#define EXT4_MAX_LOGICAL_BLOCK …
struct ext4_inode { … };
#define EXT4_EPOCH_BITS …
#define EXT4_EPOCH_MASK …
#define EXT4_NSEC_MASK …
#define EXT4_FITS_IN_INODE(ext4_inode, einode, field) … \
static inline __le32 ext4_encode_extra_time(struct timespec64 ts)
{ … }
static inline struct timespec64 ext4_decode_extra_time(__le32 base,
__le32 extra)
{ … }
#define EXT4_INODE_SET_XTIME_VAL(xtime, inode, raw_inode, ts) …
#define EXT4_INODE_SET_ATIME(inode, raw_inode) …
#define EXT4_INODE_SET_MTIME(inode, raw_inode) …
#define EXT4_INODE_SET_CTIME(inode, raw_inode) …
#define EXT4_EINODE_SET_XTIME(xtime, einode, raw_inode) …
#define EXT4_INODE_GET_XTIME_VAL(xtime, inode, raw_inode) …
#define EXT4_INODE_GET_ATIME(inode, raw_inode) …
#define EXT4_INODE_GET_MTIME(inode, raw_inode) …
#define EXT4_INODE_GET_CTIME(inode, raw_inode) …
#define EXT4_EINODE_GET_XTIME(xtime, einode, raw_inode) …
#define i_disk_version …
#if defined(__KERNEL__) || defined(__linux__)
#define i_reserved1 …
#define i_file_acl_high …
#define i_blocks_high …
#define i_uid_low …
#define i_gid_low …
#define i_uid_high …
#define i_gid_high …
#define i_checksum_lo …
#elif defined(__GNU__)
#define i_translator …
#define i_uid_high …
#define i_gid_high …
#define i_author …
#elif defined(__masix__)
#define i_reserved1 …
#define i_file_acl_high …
#define i_reserved2 …
#endif
#include "extents_status.h"
#include "fast_commit.h"
enum { … };
struct ext4_inode_info { … };
#define EXT4_VALID_FS …
#define EXT4_ERROR_FS …
#define EXT4_ORPHAN_FS …
#define EXT4_FC_REPLAY …
#define EXT2_FLAGS_SIGNED_HASH …
#define EXT2_FLAGS_UNSIGNED_HASH …
#define EXT2_FLAGS_TEST_FILESYS …
#define EXT4_MOUNT_NO_MBCACHE …
#define EXT4_MOUNT_GRPID …
#define EXT4_MOUNT_DEBUG …
#define EXT4_MOUNT_ERRORS_CONT …
#define EXT4_MOUNT_ERRORS_RO …
#define EXT4_MOUNT_ERRORS_PANIC …
#define EXT4_MOUNT_ERRORS_MASK …
#define EXT4_MOUNT_MINIX_DF …
#define EXT4_MOUNT_NOLOAD …
#ifdef CONFIG_FS_DAX
#define EXT4_MOUNT_DAX_ALWAYS …
#else
#define EXT4_MOUNT_DAX_ALWAYS …
#endif
#define EXT4_MOUNT_DATA_FLAGS …
#define EXT4_MOUNT_JOURNAL_DATA …
#define EXT4_MOUNT_ORDERED_DATA …
#define EXT4_MOUNT_WRITEBACK_DATA …
#define EXT4_MOUNT_UPDATE_JOURNAL …
#define EXT4_MOUNT_NO_UID32 …
#define EXT4_MOUNT_XATTR_USER …
#define EXT4_MOUNT_POSIX_ACL …
#define EXT4_MOUNT_NO_AUTO_DA_ALLOC …
#define EXT4_MOUNT_BARRIER …
#define EXT4_MOUNT_QUOTA …
#define EXT4_MOUNT_USRQUOTA …
#define EXT4_MOUNT_GRPQUOTA …
#define EXT4_MOUNT_PRJQUOTA …
#define EXT4_MOUNT_DIOREAD_NOLOCK …
#define EXT4_MOUNT_JOURNAL_CHECKSUM …
#define EXT4_MOUNT_JOURNAL_ASYNC_COMMIT …
#define EXT4_MOUNT_WARN_ON_ERROR …
#define EXT4_MOUNT_NO_PREFETCH_BLOCK_BITMAPS …
#define EXT4_MOUNT_DELALLOC …
#define EXT4_MOUNT_DATA_ERR_ABORT …
#define EXT4_MOUNT_BLOCK_VALIDITY …
#define EXT4_MOUNT_DISCARD …
#define EXT4_MOUNT_INIT_INODE_TABLE …
#define EXT4_MOUNT2_EXPLICIT_DELALLOC …
#define EXT4_MOUNT2_STD_GROUP_SIZE …
#define EXT4_MOUNT2_HURD_COMPAT …
#define EXT4_MOUNT2_EXPLICIT_JOURNAL_CHECKSUM …
#define EXT4_MOUNT2_JOURNAL_FAST_COMMIT …
#define EXT4_MOUNT2_DAX_NEVER …
#define EXT4_MOUNT2_DAX_INODE …
#define EXT4_MOUNT2_MB_OPTIMIZE_SCAN …
#define EXT4_MOUNT2_ABORT …
#define clear_opt(sb, opt) …
#define set_opt(sb, opt) …
#define test_opt(sb, opt) …
#define clear_opt2(sb, opt) …
#define set_opt2(sb, opt) …
#define test_opt2(sb, opt) …
#define ext4_test_and_set_bit …
#define ext4_set_bit …
#define ext4_test_and_clear_bit …
#define ext4_clear_bit …
#define ext4_test_bit …
#define ext4_find_next_zero_bit …
#define ext4_find_next_bit …
extern void mb_set_bits(void *bm, int cur, int len);
#define EXT4_DFL_MAX_MNT_COUNT …
#define EXT4_DFL_CHECKINTERVAL …
#define EXT4_ERRORS_CONTINUE …
#define EXT4_ERRORS_RO …
#define EXT4_ERRORS_PANIC …
#define EXT4_ERRORS_DEFAULT …
#define EXT4_CRC32C_CHKSUM …
#define EXT4_LABEL_MAX …
struct ext4_super_block { … };
#define EXT4_S_ERR_LEN …
#ifdef __KERNEL__
#define EXT4_MAXQUOTAS …
#define EXT4_ENC_UTF8_12_1 …
enum ext4_journal_trigger_type { … };
#define EXT4_JOURNAL_TRIGGER_COUNT …
struct ext4_journal_trigger { … };
static inline struct ext4_journal_trigger *EXT4_TRIGGER(
struct jbd2_buffer_trigger_type *trigger)
{ … }
#define EXT4_ORPHAN_BLOCK_MAGIC …
struct ext4_orphan_block_tail { … };
static inline int ext4_inodes_per_orphan_block(struct super_block *sb)
{ … }
struct ext4_orphan_block { … };
struct ext4_orphan_info { … };
struct ext4_sb_info { … };
static inline struct ext4_sb_info *EXT4_SB(struct super_block *sb)
{ … }
static inline struct ext4_inode_info *EXT4_I(struct inode *inode)
{ … }
static inline int ext4_writepages_down_read(struct super_block *sb)
{ … }
static inline void ext4_writepages_up_read(struct super_block *sb, int ctx)
{ … }
static inline int ext4_writepages_down_write(struct super_block *sb)
{ … }
static inline void ext4_writepages_up_write(struct super_block *sb, int ctx)
{ … }
static inline int ext4_valid_inum(struct super_block *sb, unsigned long ino)
{ … }
#define sbi_array_rcu_deref(sbi, field, index) …
enum { … };
static inline void ext4_set_mount_flag(struct super_block *sb, int bit)
{ … }
static inline void ext4_clear_mount_flag(struct super_block *sb, int bit)
{ … }
static inline int ext4_test_mount_flag(struct super_block *sb, int bit)
{ … }
#define EXT4_SIM_BBITMAP_EIO …
#define EXT4_SIM_BBITMAP_CRC …
#define EXT4_SIM_IBITMAP_EIO …
#define EXT4_SIM_IBITMAP_CRC …
#define EXT4_SIM_INODE_EIO …
#define EXT4_SIM_INODE_CRC …
#define EXT4_SIM_DIRBLOCK_EIO …
#define EXT4_SIM_DIRBLOCK_CRC …
static inline bool ext4_simulate_fail(struct super_block *sb,
unsigned long code)
{ … }
static inline void ext4_simulate_fail_bh(struct super_block *sb,
struct buffer_head *bh,
unsigned long code)
{ … }
#define EXT4_ERR_UNKNOWN …
#define EXT4_ERR_EIO …
#define EXT4_ERR_ENOMEM …
#define EXT4_ERR_EFSBADCRC …
#define EXT4_ERR_EFSCORRUPTED …
#define EXT4_ERR_ENOSPC …
#define EXT4_ERR_ENOKEY …
#define EXT4_ERR_EROFS …
#define EXT4_ERR_EFBIG …
#define EXT4_ERR_EEXIST …
#define EXT4_ERR_ERANGE …
#define EXT4_ERR_EOVERFLOW …
#define EXT4_ERR_EBUSY …
#define EXT4_ERR_ENOTDIR …
#define EXT4_ERR_ENOTEMPTY …
#define EXT4_ERR_ESHUTDOWN …
#define EXT4_ERR_EFAULT …
enum { … };
#define EXT4_INODE_BIT_FNS(name, field, offset) …
static inline int ext4_test_inode_flag(struct inode *inode, int bit);
static inline void ext4_set_inode_flag(struct inode *inode, int bit);
static inline void ext4_clear_inode_flag(struct inode *inode, int bit);
EXT4_INODE_BIT_FNS(…)
static inline int ext4_test_inode_state(struct inode *inode, int bit);
static inline void ext4_set_inode_state(struct inode *inode, int bit);
static inline void ext4_clear_inode_state(struct inode *inode, int bit);
#if (BITS_PER_LONG < 64)
EXT4_INODE_BIT_FNS(state, state_flags, 0)
static inline void ext4_clear_state_flags(struct ext4_inode_info *ei)
{
(ei)->i_state_flags = 0;
}
#else
EXT4_INODE_BIT_FNS(…)
static inline void ext4_clear_state_flags(struct ext4_inode_info *ei)
{ … }
#endif
#else
#define EXT4_SB …
#endif
static inline bool ext4_verity_in_progress(struct inode *inode)
{ … }
#define NEXT_ORPHAN(inode) …
#define EXT4_OS_LINUX …
#define EXT4_OS_HURD …
#define EXT4_OS_MASIX …
#define EXT4_OS_FREEBSD …
#define EXT4_OS_LITES …
#define EXT4_GOOD_OLD_REV …
#define EXT4_DYNAMIC_REV …
#define EXT4_MAX_SUPP_REV …
#define EXT4_GOOD_OLD_INODE_SIZE …
#define EXT4_EXTRA_TIMESTAMP_MAX …
#define EXT4_NON_EXTRA_TIMESTAMP_MAX …
#define EXT4_TIMESTAMP_MIN …
#define EXT4_FEATURE_COMPAT_DIR_PREALLOC …
#define EXT4_FEATURE_COMPAT_IMAGIC_INODES …
#define EXT4_FEATURE_COMPAT_HAS_JOURNAL …
#define EXT4_FEATURE_COMPAT_EXT_ATTR …
#define EXT4_FEATURE_COMPAT_RESIZE_INODE …
#define EXT4_FEATURE_COMPAT_DIR_INDEX …
#define EXT4_FEATURE_COMPAT_SPARSE_SUPER2 …
#define EXT4_FEATURE_COMPAT_FAST_COMMIT …
#define EXT4_FEATURE_COMPAT_STABLE_INODES …
#define EXT4_FEATURE_COMPAT_ORPHAN_FILE …
#define EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER …
#define EXT4_FEATURE_RO_COMPAT_LARGE_FILE …
#define EXT4_FEATURE_RO_COMPAT_BTREE_DIR …
#define EXT4_FEATURE_RO_COMPAT_HUGE_FILE …
#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM …
#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK …
#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE …
#define EXT4_FEATURE_RO_COMPAT_QUOTA …
#define EXT4_FEATURE_RO_COMPAT_BIGALLOC …
#define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM …
#define EXT4_FEATURE_RO_COMPAT_READONLY …
#define EXT4_FEATURE_RO_COMPAT_PROJECT …
#define EXT4_FEATURE_RO_COMPAT_VERITY …
#define EXT4_FEATURE_RO_COMPAT_ORPHAN_PRESENT …
#define EXT4_FEATURE_INCOMPAT_COMPRESSION …
#define EXT4_FEATURE_INCOMPAT_FILETYPE …
#define EXT4_FEATURE_INCOMPAT_RECOVER …
#define EXT4_FEATURE_INCOMPAT_JOURNAL_DEV …
#define EXT4_FEATURE_INCOMPAT_META_BG …
#define EXT4_FEATURE_INCOMPAT_EXTENTS …
#define EXT4_FEATURE_INCOMPAT_64BIT …
#define EXT4_FEATURE_INCOMPAT_MMP …
#define EXT4_FEATURE_INCOMPAT_FLEX_BG …
#define EXT4_FEATURE_INCOMPAT_EA_INODE …
#define EXT4_FEATURE_INCOMPAT_DIRDATA …
#define EXT4_FEATURE_INCOMPAT_CSUM_SEED …
#define EXT4_FEATURE_INCOMPAT_LARGEDIR …
#define EXT4_FEATURE_INCOMPAT_INLINE_DATA …
#define EXT4_FEATURE_INCOMPAT_ENCRYPT …
#define EXT4_FEATURE_INCOMPAT_CASEFOLD …
extern void ext4_update_dynamic_rev(struct super_block *sb);
#define EXT4_FEATURE_COMPAT_FUNCS(name, flagname) …
#define EXT4_FEATURE_RO_COMPAT_FUNCS(name, flagname) …
#define EXT4_FEATURE_INCOMPAT_FUNCS(name, flagname) …
EXT4_FEATURE_COMPAT_FUNCS(…)
EXT4_FEATURE_COMPAT_FUNCS(…)
EXT4_FEATURE_COMPAT_FUNCS(…)
EXT4_FEATURE_COMPAT_FUNCS(…)
EXT4_FEATURE_COMPAT_FUNCS(…)
EXT4_FEATURE_COMPAT_FUNCS(…)
EXT4_FEATURE_COMPAT_FUNCS(…)
EXT4_FEATURE_COMPAT_FUNCS(…)
EXT4_FEATURE_COMPAT_FUNCS(…)
EXT4_FEATURE_COMPAT_FUNCS(…)
EXT4_FEATURE_RO_COMPAT_FUNCS(…)
EXT4_FEATURE_RO_COMPAT_FUNCS(…)
EXT4_FEATURE_RO_COMPAT_FUNCS(…)
EXT4_FEATURE_RO_COMPAT_FUNCS(…)
EXT4_FEATURE_RO_COMPAT_FUNCS(…)
EXT4_FEATURE_RO_COMPAT_FUNCS(…)
EXT4_FEATURE_RO_COMPAT_FUNCS(…)
EXT4_FEATURE_RO_COMPAT_FUNCS(…)
EXT4_FEATURE_RO_COMPAT_FUNCS(…)
EXT4_FEATURE_RO_COMPAT_FUNCS(…)
EXT4_FEATURE_RO_COMPAT_FUNCS(…)
EXT4_FEATURE_RO_COMPAT_FUNCS(…)
EXT4_FEATURE_RO_COMPAT_FUNCS(…)
EXT4_FEATURE_RO_COMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
EXT4_FEATURE_INCOMPAT_FUNCS(…)
#define EXT2_FEATURE_COMPAT_SUPP …
#define EXT2_FEATURE_INCOMPAT_SUPP …
#define EXT2_FEATURE_RO_COMPAT_SUPP …
#define EXT3_FEATURE_COMPAT_SUPP …
#define EXT3_FEATURE_INCOMPAT_SUPP …
#define EXT3_FEATURE_RO_COMPAT_SUPP …
#define EXT4_FEATURE_COMPAT_SUPP …
#define EXT4_FEATURE_INCOMPAT_SUPP …
#define EXT4_FEATURE_RO_COMPAT_SUPP …
#define EXTN_FEATURE_FUNCS(ver) …
EXTN_FEATURE_FUNCS(…)
EXTN_FEATURE_FUNCS(…)
EXTN_FEATURE_FUNCS(…)
static inline bool ext4_has_compat_features(struct super_block *sb)
{ … }
static inline bool ext4_has_ro_compat_features(struct super_block *sb)
{ … }
static inline bool ext4_has_incompat_features(struct super_block *sb)
{ … }
extern int ext4_feature_set_ok(struct super_block *sb, int readonly);
#define EXT4_FLAGS_RESIZING …
#define EXT4_FLAGS_SHUTDOWN …
#define EXT4_FLAGS_BDEV_IS_DAX …
static inline int ext4_forced_shutdown(struct super_block *sb)
{ … }
#define EXT4_DEF_RESUID …
#define EXT4_DEF_RESGID …
#define EXT4_DEF_PROJID …
#define EXT4_DEF_INODE_READAHEAD_BLKS …
#define EXT4_DEFM_DEBUG …
#define EXT4_DEFM_BSDGROUPS …
#define EXT4_DEFM_XATTR_USER …
#define EXT4_DEFM_ACL …
#define EXT4_DEFM_UID16 …
#define EXT4_DEFM_JMODE …
#define EXT4_DEFM_JMODE_DATA …
#define EXT4_DEFM_JMODE_ORDERED …
#define EXT4_DEFM_JMODE_WBACK …
#define EXT4_DEFM_NOBARRIER …
#define EXT4_DEFM_BLOCK_VALIDITY …
#define EXT4_DEFM_DISCARD …
#define EXT4_DEFM_NODELALLOC …
#define EXT4_DEF_MIN_BATCH_TIME …
#define EXT4_DEF_MAX_BATCH_TIME …
#define EXT4_FLEX_SIZE_DIR_ALLOC_SCHEME …
#define EXT4_NAME_LEN …
#define EXT4_BASE_DIR_LEN …
struct ext4_dir_entry { … };
struct ext4_dir_entry_hash { … };
struct ext4_dir_entry_2 { … };
#define EXT4_DIRENT_HASHES(entry) …
#define EXT4_DIRENT_HASH(entry) …
#define EXT4_DIRENT_MINOR_HASH(entry) …
static inline bool ext4_hash_in_dirent(const struct inode *inode)
{ … }
struct ext4_dir_entry_tail { … };
#define EXT4_DIRENT_TAIL(block, blocksize) …
#define EXT4_FT_UNKNOWN …
#define EXT4_FT_REG_FILE …
#define EXT4_FT_DIR …
#define EXT4_FT_CHRDEV …
#define EXT4_FT_BLKDEV …
#define EXT4_FT_FIFO …
#define EXT4_FT_SOCK …
#define EXT4_FT_SYMLINK …
#define EXT4_FT_MAX …
#define EXT4_FT_DIR_CSUM …
#define EXT4_DIR_PAD …
#define EXT4_DIR_ROUND …
#define EXT4_MAX_REC_LEN …
static inline unsigned int ext4_dir_rec_len(__u8 name_len,
const struct inode *dir)
{ … }
static inline unsigned int
ext4_rec_len_from_disk(__le16 dlen, unsigned blocksize)
{ … }
static inline __le16 ext4_rec_len_to_disk(unsigned len, unsigned blocksize)
{ … }
#define is_dx(dir) …
#define EXT4_DIR_LINK_MAX(dir) …
#define EXT4_DIR_LINK_EMPTY(dir) …
#define DX_HASH_LEGACY …
#define DX_HASH_HALF_MD4 …
#define DX_HASH_TEA …
#define DX_HASH_LEGACY_UNSIGNED …
#define DX_HASH_HALF_MD4_UNSIGNED …
#define DX_HASH_TEA_UNSIGNED …
#define DX_HASH_SIPHASH …
static inline u32 ext4_chksum(struct ext4_sb_info *sbi, u32 crc,
const void *address, unsigned int length)
{ … }
#ifdef __KERNEL__
struct dx_hash_info
{ … };
#define EXT4_HTREE_EOF_32BIT …
#define EXT4_HTREE_EOF_64BIT …
#define HASH_NB_ALWAYS …
struct ext4_filename { … };
#define fname_name(p) …
#define fname_usr_name(p) …
#define fname_len(p) …
struct ext4_iloc
{ … };
static inline struct ext4_inode *ext4_raw_inode(struct ext4_iloc *iloc)
{ … }
static inline bool ext4_is_quota_file(struct inode *inode)
{ … }
struct dir_private_info { … };
static inline ext4_fsblk_t
ext4_group_first_block_no(struct super_block *sb, ext4_group_t group_no)
{ … }
#define ERR_BAD_DX_DIR …
#define EXT4_HTREE_LEVEL_COMPAT …
#define EXT4_HTREE_LEVEL …
static inline int ext4_dir_htree_level(struct super_block *sb)
{ … }
#define EXT4_DEF_LI_WAIT_MULT …
#define EXT4_DEF_LI_MAX_START_DELAY …
#define EXT4_LAZYINIT_QUIT …
#define EXT4_LAZYINIT_RUNNING …
struct ext4_lazy_init { … };
enum ext4_li_mode { … };
struct ext4_li_request { … };
struct ext4_features { … };
#define EXT4_MMP_MAGIC …
#define EXT4_MMP_SEQ_CLEAN …
#define EXT4_MMP_SEQ_FSCK …
#define EXT4_MMP_SEQ_MAX …
struct mmp_struct { … };
struct mmpd_data { … };
#define EXT4_MMP_CHECK_MULT …
#define EXT4_MMP_MIN_CHECK_INTERVAL …
#define EXT4_MMP_MAX_CHECK_INTERVAL …
#define NORET_TYPE …
#define ATTRIB_NORET …
#define NORET_AND …
extern unsigned int ext4_count_free(char *bitmap, unsigned numchars);
void ext4_inode_bitmap_csum_set(struct super_block *sb,
struct ext4_group_desc *gdp,
struct buffer_head *bh, int sz);
int ext4_inode_bitmap_csum_verify(struct super_block *sb,
struct ext4_group_desc *gdp,
struct buffer_head *bh, int sz);
void ext4_block_bitmap_csum_set(struct super_block *sb,
struct ext4_group_desc *gdp,
struct buffer_head *bh);
int ext4_block_bitmap_csum_verify(struct super_block *sb,
struct ext4_group_desc *gdp,
struct buffer_head *bh);
extern void ext4_get_group_no_and_offset(struct super_block *sb,
ext4_fsblk_t blocknr,
ext4_group_t *blockgrpp,
ext4_grpblk_t *offsetp);
extern ext4_group_t ext4_get_group_number(struct super_block *sb,
ext4_fsblk_t block);
extern int ext4_bg_has_super(struct super_block *sb, ext4_group_t group);
extern unsigned long ext4_bg_num_gdb(struct super_block *sb,
ext4_group_t group);
extern ext4_fsblk_t ext4_new_meta_blocks(handle_t *handle, struct inode *inode,
ext4_fsblk_t goal,
unsigned int flags,
unsigned long *count,
int *errp);
extern int ext4_claim_free_clusters(struct ext4_sb_info *sbi,
s64 nclusters, unsigned int flags);
extern ext4_fsblk_t ext4_count_free_clusters(struct super_block *);
extern struct ext4_group_desc * ext4_get_group_desc(struct super_block * sb,
ext4_group_t block_group,
struct buffer_head ** bh);
extern struct ext4_group_info *ext4_get_group_info(struct super_block *sb,
ext4_group_t group);
extern int ext4_should_retry_alloc(struct super_block *sb, int *retries);
extern struct buffer_head *ext4_read_block_bitmap_nowait(struct super_block *sb,
ext4_group_t block_group,
bool ignore_locked);
extern int ext4_wait_block_bitmap(struct super_block *sb,
ext4_group_t block_group,
struct buffer_head *bh);
extern struct buffer_head *ext4_read_block_bitmap(struct super_block *sb,
ext4_group_t block_group);
extern unsigned ext4_free_clusters_after_init(struct super_block *sb,
ext4_group_t block_group,
struct ext4_group_desc *gdp);
ext4_fsblk_t ext4_inode_to_goal_block(struct inode *);
#if IS_ENABLED(CONFIG_UNICODE)
extern int ext4_fname_setup_ci_filename(struct inode *dir,
const struct qstr *iname,
struct ext4_filename *fname);
static inline void ext4_fname_free_ci_filename(struct ext4_filename *fname)
{ … }
#else
static inline int ext4_fname_setup_ci_filename(struct inode *dir,
const struct qstr *iname,
struct ext4_filename *fname)
{
return 0;
}
static inline void ext4_fname_free_ci_filename(struct ext4_filename *fname)
{
}
#endif
#ifdef CONFIG_FS_ENCRYPTION
extern const struct fscrypt_operations ext4_cryptops;
int ext4_fname_setup_filename(struct inode *dir, const struct qstr *iname,
int lookup, struct ext4_filename *fname);
int ext4_fname_prepare_lookup(struct inode *dir, struct dentry *dentry,
struct ext4_filename *fname);
void ext4_fname_free_filename(struct ext4_filename *fname);
int ext4_ioctl_get_encryption_pwsalt(struct file *filp, void __user *arg);
#else
static inline int ext4_fname_setup_filename(struct inode *dir,
const struct qstr *iname,
int lookup,
struct ext4_filename *fname)
{
fname->usr_fname = iname;
fname->disk_name.name = (unsigned char *) iname->name;
fname->disk_name.len = iname->len;
return ext4_fname_setup_ci_filename(dir, iname, fname);
}
static inline int ext4_fname_prepare_lookup(struct inode *dir,
struct dentry *dentry,
struct ext4_filename *fname)
{
return ext4_fname_setup_filename(dir, &dentry->d_name, 1, fname);
}
static inline void ext4_fname_free_filename(struct ext4_filename *fname)
{
ext4_fname_free_ci_filename(fname);
}
static inline int ext4_ioctl_get_encryption_pwsalt(struct file *filp,
void __user *arg)
{
return -EOPNOTSUPP;
}
#endif
extern int __ext4_check_dir_entry(const char *, unsigned int, struct inode *,
struct file *,
struct ext4_dir_entry_2 *,
struct buffer_head *, char *, int,
unsigned int);
#define ext4_check_dir_entry(dir, filp, de, bh, buf, size, offset) …
extern int ext4_htree_store_dirent(struct file *dir_file, __u32 hash,
__u32 minor_hash,
struct ext4_dir_entry_2 *dirent,
struct fscrypt_str *ent_name);
extern void ext4_htree_free_dir_info(struct dir_private_info *p);
extern int ext4_find_dest_de(struct inode *dir, struct inode *inode,
struct buffer_head *bh,
void *buf, int buf_size,
struct ext4_filename *fname,
struct ext4_dir_entry_2 **dest_de);
void ext4_insert_dentry(struct inode *dir, struct inode *inode,
struct ext4_dir_entry_2 *de,
int buf_size,
struct ext4_filename *fname);
static inline void ext4_update_dx_flag(struct inode *inode)
{ … }
static const unsigned char ext4_filetype_table[] = …;
static inline unsigned char get_dtype(struct super_block *sb, int filetype)
{ … }
extern int ext4_check_all_de(struct inode *dir, struct buffer_head *bh,
void *buf, int buf_size);
extern int ext4_sync_file(struct file *, loff_t, loff_t, int);
extern int ext4fs_dirhash(const struct inode *dir, const char *name, int len,
struct dx_hash_info *hinfo);
extern int ext4_mark_inode_used(struct super_block *sb, int ino);
extern struct inode *__ext4_new_inode(struct mnt_idmap *, handle_t *,
struct inode *, umode_t,
const struct qstr *qstr, __u32 goal,
uid_t *owner, __u32 i_flags,
int handle_type, unsigned int line_no,
int nblocks);
#define ext4_new_inode(handle, dir, mode, qstr, goal, owner, i_flags) …
#define ext4_new_inode_start_handle(idmap, dir, mode, qstr, goal, owner, \
type, nblocks) …
extern void ext4_free_inode(handle_t *, struct inode *);
extern struct inode * ext4_orphan_get(struct super_block *, unsigned long);
extern unsigned long ext4_count_free_inodes(struct super_block *);
extern unsigned long ext4_count_dirs(struct super_block *);
extern void ext4_mark_bitmap_end(int start_bit, int end_bit, char *bitmap);
extern int ext4_init_inode_table(struct super_block *sb,
ext4_group_t group, int barrier);
extern void ext4_end_bitmap_read(struct buffer_head *bh, int uptodate);
int ext4_fc_info_show(struct seq_file *seq, void *v);
void ext4_fc_init(struct super_block *sb, journal_t *journal);
void ext4_fc_init_inode(struct inode *inode);
void ext4_fc_track_range(handle_t *handle, struct inode *inode, ext4_lblk_t start,
ext4_lblk_t end);
void __ext4_fc_track_unlink(handle_t *handle, struct inode *inode,
struct dentry *dentry);
void __ext4_fc_track_link(handle_t *handle, struct inode *inode,
struct dentry *dentry);
void ext4_fc_track_unlink(handle_t *handle, struct dentry *dentry);
void ext4_fc_track_link(handle_t *handle, struct dentry *dentry);
void __ext4_fc_track_create(handle_t *handle, struct inode *inode,
struct dentry *dentry);
void ext4_fc_track_create(handle_t *handle, struct dentry *dentry);
void ext4_fc_track_inode(handle_t *handle, struct inode *inode);
void ext4_fc_mark_ineligible(struct super_block *sb, int reason, handle_t *handle);
void ext4_fc_start_update(struct inode *inode);
void ext4_fc_stop_update(struct inode *inode);
void ext4_fc_del(struct inode *inode);
bool ext4_fc_replay_check_excluded(struct super_block *sb, ext4_fsblk_t block);
void ext4_fc_replay_cleanup(struct super_block *sb);
int ext4_fc_commit(journal_t *journal, tid_t commit_tid);
int __init ext4_fc_init_dentry_cache(void);
void ext4_fc_destroy_dentry_cache(void);
int ext4_fc_record_regions(struct super_block *sb, int ino,
ext4_lblk_t lblk, ext4_fsblk_t pblk,
int len, int replay);
extern const struct seq_operations ext4_mb_seq_groups_ops;
extern const struct seq_operations ext4_mb_seq_structs_summary_ops;
extern int ext4_seq_mb_stats_show(struct seq_file *seq, void *offset);
extern int ext4_mb_init(struct super_block *);
extern void ext4_mb_release(struct super_block *);
extern ext4_fsblk_t ext4_mb_new_blocks(handle_t *,
struct ext4_allocation_request *, int *);
extern void ext4_discard_preallocations(struct inode *);
extern int __init ext4_init_mballoc(void);
extern void ext4_exit_mballoc(void);
extern ext4_group_t ext4_mb_prefetch(struct super_block *sb,
ext4_group_t group,
unsigned int nr, int *cnt);
extern void ext4_mb_prefetch_fini(struct super_block *sb, ext4_group_t group,
unsigned int nr);
extern void ext4_free_blocks(handle_t *handle, struct inode *inode,
struct buffer_head *bh, ext4_fsblk_t block,
unsigned long count, int flags);
extern int ext4_mb_alloc_groupinfo(struct super_block *sb,
ext4_group_t ngroups);
extern int ext4_mb_add_groupinfo(struct super_block *sb,
ext4_group_t i, struct ext4_group_desc *desc);
extern int ext4_group_add_blocks(handle_t *handle, struct super_block *sb,
ext4_fsblk_t block, unsigned long count);
extern int ext4_trim_fs(struct super_block *, struct fstrim_range *);
extern void ext4_process_freed_data(struct super_block *sb, tid_t commit_tid);
extern void ext4_mb_mark_bb(struct super_block *sb, ext4_fsblk_t block,
int len, bool state);
static inline bool ext4_mb_cr_expensive(enum criteria cr)
{ … }
void ext4_inode_csum_set(struct inode *inode, struct ext4_inode *raw,
struct ext4_inode_info *ei);
int ext4_inode_is_fast_symlink(struct inode *inode);
struct buffer_head *ext4_getblk(handle_t *, struct inode *, ext4_lblk_t, int);
struct buffer_head *ext4_bread(handle_t *, struct inode *, ext4_lblk_t, int);
int ext4_bread_batch(struct inode *inode, ext4_lblk_t block, int bh_count,
bool wait, struct buffer_head **bhs);
int ext4_get_block_unwritten(struct inode *inode, sector_t iblock,
struct buffer_head *bh_result, int create);
int ext4_get_block(struct inode *inode, sector_t iblock,
struct buffer_head *bh_result, int create);
int ext4_da_get_block_prep(struct inode *inode, sector_t iblock,
struct buffer_head *bh, int create);
int ext4_walk_page_buffers(handle_t *handle,
struct inode *inode,
struct buffer_head *head,
unsigned from,
unsigned to,
int *partial,
int (*fn)(handle_t *handle, struct inode *inode,
struct buffer_head *bh));
int do_journal_get_write_access(handle_t *handle, struct inode *inode,
struct buffer_head *bh);
#define FALL_BACK_TO_NONDELALLOC …
#define CONVERT_INLINE_DATA …
ext4_iget_flags;
extern struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
ext4_iget_flags flags, const char *function,
unsigned int line);
#define ext4_iget(sb, ino, flags) …
extern int ext4_write_inode(struct inode *, struct writeback_control *);
extern int ext4_setattr(struct mnt_idmap *, struct dentry *,
struct iattr *);
extern u32 ext4_dio_alignment(struct inode *inode);
extern int ext4_getattr(struct mnt_idmap *, const struct path *,
struct kstat *, u32, unsigned int);
extern void ext4_evict_inode(struct inode *);
extern void ext4_clear_inode(struct inode *);
extern int ext4_file_getattr(struct mnt_idmap *, const struct path *,
struct kstat *, u32, unsigned int);
extern void ext4_dirty_inode(struct inode *, int);
extern int ext4_change_inode_journal_flag(struct inode *, int);
extern int ext4_get_inode_loc(struct inode *, struct ext4_iloc *);
extern int ext4_get_fc_inode_loc(struct super_block *sb, unsigned long ino,
struct ext4_iloc *iloc);
extern int ext4_inode_attach_jinode(struct inode *inode);
extern int ext4_can_truncate(struct inode *inode);
extern int ext4_truncate(struct inode *);
extern int ext4_break_layouts(struct inode *);
extern int ext4_punch_hole(struct file *file, loff_t offset, loff_t length);
extern void ext4_set_inode_flags(struct inode *, bool init);
extern int ext4_alloc_da_blocks(struct inode *inode);
extern void ext4_set_aops(struct inode *inode);
extern int ext4_writepage_trans_blocks(struct inode *);
extern int ext4_normal_submit_inode_data_buffers(struct jbd2_inode *jinode);
extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks);
extern int ext4_zero_partial_blocks(handle_t *handle, struct inode *inode,
loff_t lstart, loff_t lend);
extern vm_fault_t ext4_page_mkwrite(struct vm_fault *vmf);
extern qsize_t *ext4_get_reserved_space(struct inode *inode);
extern int ext4_get_projid(struct inode *inode, kprojid_t *projid);
extern void ext4_da_release_space(struct inode *inode, int to_free);
extern void ext4_da_update_reserve_space(struct inode *inode,
int used, int quota_claim);
extern int ext4_issue_zeroout(struct inode *inode, ext4_lblk_t lblk,
ext4_fsblk_t pblk, ext4_lblk_t len);
extern int ext4_ind_map_blocks(handle_t *handle, struct inode *inode,
struct ext4_map_blocks *map, int flags);
extern int ext4_ind_trans_blocks(struct inode *inode, int nrblocks);
extern void ext4_ind_truncate(handle_t *, struct inode *inode);
extern int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
ext4_lblk_t start, ext4_lblk_t end);
extern long ext4_ioctl(struct file *, unsigned int, unsigned long);
extern long ext4_compat_ioctl(struct file *, unsigned int, unsigned long);
int ext4_fileattr_set(struct mnt_idmap *idmap,
struct dentry *dentry, struct fileattr *fa);
int ext4_fileattr_get(struct dentry *dentry, struct fileattr *fa);
extern void ext4_reset_inode_seed(struct inode *inode);
int ext4_update_overhead(struct super_block *sb, bool force);
int ext4_force_shutdown(struct super_block *sb, u32 flags);
extern int ext4_ext_migrate(struct inode *);
extern int ext4_ind_migrate(struct inode *inode);
extern int ext4_init_new_dir(handle_t *handle, struct inode *dir,
struct inode *inode);
extern int ext4_dirblock_csum_verify(struct inode *inode,
struct buffer_head *bh);
extern int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash,
__u32 start_minor_hash, __u32 *next_hash);
extern int ext4_search_dir(struct buffer_head *bh,
char *search_buf,
int buf_size,
struct inode *dir,
struct ext4_filename *fname,
unsigned int offset,
struct ext4_dir_entry_2 **res_dir);
extern int ext4_generic_delete_entry(struct inode *dir,
struct ext4_dir_entry_2 *de_del,
struct buffer_head *bh,
void *entry_buf,
int buf_size,
int csum_size);
extern bool ext4_empty_dir(struct inode *inode);
extern void ext4_kvfree_array_rcu(void *to_free);
extern int ext4_group_add(struct super_block *sb,
struct ext4_new_group_data *input);
extern int ext4_group_extend(struct super_block *sb,
struct ext4_super_block *es,
ext4_fsblk_t n_blocks_count);
extern int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count);
extern unsigned int ext4_list_backups(struct super_block *sb,
unsigned int *three, unsigned int *five,
unsigned int *seven);
extern struct buffer_head *ext4_sb_bread(struct super_block *sb,
sector_t block, blk_opf_t op_flags);
extern struct buffer_head *ext4_sb_bread_unmovable(struct super_block *sb,
sector_t block);
extern void ext4_read_bh_nowait(struct buffer_head *bh, blk_opf_t op_flags,
bh_end_io_t *end_io);
extern int ext4_read_bh(struct buffer_head *bh, blk_opf_t op_flags,
bh_end_io_t *end_io);
extern int ext4_read_bh_lock(struct buffer_head *bh, blk_opf_t op_flags, bool wait);
extern void ext4_sb_breadahead_unmovable(struct super_block *sb, sector_t block);
extern int ext4_seq_options_show(struct seq_file *seq, void *offset);
extern int ext4_calculate_overhead(struct super_block *sb);
extern __le32 ext4_superblock_csum(struct super_block *sb,
struct ext4_super_block *es);
extern void ext4_superblock_csum_set(struct super_block *sb);
extern int ext4_alloc_flex_bg_array(struct super_block *sb,
ext4_group_t ngroup);
extern const char *ext4_decode_error(struct super_block *sb, int errno,
char nbuf[16]);
extern void ext4_mark_group_bitmap_corrupted(struct super_block *sb,
ext4_group_t block_group,
unsigned int flags);
extern unsigned int ext4_num_base_meta_blocks(struct super_block *sb,
ext4_group_t block_group);
extern __printf(7, 8)
void __ext4_error(struct super_block *, const char *, unsigned int, bool,
int, __u64, const char *, ...);
extern __printf(6, 7)
void __ext4_error_inode(struct inode *, const char *, unsigned int,
ext4_fsblk_t, int, const char *, ...);
extern __printf(5, 6)
void __ext4_error_file(struct file *, const char *, unsigned int, ext4_fsblk_t,
const char *, ...);
extern void __ext4_std_error(struct super_block *, const char *,
unsigned int, int);
extern __printf(4, 5)
void __ext4_warning(struct super_block *, const char *, unsigned int,
const char *, ...);
extern __printf(4, 5)
void __ext4_warning_inode(const struct inode *inode, const char *function,
unsigned int line, const char *fmt, ...);
extern __printf(3, 4)
void __ext4_msg(struct super_block *, const char *, const char *, ...);
extern void __dump_mmp_msg(struct super_block *, struct mmp_struct *mmp,
const char *, unsigned int, const char *);
extern __printf(7, 8)
void __ext4_grp_locked_error(const char *, unsigned int,
struct super_block *, ext4_group_t,
unsigned long, ext4_fsblk_t,
const char *, ...);
#define EXT4_ERROR_INODE(inode, fmt, a...) …
#define EXT4_ERROR_INODE_ERR(inode, err, fmt, a...) …
#define ext4_error_inode_block(inode, block, err, fmt, a...) …
#define EXT4_ERROR_FILE(file, block, fmt, a...) …
#define ext4_abort(sb, err, fmt, a...) …
#ifdef CONFIG_PRINTK
#define ext4_error_inode(inode, func, line, block, fmt, ...) …
#define ext4_error_inode_err(inode, func, line, block, err, fmt, ...) …
#define ext4_error_file(file, func, line, block, fmt, ...) …
#define ext4_error(sb, fmt, ...) …
#define ext4_error_err(sb, err, fmt, ...) …
#define ext4_warning(sb, fmt, ...) …
#define ext4_warning_inode(inode, fmt, ...) …
#define ext4_msg(sb, level, fmt, ...) …
#define dump_mmp_msg(sb, mmp, msg) …
#define ext4_grp_locked_error(sb, grp, ino, block, fmt, ...) …
#else
#define ext4_error_inode …
#define ext4_error_inode_err …
#define ext4_error_file …
#define ext4_error …
#define ext4_error_err …
#define ext4_warning …
#define ext4_warning_inode …
#define ext4_msg …
#define dump_mmp_msg …
#define ext4_grp_locked_error …
#endif
extern ext4_fsblk_t ext4_block_bitmap(struct super_block *sb,
struct ext4_group_desc *bg);
extern ext4_fsblk_t ext4_inode_bitmap(struct super_block *sb,
struct ext4_group_desc *bg);
extern ext4_fsblk_t ext4_inode_table(struct super_block *sb,
struct ext4_group_desc *bg);
extern __u32 ext4_free_group_clusters(struct super_block *sb,
struct ext4_group_desc *bg);
extern __u32 ext4_free_inodes_count(struct super_block *sb,
struct ext4_group_desc *bg);
extern __u32 ext4_used_dirs_count(struct super_block *sb,
struct ext4_group_desc *bg);
extern __u32 ext4_itable_unused_count(struct super_block *sb,
struct ext4_group_desc *bg);
extern void ext4_block_bitmap_set(struct super_block *sb,
struct ext4_group_desc *bg, ext4_fsblk_t blk);
extern void ext4_inode_bitmap_set(struct super_block *sb,
struct ext4_group_desc *bg, ext4_fsblk_t blk);
extern void ext4_inode_table_set(struct super_block *sb,
struct ext4_group_desc *bg, ext4_fsblk_t blk);
extern void ext4_free_group_clusters_set(struct super_block *sb,
struct ext4_group_desc *bg,
__u32 count);
extern void ext4_free_inodes_set(struct super_block *sb,
struct ext4_group_desc *bg, __u32 count);
extern void ext4_used_dirs_set(struct super_block *sb,
struct ext4_group_desc *bg, __u32 count);
extern void ext4_itable_unused_set(struct super_block *sb,
struct ext4_group_desc *bg, __u32 count);
extern int ext4_group_desc_csum_verify(struct super_block *sb, __u32 group,
struct ext4_group_desc *gdp);
extern void ext4_group_desc_csum_set(struct super_block *sb, __u32 group,
struct ext4_group_desc *gdp);
extern int ext4_register_li_request(struct super_block *sb,
ext4_group_t first_not_zeroed);
static inline int ext4_has_metadata_csum(struct super_block *sb)
{ … }
static inline int ext4_has_group_desc_csum(struct super_block *sb)
{ … }
#define ext4_read_incompat_64bit_val(es, name) …
static inline ext4_fsblk_t ext4_blocks_count(struct ext4_super_block *es)
{ … }
static inline ext4_fsblk_t ext4_r_blocks_count(struct ext4_super_block *es)
{ … }
static inline ext4_fsblk_t ext4_free_blocks_count(struct ext4_super_block *es)
{ … }
static inline void ext4_blocks_count_set(struct ext4_super_block *es,
ext4_fsblk_t blk)
{ … }
static inline void ext4_free_blocks_count_set(struct ext4_super_block *es,
ext4_fsblk_t blk)
{ … }
static inline void ext4_r_blocks_count_set(struct ext4_super_block *es,
ext4_fsblk_t blk)
{ … }
static inline loff_t ext4_isize(struct super_block *sb,
struct ext4_inode *raw_inode)
{ … }
static inline void ext4_isize_set(struct ext4_inode *raw_inode, loff_t i_size)
{ … }
static inline ext4_group_t ext4_get_groups_count(struct super_block *sb)
{ … }
static inline ext4_group_t ext4_flex_group(struct ext4_sb_info *sbi,
ext4_group_t block_group)
{ … }
static inline unsigned int ext4_flex_bg_size(struct ext4_sb_info *sbi)
{ … }
#define ext4_std_error(sb, errno) …
#ifdef CONFIG_SMP
#define EXT4_FREECLUSTERS_WATERMARK …
#else
#define EXT4_FREECLUSTERS_WATERMARK …
#endif
static inline void ext4_update_i_disksize(struct inode *inode, loff_t newsize)
{ … }
static inline int ext4_update_inode_size(struct inode *inode, loff_t newsize)
{ … }
int ext4_update_disksize_before_punch(struct inode *inode, loff_t offset,
loff_t len);
struct ext4_group_info { … };
#define EXT4_GROUP_INFO_NEED_INIT_BIT …
#define EXT4_GROUP_INFO_WAS_TRIMMED_BIT …
#define EXT4_GROUP_INFO_BBITMAP_CORRUPT_BIT …
#define EXT4_GROUP_INFO_IBITMAP_CORRUPT_BIT …
#define EXT4_GROUP_INFO_BBITMAP_CORRUPT …
#define EXT4_GROUP_INFO_IBITMAP_CORRUPT …
#define EXT4_GROUP_INFO_BBITMAP_READ_BIT …
#define EXT4_MB_GRP_NEED_INIT(grp) …
#define EXT4_MB_GRP_BBITMAP_CORRUPT(grp) …
#define EXT4_MB_GRP_IBITMAP_CORRUPT(grp) …
#define EXT4_MB_GRP_WAS_TRIMMED(grp) …
#define EXT4_MB_GRP_SET_TRIMMED(grp) …
#define EXT4_MB_GRP_CLEAR_TRIMMED(grp) …
#define EXT4_MB_GRP_TEST_AND_SET_READ(grp) …
#define EXT4_MAX_CONTENTION …
#define EXT4_CONTENTION_THRESHOLD …
static inline spinlock_t *ext4_group_lock_ptr(struct super_block *sb,
ext4_group_t group)
{ … }
static inline int ext4_fs_is_busy(struct ext4_sb_info *sbi)
{ … }
static inline void ext4_lock_group(struct super_block *sb, ext4_group_t group)
{ … }
static inline void ext4_unlock_group(struct super_block *sb,
ext4_group_t group)
{ … }
#ifdef CONFIG_QUOTA
static inline bool ext4_quota_capable(struct super_block *sb)
{ … }
static inline bool ext4_is_quota_journalled(struct super_block *sb)
{ … }
int ext4_enable_quotas(struct super_block *sb);
#endif
#define ext4_check_indirect_blockref(inode, bh) …
#define ext4_ind_check_inode(inode) …
extern const struct file_operations ext4_dir_operations;
extern const struct inode_operations ext4_file_inode_operations;
extern const struct file_operations ext4_file_operations;
extern loff_t ext4_llseek(struct file *file, loff_t offset, int origin);
extern int ext4_get_max_inline_size(struct inode *inode);
extern int ext4_find_inline_data_nolock(struct inode *inode);
extern int ext4_destroy_inline_data(handle_t *handle, struct inode *inode);
int ext4_readpage_inline(struct inode *inode, struct folio *folio);
extern int ext4_try_to_write_inline_data(struct address_space *mapping,
struct inode *inode,
loff_t pos, unsigned len,
struct page **pagep);
int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len,
unsigned copied, struct folio *folio);
extern int ext4_da_write_inline_data_begin(struct address_space *mapping,
struct inode *inode,
loff_t pos, unsigned len,
struct page **pagep,
void **fsdata);
extern int ext4_try_add_inline_entry(handle_t *handle,
struct ext4_filename *fname,
struct inode *dir, struct inode *inode);
extern int ext4_try_create_inline_dir(handle_t *handle,
struct inode *parent,
struct inode *inode);
extern int ext4_read_inline_dir(struct file *filp,
struct dir_context *ctx,
int *has_inline_data);
extern int ext4_inlinedir_to_tree(struct file *dir_file,
struct inode *dir, ext4_lblk_t block,
struct dx_hash_info *hinfo,
__u32 start_hash, __u32 start_minor_hash,
int *has_inline_data);
extern struct buffer_head *ext4_find_inline_entry(struct inode *dir,
struct ext4_filename *fname,
struct ext4_dir_entry_2 **res_dir,
int *has_inline_data);
extern int ext4_delete_inline_entry(handle_t *handle,
struct inode *dir,
struct ext4_dir_entry_2 *de_del,
struct buffer_head *bh,
int *has_inline_data);
extern bool empty_inline_dir(struct inode *dir, int *has_inline_data);
extern struct buffer_head *ext4_get_first_inline_block(struct inode *inode,
struct ext4_dir_entry_2 **parent_de,
int *retval);
extern void *ext4_read_inline_link(struct inode *inode);
struct iomap;
extern int ext4_inline_data_iomap(struct inode *inode, struct iomap *iomap);
extern int ext4_inline_data_truncate(struct inode *inode, int *has_inline);
extern int ext4_convert_inline_data(struct inode *inode);
static inline int ext4_has_inline_data(struct inode *inode)
{ … }
extern const struct inode_operations ext4_dir_inode_operations;
extern const struct inode_operations ext4_special_inode_operations;
extern struct dentry *ext4_get_parent(struct dentry *child);
extern struct ext4_dir_entry_2 *ext4_init_dot_dotdot(struct inode *inode,
struct ext4_dir_entry_2 *de,
int blocksize, int csum_size,
unsigned int parent_ino, int dotdot_real_len);
extern void ext4_initialize_dirent_tail(struct buffer_head *bh,
unsigned int blocksize);
extern int ext4_handle_dirty_dirblock(handle_t *handle, struct inode *inode,
struct buffer_head *bh);
extern int __ext4_unlink(struct inode *dir, const struct qstr *d_name,
struct inode *inode, struct dentry *dentry);
extern int __ext4_link(struct inode *dir, struct inode *inode,
struct dentry *dentry);
#define S_SHIFT …
static const unsigned char ext4_type_by_mode[(S_IFMT >> S_SHIFT) + 1] = …;
static inline void ext4_set_de_type(struct super_block *sb,
struct ext4_dir_entry_2 *de,
umode_t mode) { … }
extern int ext4_mpage_readpages(struct inode *inode,
struct readahead_control *rac, struct folio *folio);
extern int __init ext4_init_post_read_processing(void);
extern void ext4_exit_post_read_processing(void);
extern const struct inode_operations ext4_encrypted_symlink_inode_operations;
extern const struct inode_operations ext4_symlink_inode_operations;
extern const struct inode_operations ext4_fast_symlink_inode_operations;
extern void ext4_notify_error_sysfs(struct ext4_sb_info *sbi);
extern int ext4_register_sysfs(struct super_block *sb);
extern void ext4_unregister_sysfs(struct super_block *sb);
extern int __init ext4_init_sysfs(void);
extern void ext4_exit_sysfs(void);
extern void ext4_release_system_zone(struct super_block *sb);
extern int ext4_setup_system_zone(struct super_block *sb);
extern int __init ext4_init_system_zone(void);
extern void ext4_exit_system_zone(void);
extern int ext4_inode_block_valid(struct inode *inode,
ext4_fsblk_t start_blk,
unsigned int count);
extern int ext4_check_blockref(const char *, unsigned int,
struct inode *, __le32 *, unsigned int);
extern int ext4_sb_block_valid(struct super_block *sb, struct inode *inode,
ext4_fsblk_t start_blk, unsigned int count);
struct ext4_ext_path;
struct ext4_extent;
#define EXT_MAX_BLOCKS …
extern void ext4_ext_tree_init(handle_t *handle, struct inode *inode);
extern int ext4_ext_index_trans_blocks(struct inode *inode, int extents);
extern int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
struct ext4_map_blocks *map, int flags);
extern int ext4_ext_truncate(handle_t *, struct inode *);
extern int ext4_ext_remove_space(struct inode *inode, ext4_lblk_t start,
ext4_lblk_t end);
extern void ext4_ext_init(struct super_block *);
extern void ext4_ext_release(struct super_block *);
extern long ext4_fallocate(struct file *file, int mode, loff_t offset,
loff_t len);
extern int ext4_convert_unwritten_extents(handle_t *handle, struct inode *inode,
loff_t offset, ssize_t len);
extern int ext4_convert_unwritten_io_end_vec(handle_t *handle,
ext4_io_end_t *io_end);
extern int ext4_map_blocks(handle_t *handle, struct inode *inode,
struct ext4_map_blocks *map, int flags);
extern int ext4_ext_calc_credits_for_single_extent(struct inode *inode,
int num,
struct ext4_ext_path *path);
extern int ext4_ext_insert_extent(handle_t *, struct inode *,
struct ext4_ext_path **,
struct ext4_extent *, int);
extern struct ext4_ext_path *ext4_find_extent(struct inode *, ext4_lblk_t,
struct ext4_ext_path **,
int flags);
extern void ext4_free_ext_path(struct ext4_ext_path *);
extern int ext4_ext_check_inode(struct inode *inode);
extern ext4_lblk_t ext4_ext_next_allocated_block(struct ext4_ext_path *path);
extern int ext4_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
__u64 start, __u64 len);
extern int ext4_get_es_cache(struct inode *inode,
struct fiemap_extent_info *fieinfo,
__u64 start, __u64 len);
extern int ext4_ext_precache(struct inode *inode);
extern int ext4_swap_extents(handle_t *handle, struct inode *inode1,
struct inode *inode2, ext4_lblk_t lblk1,
ext4_lblk_t lblk2, ext4_lblk_t count,
int mark_unwritten,int *err);
extern int ext4_clu_mapped(struct inode *inode, ext4_lblk_t lclu);
extern int ext4_datasem_ensure_credits(handle_t *handle, struct inode *inode,
int check_cred, int restart_cred,
int revoke_cred);
extern void ext4_ext_replay_shrink_inode(struct inode *inode, ext4_lblk_t end);
extern int ext4_ext_replay_set_iblocks(struct inode *inode);
extern int ext4_ext_replay_update_ex(struct inode *inode, ext4_lblk_t start,
int len, int unwritten, ext4_fsblk_t pblk);
extern int ext4_ext_clear_bb(struct inode *inode);
extern void ext4_double_down_write_data_sem(struct inode *first,
struct inode *second);
extern void ext4_double_up_write_data_sem(struct inode *orig_inode,
struct inode *donor_inode);
extern int ext4_move_extents(struct file *o_filp, struct file *d_filp,
__u64 start_orig, __u64 start_donor,
__u64 len, __u64 *moved_len);
extern int __init ext4_init_pageio(void);
extern void ext4_exit_pageio(void);
extern ext4_io_end_t *ext4_init_io_end(struct inode *inode, gfp_t flags);
extern ext4_io_end_t *ext4_get_io_end(ext4_io_end_t *io_end);
extern int ext4_put_io_end(ext4_io_end_t *io_end);
extern void ext4_put_io_end_defer(ext4_io_end_t *io_end);
extern void ext4_io_submit_init(struct ext4_io_submit *io,
struct writeback_control *wbc);
extern void ext4_end_io_rsv_work(struct work_struct *work);
extern void ext4_io_submit(struct ext4_io_submit *io);
int ext4_bio_write_folio(struct ext4_io_submit *io, struct folio *page,
size_t len);
extern struct ext4_io_end_vec *ext4_alloc_io_end_vec(ext4_io_end_t *io_end);
extern struct ext4_io_end_vec *ext4_last_io_end_vec(ext4_io_end_t *io_end);
extern int ext4_multi_mount_protect(struct super_block *, ext4_fsblk_t);
extern void ext4_stop_mmpd(struct ext4_sb_info *sbi);
extern const struct fsverity_operations ext4_verityops;
extern int ext4_orphan_add(handle_t *, struct inode *);
extern int ext4_orphan_del(handle_t *, struct inode *);
extern void ext4_orphan_cleanup(struct super_block *sb,
struct ext4_super_block *es);
extern void ext4_release_orphan_info(struct super_block *sb);
extern int ext4_init_orphan_info(struct super_block *sb);
extern int ext4_orphan_file_empty(struct super_block *sb);
extern void ext4_orphan_file_block_trigger(
struct jbd2_buffer_trigger_type *triggers,
struct buffer_head *bh,
void *data, size_t size);
#define BH_BITMAP_UPTODATE …
static inline int bitmap_uptodate(struct buffer_head *bh)
{ … }
static inline void set_bitmap_uptodate(struct buffer_head *bh)
{ … }
#define EXT4_WQ_HASH_SZ …
#define ext4_ioend_wq(v) …
extern wait_queue_head_t ext4__ioend_wq[EXT4_WQ_HASH_SZ];
extern int ext4_resize_begin(struct super_block *sb);
extern int ext4_resize_end(struct super_block *sb, bool update_backups);
static inline void ext4_set_io_unwritten_flag(struct inode *inode,
struct ext4_io_end *io_end)
{ … }
static inline void ext4_clear_io_unwritten_flag(ext4_io_end_t *io_end)
{ … }
extern const struct iomap_ops ext4_iomap_ops;
extern const struct iomap_ops ext4_iomap_overwrite_ops;
extern const struct iomap_ops ext4_iomap_report_ops;
static inline int ext4_buffer_uptodate(struct buffer_head *bh)
{ … }
#endif
#define EFSBADCRC …
#define EFSCORRUPTED …
#endif