ext4.h (25c6d98fc4c245d164cf688815a7b259257ead2a) | ext4.h (02f310fcf47fa9311d6ba2946a8d19e7d7d11f37) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * ext4.h 4 * 5 * Copyright (C) 1992, 1993, 1994, 1995 6 * Remy Card (card@masi.ibp.fr) 7 * Laboratoire MASI - Institut Blaise Pascal 8 * Universite Pierre et Marie Curie (Paris VI) --- 1020 unchanged lines hidden (view full) --- 1029 * Extended attributes can be read independently of the main file 1030 * data. Taking i_mutex even when reading would cause contention 1031 * between readers of EAs and writers of regular file data, so 1032 * instead we synchronize on xattr_sem when reading or changing 1033 * EAs. 1034 */ 1035 struct rw_semaphore xattr_sem; 1036 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * ext4.h 4 * 5 * Copyright (C) 1992, 1993, 1994, 1995 6 * Remy Card (card@masi.ibp.fr) 7 * Laboratoire MASI - Institut Blaise Pascal 8 * Universite Pierre et Marie Curie (Paris VI) --- 1020 unchanged lines hidden (view full) --- 1029 * Extended attributes can be read independently of the main file 1030 * data. Taking i_mutex even when reading would cause contention 1031 * between readers of EAs and writers of regular file data, so 1032 * instead we synchronize on xattr_sem when reading or changing 1033 * EAs. 1034 */ 1035 struct rw_semaphore xattr_sem; 1036 |
1037 struct list_head i_orphan; /* unlinked but open inodes */ | 1037 /* 1038 * Inodes with EXT4_STATE_ORPHAN_FILE use i_orphan_idx. Otherwise 1039 * i_orphan is used. 1040 */ 1041 union { 1042 struct list_head i_orphan; /* unlinked but open inodes */ 1043 unsigned int i_orphan_idx; /* Index in orphan file */ 1044 }; |
1038 1039 /* Fast commit related info */ 1040 1041 struct list_head i_fc_list; /* 1042 * inodes that need fast commit 1043 * protected by sbi->s_fc_lock. 1044 */ 1045 --- 377 unchanged lines hidden (view full) --- 1423 __u8 s_mkfs_time_hi; 1424 __u8 s_lastcheck_hi; 1425 __u8 s_first_error_time_hi; 1426 __u8 s_last_error_time_hi; 1427 __u8 s_first_error_errcode; 1428 __u8 s_last_error_errcode; 1429 __le16 s_encoding; /* Filename charset encoding */ 1430 __le16 s_encoding_flags; /* Filename charset encoding flags */ | 1045 1046 /* Fast commit related info */ 1047 1048 struct list_head i_fc_list; /* 1049 * inodes that need fast commit 1050 * protected by sbi->s_fc_lock. 1051 */ 1052 --- 377 unchanged lines hidden (view full) --- 1430 __u8 s_mkfs_time_hi; 1431 __u8 s_lastcheck_hi; 1432 __u8 s_first_error_time_hi; 1433 __u8 s_last_error_time_hi; 1434 __u8 s_first_error_errcode; 1435 __u8 s_last_error_errcode; 1436 __le16 s_encoding; /* Filename charset encoding */ 1437 __le16 s_encoding_flags; /* Filename charset encoding flags */ |
1431 __le32 s_reserved[95]; /* Padding to the end of the block */ | 1438 __le32 s_orphan_file_inum; /* Inode for tracking orphan inodes */ 1439 __le32 s_reserved[94]; /* Padding to the end of the block */ |
1432 __le32 s_checksum; /* crc32c(superblock) */ 1433}; 1434 1435#define EXT4_S_ERR_LEN (EXT4_S_ERR_END - EXT4_S_ERR_START) 1436 1437#ifdef __KERNEL__ 1438 1439#ifdef CONFIG_FS_ENCRYPTION --- 4 unchanged lines hidden (view full) --- 1444 1445/* Number of quota types we support */ 1446#define EXT4_MAXQUOTAS 3 1447 1448#define EXT4_ENC_UTF8_12_1 1 1449 1450/* Types of ext4 journal triggers */ 1451enum ext4_journal_trigger_type { | 1440 __le32 s_checksum; /* crc32c(superblock) */ 1441}; 1442 1443#define EXT4_S_ERR_LEN (EXT4_S_ERR_END - EXT4_S_ERR_START) 1444 1445#ifdef __KERNEL__ 1446 1447#ifdef CONFIG_FS_ENCRYPTION --- 4 unchanged lines hidden (view full) --- 1452 1453/* Number of quota types we support */ 1454#define EXT4_MAXQUOTAS 3 1455 1456#define EXT4_ENC_UTF8_12_1 1 1457 1458/* Types of ext4 journal triggers */ 1459enum ext4_journal_trigger_type { |
1460 EXT4_JTR_ORPHAN_FILE, |
|
1452 EXT4_JTR_NONE /* This must be the last entry for indexing to work! */ 1453}; 1454 1455#define EXT4_JOURNAL_TRIGGER_COUNT EXT4_JTR_NONE 1456 1457struct ext4_journal_trigger { 1458 struct jbd2_buffer_trigger_type tr_triggers; 1459 struct super_block *sb; 1460}; 1461 1462static inline struct ext4_journal_trigger *EXT4_TRIGGER( 1463 struct jbd2_buffer_trigger_type *trigger) 1464{ 1465 return container_of(trigger, struct ext4_journal_trigger, tr_triggers); 1466} 1467 | 1461 EXT4_JTR_NONE /* This must be the last entry for indexing to work! */ 1462}; 1463 1464#define EXT4_JOURNAL_TRIGGER_COUNT EXT4_JTR_NONE 1465 1466struct ext4_journal_trigger { 1467 struct jbd2_buffer_trigger_type tr_triggers; 1468 struct super_block *sb; 1469}; 1470 1471static inline struct ext4_journal_trigger *EXT4_TRIGGER( 1472 struct jbd2_buffer_trigger_type *trigger) 1473{ 1474 return container_of(trigger, struct ext4_journal_trigger, tr_triggers); 1475} 1476 |
1477#define EXT4_ORPHAN_BLOCK_MAGIC 0x0b10ca04 1478 1479/* Structure at the tail of orphan block */ 1480struct ext4_orphan_block_tail { 1481 __le32 ob_magic; 1482 __le32 ob_checksum; 1483}; 1484 1485static inline int ext4_inodes_per_orphan_block(struct super_block *sb) 1486{ 1487 return (sb->s_blocksize - sizeof(struct ext4_orphan_block_tail)) / 1488 sizeof(u32); 1489} 1490 1491struct ext4_orphan_block { 1492 int ob_free_entries; /* Number of free orphan entries in block */ 1493 struct buffer_head *ob_bh; /* Buffer for orphan block */ 1494}; 1495 |
|
1468/* | 1496/* |
1497 * Info about orphan file. 1498 */ 1499struct ext4_orphan_info { 1500 spinlock_t of_lock; 1501 int of_blocks; /* Number of orphan blocks in a file */ 1502 __u32 of_csum_seed; /* Checksum seed for orphan file */ 1503 struct ext4_orphan_block *of_binfo; /* Array with info about orphan 1504 * file blocks */ 1505}; 1506 1507/* |
|
1469 * fourth extended-fs super-block data in memory 1470 */ 1471struct ext4_sb_info { 1472 unsigned long s_desc_size; /* Size of a group descriptor in bytes */ 1473 unsigned long s_inodes_per_block;/* Number of inodes per block */ 1474 unsigned long s_blocks_per_group;/* Number of blocks in a group */ 1475 unsigned long s_clusters_per_group; /* Number of clusters in a group */ 1476 unsigned long s_inodes_per_group;/* Number of inodes in a group */ --- 37 unchanged lines hidden (view full) --- 1514 struct proc_dir_entry *s_proc; 1515 struct kobject s_kobj; 1516 struct completion s_kobj_unregister; 1517 struct super_block *s_sb; 1518 struct buffer_head *s_mmp_bh; 1519 1520 /* Journaling */ 1521 struct journal_s *s_journal; | 1508 * fourth extended-fs super-block data in memory 1509 */ 1510struct ext4_sb_info { 1511 unsigned long s_desc_size; /* Size of a group descriptor in bytes */ 1512 unsigned long s_inodes_per_block;/* Number of inodes per block */ 1513 unsigned long s_blocks_per_group;/* Number of blocks in a group */ 1514 unsigned long s_clusters_per_group; /* Number of clusters in a group */ 1515 unsigned long s_inodes_per_group;/* Number of inodes in a group */ --- 37 unchanged lines hidden (view full) --- 1553 struct proc_dir_entry *s_proc; 1554 struct kobject s_kobj; 1555 struct completion s_kobj_unregister; 1556 struct super_block *s_sb; 1557 struct buffer_head *s_mmp_bh; 1558 1559 /* Journaling */ 1560 struct journal_s *s_journal; |
1522 struct list_head s_orphan; 1523 struct mutex s_orphan_lock; | |
1524 unsigned long s_ext4_flags; /* Ext4 superblock flags */ | 1561 unsigned long s_ext4_flags; /* Ext4 superblock flags */ |
1562 struct mutex s_orphan_lock; /* Protects on disk list changes */ 1563 struct list_head s_orphan; /* List of orphaned inodes in on disk 1564 list */ 1565 struct ext4_orphan_info s_orphan_info; |
|
1525 unsigned long s_commit_interval; 1526 u32 s_max_batch_time; 1527 u32 s_min_batch_time; 1528 struct block_device *s_journal_bdev; 1529#ifdef CONFIG_QUOTA 1530 /* Names of quota files with journalled quota */ 1531 char __rcu *s_qf_names[EXT4_MAXQUOTAS]; 1532 int s_jquota_fmt; /* Format of quota to use */ --- 321 unchanged lines hidden (view full) --- 1854 EXT4_STATE_DA_ALLOC_CLOSE, /* Alloc DA blks on close */ 1855 EXT4_STATE_EXT_MIGRATE, /* Inode is migrating */ 1856 EXT4_STATE_NEWENTRY, /* File just added to dir */ 1857 EXT4_STATE_MAY_INLINE_DATA, /* may have in-inode data */ 1858 EXT4_STATE_EXT_PRECACHED, /* extents have been precached */ 1859 EXT4_STATE_LUSTRE_EA_INODE, /* Lustre-style ea_inode */ 1860 EXT4_STATE_VERITY_IN_PROGRESS, /* building fs-verity Merkle tree */ 1861 EXT4_STATE_FC_COMMITTING, /* Fast commit ongoing */ | 1566 unsigned long s_commit_interval; 1567 u32 s_max_batch_time; 1568 u32 s_min_batch_time; 1569 struct block_device *s_journal_bdev; 1570#ifdef CONFIG_QUOTA 1571 /* Names of quota files with journalled quota */ 1572 char __rcu *s_qf_names[EXT4_MAXQUOTAS]; 1573 int s_jquota_fmt; /* Format of quota to use */ --- 321 unchanged lines hidden (view full) --- 1895 EXT4_STATE_DA_ALLOC_CLOSE, /* Alloc DA blks on close */ 1896 EXT4_STATE_EXT_MIGRATE, /* Inode is migrating */ 1897 EXT4_STATE_NEWENTRY, /* File just added to dir */ 1898 EXT4_STATE_MAY_INLINE_DATA, /* may have in-inode data */ 1899 EXT4_STATE_EXT_PRECACHED, /* extents have been precached */ 1900 EXT4_STATE_LUSTRE_EA_INODE, /* Lustre-style ea_inode */ 1901 EXT4_STATE_VERITY_IN_PROGRESS, /* building fs-verity Merkle tree */ 1902 EXT4_STATE_FC_COMMITTING, /* Fast commit ongoing */ |
1903 EXT4_STATE_ORPHAN_FILE, /* Inode orphaned in orphan file */ |
|
1862}; 1863 1864#define EXT4_INODE_BIT_FNS(name, field, offset) \ 1865static inline int ext4_test_inode_##name(struct inode *inode, int bit) \ 1866{ \ 1867 return test_bit(bit + (offset), &EXT4_I(inode)->i_##field); \ 1868} \ 1869static inline void ext4_set_inode_##name(struct inode *inode, int bit) \ --- 85 unchanged lines hidden (view full) --- 1955 * The reason why "FAST_COMMIT" is a compat feature is that, FS becomes 1956 * incompatible only if fast commit blocks are present in the FS. Since we 1957 * clear the journal (and thus the fast commit blocks), we don't mark FS as 1958 * incompatible. We also have a JBD2 incompat feature, which gets set when 1959 * there are fast commit blocks present in the journal. 1960 */ 1961#define EXT4_FEATURE_COMPAT_FAST_COMMIT 0x0400 1962#define EXT4_FEATURE_COMPAT_STABLE_INODES 0x0800 | 1904}; 1905 1906#define EXT4_INODE_BIT_FNS(name, field, offset) \ 1907static inline int ext4_test_inode_##name(struct inode *inode, int bit) \ 1908{ \ 1909 return test_bit(bit + (offset), &EXT4_I(inode)->i_##field); \ 1910} \ 1911static inline void ext4_set_inode_##name(struct inode *inode, int bit) \ --- 85 unchanged lines hidden (view full) --- 1997 * The reason why "FAST_COMMIT" is a compat feature is that, FS becomes 1998 * incompatible only if fast commit blocks are present in the FS. Since we 1999 * clear the journal (and thus the fast commit blocks), we don't mark FS as 2000 * incompatible. We also have a JBD2 incompat feature, which gets set when 2001 * there are fast commit blocks present in the journal. 2002 */ 2003#define EXT4_FEATURE_COMPAT_FAST_COMMIT 0x0400 2004#define EXT4_FEATURE_COMPAT_STABLE_INODES 0x0800 |
2005#define EXT4_FEATURE_COMPAT_ORPHAN_FILE 0x1000 /* Orphan file exists */ |
|
1963 1964#define EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001 1965#define EXT4_FEATURE_RO_COMPAT_LARGE_FILE 0x0002 1966#define EXT4_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 1967#define EXT4_FEATURE_RO_COMPAT_HUGE_FILE 0x0008 1968#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010 1969#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020 1970#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040 --- 4 unchanged lines hidden (view full) --- 1975 * METADATA_CSUM is set, group descriptor checksums use the same algorithm as 1976 * all other data structures' checksums. However, the METADATA_CSUM and 1977 * GDT_CSUM bits are mutually exclusive. 1978 */ 1979#define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM 0x0400 1980#define EXT4_FEATURE_RO_COMPAT_READONLY 0x1000 1981#define EXT4_FEATURE_RO_COMPAT_PROJECT 0x2000 1982#define EXT4_FEATURE_RO_COMPAT_VERITY 0x8000 | 2006 2007#define EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001 2008#define EXT4_FEATURE_RO_COMPAT_LARGE_FILE 0x0002 2009#define EXT4_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 2010#define EXT4_FEATURE_RO_COMPAT_HUGE_FILE 0x0008 2011#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010 2012#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020 2013#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040 --- 4 unchanged lines hidden (view full) --- 2018 * METADATA_CSUM is set, group descriptor checksums use the same algorithm as 2019 * all other data structures' checksums. However, the METADATA_CSUM and 2020 * GDT_CSUM bits are mutually exclusive. 2021 */ 2022#define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM 0x0400 2023#define EXT4_FEATURE_RO_COMPAT_READONLY 0x1000 2024#define EXT4_FEATURE_RO_COMPAT_PROJECT 0x2000 2025#define EXT4_FEATURE_RO_COMPAT_VERITY 0x8000 |
2026#define EXT4_FEATURE_RO_COMPAT_ORPHAN_PRESENT 0x10000 /* Orphan file may be 2027 non-empty */ |
|
1983 1984#define EXT4_FEATURE_INCOMPAT_COMPRESSION 0x0001 1985#define EXT4_FEATURE_INCOMPAT_FILETYPE 0x0002 1986#define EXT4_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */ 1987#define EXT4_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */ 1988#define EXT4_FEATURE_INCOMPAT_META_BG 0x0010 1989#define EXT4_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */ 1990#define EXT4_FEATURE_INCOMPAT_64BIT 0x0080 --- 67 unchanged lines hidden (view full) --- 2058EXT4_FEATURE_COMPAT_FUNCS(imagic_inodes, IMAGIC_INODES) 2059EXT4_FEATURE_COMPAT_FUNCS(journal, HAS_JOURNAL) 2060EXT4_FEATURE_COMPAT_FUNCS(xattr, EXT_ATTR) 2061EXT4_FEATURE_COMPAT_FUNCS(resize_inode, RESIZE_INODE) 2062EXT4_FEATURE_COMPAT_FUNCS(dir_index, DIR_INDEX) 2063EXT4_FEATURE_COMPAT_FUNCS(sparse_super2, SPARSE_SUPER2) 2064EXT4_FEATURE_COMPAT_FUNCS(fast_commit, FAST_COMMIT) 2065EXT4_FEATURE_COMPAT_FUNCS(stable_inodes, STABLE_INODES) | 2028 2029#define EXT4_FEATURE_INCOMPAT_COMPRESSION 0x0001 2030#define EXT4_FEATURE_INCOMPAT_FILETYPE 0x0002 2031#define EXT4_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */ 2032#define EXT4_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */ 2033#define EXT4_FEATURE_INCOMPAT_META_BG 0x0010 2034#define EXT4_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */ 2035#define EXT4_FEATURE_INCOMPAT_64BIT 0x0080 --- 67 unchanged lines hidden (view full) --- 2103EXT4_FEATURE_COMPAT_FUNCS(imagic_inodes, IMAGIC_INODES) 2104EXT4_FEATURE_COMPAT_FUNCS(journal, HAS_JOURNAL) 2105EXT4_FEATURE_COMPAT_FUNCS(xattr, EXT_ATTR) 2106EXT4_FEATURE_COMPAT_FUNCS(resize_inode, RESIZE_INODE) 2107EXT4_FEATURE_COMPAT_FUNCS(dir_index, DIR_INDEX) 2108EXT4_FEATURE_COMPAT_FUNCS(sparse_super2, SPARSE_SUPER2) 2109EXT4_FEATURE_COMPAT_FUNCS(fast_commit, FAST_COMMIT) 2110EXT4_FEATURE_COMPAT_FUNCS(stable_inodes, STABLE_INODES) |
2111EXT4_FEATURE_COMPAT_FUNCS(orphan_file, ORPHAN_FILE) |
|
2066 2067EXT4_FEATURE_RO_COMPAT_FUNCS(sparse_super, SPARSE_SUPER) 2068EXT4_FEATURE_RO_COMPAT_FUNCS(large_file, LARGE_FILE) 2069EXT4_FEATURE_RO_COMPAT_FUNCS(btree_dir, BTREE_DIR) 2070EXT4_FEATURE_RO_COMPAT_FUNCS(huge_file, HUGE_FILE) 2071EXT4_FEATURE_RO_COMPAT_FUNCS(gdt_csum, GDT_CSUM) 2072EXT4_FEATURE_RO_COMPAT_FUNCS(dir_nlink, DIR_NLINK) 2073EXT4_FEATURE_RO_COMPAT_FUNCS(extra_isize, EXTRA_ISIZE) 2074EXT4_FEATURE_RO_COMPAT_FUNCS(quota, QUOTA) 2075EXT4_FEATURE_RO_COMPAT_FUNCS(bigalloc, BIGALLOC) 2076EXT4_FEATURE_RO_COMPAT_FUNCS(metadata_csum, METADATA_CSUM) 2077EXT4_FEATURE_RO_COMPAT_FUNCS(readonly, READONLY) 2078EXT4_FEATURE_RO_COMPAT_FUNCS(project, PROJECT) 2079EXT4_FEATURE_RO_COMPAT_FUNCS(verity, VERITY) | 2112 2113EXT4_FEATURE_RO_COMPAT_FUNCS(sparse_super, SPARSE_SUPER) 2114EXT4_FEATURE_RO_COMPAT_FUNCS(large_file, LARGE_FILE) 2115EXT4_FEATURE_RO_COMPAT_FUNCS(btree_dir, BTREE_DIR) 2116EXT4_FEATURE_RO_COMPAT_FUNCS(huge_file, HUGE_FILE) 2117EXT4_FEATURE_RO_COMPAT_FUNCS(gdt_csum, GDT_CSUM) 2118EXT4_FEATURE_RO_COMPAT_FUNCS(dir_nlink, DIR_NLINK) 2119EXT4_FEATURE_RO_COMPAT_FUNCS(extra_isize, EXTRA_ISIZE) 2120EXT4_FEATURE_RO_COMPAT_FUNCS(quota, QUOTA) 2121EXT4_FEATURE_RO_COMPAT_FUNCS(bigalloc, BIGALLOC) 2122EXT4_FEATURE_RO_COMPAT_FUNCS(metadata_csum, METADATA_CSUM) 2123EXT4_FEATURE_RO_COMPAT_FUNCS(readonly, READONLY) 2124EXT4_FEATURE_RO_COMPAT_FUNCS(project, PROJECT) 2125EXT4_FEATURE_RO_COMPAT_FUNCS(verity, VERITY) |
2126EXT4_FEATURE_RO_COMPAT_FUNCS(orphan_present, ORPHAN_PRESENT) |
|
2080 2081EXT4_FEATURE_INCOMPAT_FUNCS(compression, COMPRESSION) 2082EXT4_FEATURE_INCOMPAT_FUNCS(filetype, FILETYPE) 2083EXT4_FEATURE_INCOMPAT_FUNCS(journal_needs_recovery, RECOVER) 2084EXT4_FEATURE_INCOMPAT_FUNCS(journal_dev, JOURNAL_DEV) 2085EXT4_FEATURE_INCOMPAT_FUNCS(meta_bg, META_BG) 2086EXT4_FEATURE_INCOMPAT_FUNCS(extents, EXTENTS) 2087EXT4_FEATURE_INCOMPAT_FUNCS(64bit, 64BIT) --- 17 unchanged lines hidden (view full) --- 2105#define EXT3_FEATURE_COMPAT_SUPP EXT4_FEATURE_COMPAT_EXT_ATTR 2106#define EXT3_FEATURE_INCOMPAT_SUPP (EXT4_FEATURE_INCOMPAT_FILETYPE| \ 2107 EXT4_FEATURE_INCOMPAT_RECOVER| \ 2108 EXT4_FEATURE_INCOMPAT_META_BG) 2109#define EXT3_FEATURE_RO_COMPAT_SUPP (EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER| \ 2110 EXT4_FEATURE_RO_COMPAT_LARGE_FILE| \ 2111 EXT4_FEATURE_RO_COMPAT_BTREE_DIR) 2112 | 2127 2128EXT4_FEATURE_INCOMPAT_FUNCS(compression, COMPRESSION) 2129EXT4_FEATURE_INCOMPAT_FUNCS(filetype, FILETYPE) 2130EXT4_FEATURE_INCOMPAT_FUNCS(journal_needs_recovery, RECOVER) 2131EXT4_FEATURE_INCOMPAT_FUNCS(journal_dev, JOURNAL_DEV) 2132EXT4_FEATURE_INCOMPAT_FUNCS(meta_bg, META_BG) 2133EXT4_FEATURE_INCOMPAT_FUNCS(extents, EXTENTS) 2134EXT4_FEATURE_INCOMPAT_FUNCS(64bit, 64BIT) --- 17 unchanged lines hidden (view full) --- 2152#define EXT3_FEATURE_COMPAT_SUPP EXT4_FEATURE_COMPAT_EXT_ATTR 2153#define EXT3_FEATURE_INCOMPAT_SUPP (EXT4_FEATURE_INCOMPAT_FILETYPE| \ 2154 EXT4_FEATURE_INCOMPAT_RECOVER| \ 2155 EXT4_FEATURE_INCOMPAT_META_BG) 2156#define EXT3_FEATURE_RO_COMPAT_SUPP (EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER| \ 2157 EXT4_FEATURE_RO_COMPAT_LARGE_FILE| \ 2158 EXT4_FEATURE_RO_COMPAT_BTREE_DIR) 2159 |
2113#define EXT4_FEATURE_COMPAT_SUPP EXT4_FEATURE_COMPAT_EXT_ATTR | 2160#define EXT4_FEATURE_COMPAT_SUPP (EXT4_FEATURE_COMPAT_EXT_ATTR| \ 2161 EXT4_FEATURE_COMPAT_ORPHAN_FILE) |
2114#define EXT4_FEATURE_INCOMPAT_SUPP (EXT4_FEATURE_INCOMPAT_FILETYPE| \ 2115 EXT4_FEATURE_INCOMPAT_RECOVER| \ 2116 EXT4_FEATURE_INCOMPAT_META_BG| \ 2117 EXT4_FEATURE_INCOMPAT_EXTENTS| \ 2118 EXT4_FEATURE_INCOMPAT_64BIT| \ 2119 EXT4_FEATURE_INCOMPAT_FLEX_BG| \ 2120 EXT4_FEATURE_INCOMPAT_EA_INODE| \ 2121 EXT4_FEATURE_INCOMPAT_MMP | \ --- 8 unchanged lines hidden (view full) --- 2130 EXT4_FEATURE_RO_COMPAT_DIR_NLINK | \ 2131 EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE | \ 2132 EXT4_FEATURE_RO_COMPAT_BTREE_DIR |\ 2133 EXT4_FEATURE_RO_COMPAT_HUGE_FILE |\ 2134 EXT4_FEATURE_RO_COMPAT_BIGALLOC |\ 2135 EXT4_FEATURE_RO_COMPAT_METADATA_CSUM|\ 2136 EXT4_FEATURE_RO_COMPAT_QUOTA |\ 2137 EXT4_FEATURE_RO_COMPAT_PROJECT |\ | 2162#define EXT4_FEATURE_INCOMPAT_SUPP (EXT4_FEATURE_INCOMPAT_FILETYPE| \ 2163 EXT4_FEATURE_INCOMPAT_RECOVER| \ 2164 EXT4_FEATURE_INCOMPAT_META_BG| \ 2165 EXT4_FEATURE_INCOMPAT_EXTENTS| \ 2166 EXT4_FEATURE_INCOMPAT_64BIT| \ 2167 EXT4_FEATURE_INCOMPAT_FLEX_BG| \ 2168 EXT4_FEATURE_INCOMPAT_EA_INODE| \ 2169 EXT4_FEATURE_INCOMPAT_MMP | \ --- 8 unchanged lines hidden (view full) --- 2178 EXT4_FEATURE_RO_COMPAT_DIR_NLINK | \ 2179 EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE | \ 2180 EXT4_FEATURE_RO_COMPAT_BTREE_DIR |\ 2181 EXT4_FEATURE_RO_COMPAT_HUGE_FILE |\ 2182 EXT4_FEATURE_RO_COMPAT_BIGALLOC |\ 2183 EXT4_FEATURE_RO_COMPAT_METADATA_CSUM|\ 2184 EXT4_FEATURE_RO_COMPAT_QUOTA |\ 2185 EXT4_FEATURE_RO_COMPAT_PROJECT |\ |
2138 EXT4_FEATURE_RO_COMPAT_VERITY) | 2186 EXT4_FEATURE_RO_COMPAT_VERITY |\ 2187 EXT4_FEATURE_RO_COMPAT_ORPHAN_PRESENT) |
2139 2140#define EXTN_FEATURE_FUNCS(ver) \ 2141static inline bool ext4_has_unknown_ext##ver##_compat_features(struct super_block *sb) \ 2142{ \ 2143 return ((EXT4_SB(sb)->s_es->s_feature_compat & \ 2144 cpu_to_le32(~EXT##ver##_FEATURE_COMPAT_SUPP)) != 0); \ 2145} \ 2146static inline bool ext4_has_unknown_ext##ver##_ro_compat_features(struct super_block *sb) \ --- 33 unchanged lines hidden (view full) --- 2180#define EXT4_FLAGS_SHUTDOWN 1 2181#define EXT4_FLAGS_BDEV_IS_DAX 2 2182 2183static inline int ext4_forced_shutdown(struct ext4_sb_info *sbi) 2184{ 2185 return test_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags); 2186} 2187 | 2188 2189#define EXTN_FEATURE_FUNCS(ver) \ 2190static inline bool ext4_has_unknown_ext##ver##_compat_features(struct super_block *sb) \ 2191{ \ 2192 return ((EXT4_SB(sb)->s_es->s_feature_compat & \ 2193 cpu_to_le32(~EXT##ver##_FEATURE_COMPAT_SUPP)) != 0); \ 2194} \ 2195static inline bool ext4_has_unknown_ext##ver##_ro_compat_features(struct super_block *sb) \ --- 33 unchanged lines hidden (view full) --- 2229#define EXT4_FLAGS_SHUTDOWN 1 2230#define EXT4_FLAGS_BDEV_IS_DAX 2 2231 2232static inline int ext4_forced_shutdown(struct ext4_sb_info *sbi) 2233{ 2234 return test_bit(EXT4_FLAGS_SHUTDOWN, &sbi->s_ext4_flags); 2235} 2236 |
2188 | |
2189/* 2190 * Default values for user and/or group using reserved blocks 2191 */ 2192#define EXT4_DEF_RESUID 0 2193#define EXT4_DEF_RESGID 0 2194 2195/* 2196 * Default project ID --- 1566 unchanged lines hidden (view full) --- 3763/* verity.c */ 3764extern const struct fsverity_operations ext4_verityops; 3765 3766/* orphan.c */ 3767extern int ext4_orphan_add(handle_t *, struct inode *); 3768extern int ext4_orphan_del(handle_t *, struct inode *); 3769extern void ext4_orphan_cleanup(struct super_block *sb, 3770 struct ext4_super_block *es); | 2237/* 2238 * Default values for user and/or group using reserved blocks 2239 */ 2240#define EXT4_DEF_RESUID 0 2241#define EXT4_DEF_RESGID 0 2242 2243/* 2244 * Default project ID --- 1566 unchanged lines hidden (view full) --- 3811/* verity.c */ 3812extern const struct fsverity_operations ext4_verityops; 3813 3814/* orphan.c */ 3815extern int ext4_orphan_add(handle_t *, struct inode *); 3816extern int ext4_orphan_del(handle_t *, struct inode *); 3817extern void ext4_orphan_cleanup(struct super_block *sb, 3818 struct ext4_super_block *es); |
3819extern void ext4_release_orphan_info(struct super_block *sb); 3820extern int ext4_init_orphan_info(struct super_block *sb); 3821extern int ext4_orphan_file_empty(struct super_block *sb); 3822extern void ext4_orphan_file_block_trigger( 3823 struct jbd2_buffer_trigger_type *triggers, 3824 struct buffer_head *bh, 3825 void *data, size_t size); |
|
3771 3772/* 3773 * Add new method to test whether block and inode bitmaps are properly 3774 * initialized. With uninit_bg reading the block from disk is not enough 3775 * to mark the bitmap uptodate. We need to also zero-out the bitmap 3776 */ 3777#define BH_BITMAP_UPTODATE BH_JBDPrivateStart 3778 --- 65 unchanged lines hidden --- | 3826 3827/* 3828 * Add new method to test whether block and inode bitmaps are properly 3829 * initialized. With uninit_bg reading the block from disk is not enough 3830 * to mark the bitmap uptodate. We need to also zero-out the bitmap 3831 */ 3832#define BH_BITMAP_UPTODATE BH_JBDPrivateStart 3833 --- 65 unchanged lines hidden --- |