aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2015-10-17 16:15:18 -0400
committerTheodore Ts'o <tytso@mit.edu>2015-10-17 16:15:18 -0400
commit8b4953e13f4c5d9a3c869f5fca7d51e1700e7db0 (patch)
treeebce62469d4e5da45530a76caf6a081c4b4791dd
parent9172796bc3754af73b90cbd70586812ddbc1e0ca (diff)
ext4: reserve code points for the project quota feature
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--fs/ext4/ext4.h8
-rw-r--r--include/uapi/linux/fs.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 3f248c9f899f..320f10ef4a23 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -374,6 +374,7 @@ struct flex_groups {
374#define EXT4_EA_INODE_FL 0x00200000 /* Inode used for large EA */ 374#define EXT4_EA_INODE_FL 0x00200000 /* Inode used for large EA */
375#define EXT4_EOFBLOCKS_FL 0x00400000 /* Blocks allocated beyond EOF */ 375#define EXT4_EOFBLOCKS_FL 0x00400000 /* Blocks allocated beyond EOF */
376#define EXT4_INLINE_DATA_FL 0x10000000 /* Inode has inline data. */ 376#define EXT4_INLINE_DATA_FL 0x10000000 /* Inode has inline data. */
377#define EXT4_PROJINHERIT_FL 0x20000000 /* Create with parents projid */
377#define EXT4_RESERVED_FL 0x80000000 /* reserved for ext4 lib */ 378#define EXT4_RESERVED_FL 0x80000000 /* reserved for ext4 lib */
378 379
379#define EXT4_FL_USER_VISIBLE 0x004BDFFF /* User visible flags */ 380#define EXT4_FL_USER_VISIBLE 0x004BDFFF /* User visible flags */
@@ -431,6 +432,7 @@ enum {
431 EXT4_INODE_EA_INODE = 21, /* Inode used for large EA */ 432 EXT4_INODE_EA_INODE = 21, /* Inode used for large EA */
432 EXT4_INODE_EOFBLOCKS = 22, /* Blocks allocated beyond EOF */ 433 EXT4_INODE_EOFBLOCKS = 22, /* Blocks allocated beyond EOF */
433 EXT4_INODE_INLINE_DATA = 28, /* Data in inode. */ 434 EXT4_INODE_INLINE_DATA = 28, /* Data in inode. */
435 EXT4_INODE_PROJINHERIT = 29, /* Create with parents projid */
434 EXT4_INODE_RESERVED = 31, /* reserved for ext4 lib */ 436 EXT4_INODE_RESERVED = 31, /* reserved for ext4 lib */
435}; 437};
436 438
@@ -475,6 +477,7 @@ static inline void ext4_check_flag_values(void)
475 CHECK_FLAG_VALUE(EA_INODE); 477 CHECK_FLAG_VALUE(EA_INODE);
476 CHECK_FLAG_VALUE(EOFBLOCKS); 478 CHECK_FLAG_VALUE(EOFBLOCKS);
477 CHECK_FLAG_VALUE(INLINE_DATA); 479 CHECK_FLAG_VALUE(INLINE_DATA);
480 CHECK_FLAG_VALUE(PROJINHERIT);
478 CHECK_FLAG_VALUE(RESERVED); 481 CHECK_FLAG_VALUE(RESERVED);
479} 482}
480 483
@@ -692,6 +695,7 @@ struct ext4_inode {
692 __le32 i_crtime; /* File Creation time */ 695 __le32 i_crtime; /* File Creation time */
693 __le32 i_crtime_extra; /* extra FileCreationtime (nsec << 2 | epoch) */ 696 __le32 i_crtime_extra; /* extra FileCreationtime (nsec << 2 | epoch) */
694 __le32 i_version_hi; /* high 32 bits for 64-bit version */ 697 __le32 i_version_hi; /* high 32 bits for 64-bit version */
698 __le32 i_projid; /* Project ID */
695}; 699};
696 700
697struct move_extent { 701struct move_extent {
@@ -1179,7 +1183,8 @@ struct ext4_super_block {
1179 __u8 s_encrypt_algos[4]; /* Encryption algorithms in use */ 1183 __u8 s_encrypt_algos[4]; /* Encryption algorithms in use */
1180 __u8 s_encrypt_pw_salt[16]; /* Salt used for string2key algorithm */ 1184 __u8 s_encrypt_pw_salt[16]; /* Salt used for string2key algorithm */
1181 __le32 s_lpf_ino; /* Location of the lost+found inode */ 1185 __le32 s_lpf_ino; /* Location of the lost+found inode */
1182 __le32 s_reserved[100]; /* Padding to the end of the block */ 1186 __le32 s_prj_quota_inum; /* inode for tracking project quota */
1187 __le32 s_reserved[99]; /* Padding to the end of the block */
1183 __le32 s_checksum; /* crc32c(superblock) */ 1188 __le32 s_checksum; /* crc32c(superblock) */
1184}; 1189};
1185 1190
@@ -1566,6 +1571,7 @@ static inline int ext4_encrypted_inode(struct inode *inode)
1566 */ 1571 */
1567#define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM 0x0400 1572#define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM 0x0400
1568#define EXT4_FEATURE_RO_COMPAT_READONLY 0x1000 1573#define EXT4_FEATURE_RO_COMPAT_READONLY 0x1000
1574#define EXT4_FEATURE_RO_COMPAT_PROJECT 0x2000
1569 1575
1570#define EXT4_FEATURE_INCOMPAT_COMPRESSION 0x0001 1576#define EXT4_FEATURE_INCOMPAT_COMPRESSION 0x0001
1571#define EXT4_FEATURE_INCOMPAT_FILETYPE 0x0002 1577#define EXT4_FEATURE_INCOMPAT_FILETYPE 0x0002
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h
index 9b964a5920af..f15d980249b5 100644
--- a/include/uapi/linux/fs.h
+++ b/include/uapi/linux/fs.h
@@ -197,6 +197,7 @@ struct inodes_stat_t {
197#define FS_EXTENT_FL 0x00080000 /* Extents */ 197#define FS_EXTENT_FL 0x00080000 /* Extents */
198#define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */ 198#define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */
199#define FS_NOCOW_FL 0x00800000 /* Do not cow file */ 199#define FS_NOCOW_FL 0x00800000 /* Do not cow file */
200#define FS_PROJINHERIT_FL 0x20000000 /* Create with parents projid */
200#define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ 201#define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
201 202
202#define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ 203#define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */