diff options
author | Li Xi <pkuelelixi@gmail.com> | 2016-01-08 16:01:21 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2016-01-08 16:01:21 -0500 |
commit | 040cb3786d9b25293b8b0b05b90da0f871e1eb9b (patch) | |
tree | bc3decd8a3b122a4334934a4c89e38122b45f2cf /fs/ext4/ext4.h | |
parent | 56a04915df4e85b34b1c1613c64b87dd2283c26a (diff) |
ext4: adds project ID support
Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Reviewed-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index f82da361a823..023781101bae 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -378,14 +378,15 @@ struct flex_groups { | |||
378 | #define EXT4_PROJINHERIT_FL 0x20000000 /* Create with parents projid */ | 378 | #define EXT4_PROJINHERIT_FL 0x20000000 /* Create with parents projid */ |
379 | #define EXT4_RESERVED_FL 0x80000000 /* reserved for ext4 lib */ | 379 | #define EXT4_RESERVED_FL 0x80000000 /* reserved for ext4 lib */ |
380 | 380 | ||
381 | #define EXT4_FL_USER_VISIBLE 0x004BDFFF /* User visible flags */ | 381 | #define EXT4_FL_USER_VISIBLE 0x304BDFFF /* User visible flags */ |
382 | #define EXT4_FL_USER_MODIFIABLE 0x004380FF /* User modifiable flags */ | 382 | #define EXT4_FL_USER_MODIFIABLE 0x204380FF /* User modifiable flags */ |
383 | 383 | ||
384 | /* Flags that should be inherited by new inodes from their parent. */ | 384 | /* Flags that should be inherited by new inodes from their parent. */ |
385 | #define EXT4_FL_INHERITED (EXT4_SECRM_FL | EXT4_UNRM_FL | EXT4_COMPR_FL |\ | 385 | #define EXT4_FL_INHERITED (EXT4_SECRM_FL | EXT4_UNRM_FL | EXT4_COMPR_FL |\ |
386 | EXT4_SYNC_FL | EXT4_NODUMP_FL | EXT4_NOATIME_FL |\ | 386 | EXT4_SYNC_FL | EXT4_NODUMP_FL | EXT4_NOATIME_FL |\ |
387 | EXT4_NOCOMPR_FL | EXT4_JOURNAL_DATA_FL |\ | 387 | EXT4_NOCOMPR_FL | EXT4_JOURNAL_DATA_FL |\ |
388 | EXT4_NOTAIL_FL | EXT4_DIRSYNC_FL) | 388 | EXT4_NOTAIL_FL | EXT4_DIRSYNC_FL |\ |
389 | EXT4_PROJINHERIT_FL) | ||
389 | 390 | ||
390 | /* Flags that are appropriate for regular files (all but dir-specific ones). */ | 391 | /* Flags that are appropriate for regular files (all but dir-specific ones). */ |
391 | #define EXT4_REG_FLMASK (~(EXT4_DIRSYNC_FL | EXT4_TOPDIR_FL)) | 392 | #define EXT4_REG_FLMASK (~(EXT4_DIRSYNC_FL | EXT4_TOPDIR_FL)) |
@@ -1004,6 +1005,7 @@ struct ext4_inode_info { | |||
1004 | /* Encryption params */ | 1005 | /* Encryption params */ |
1005 | struct ext4_crypt_info *i_crypt_info; | 1006 | struct ext4_crypt_info *i_crypt_info; |
1006 | #endif | 1007 | #endif |
1008 | kprojid_t i_projid; | ||
1007 | }; | 1009 | }; |
1008 | 1010 | ||
1009 | /* | 1011 | /* |
@@ -1765,7 +1767,8 @@ EXT4_FEATURE_INCOMPAT_FUNCS(encrypt, ENCRYPT) | |||
1765 | EXT4_FEATURE_RO_COMPAT_HUGE_FILE |\ | 1767 | EXT4_FEATURE_RO_COMPAT_HUGE_FILE |\ |
1766 | EXT4_FEATURE_RO_COMPAT_BIGALLOC |\ | 1768 | EXT4_FEATURE_RO_COMPAT_BIGALLOC |\ |
1767 | EXT4_FEATURE_RO_COMPAT_METADATA_CSUM|\ | 1769 | EXT4_FEATURE_RO_COMPAT_METADATA_CSUM|\ |
1768 | EXT4_FEATURE_RO_COMPAT_QUOTA) | 1770 | EXT4_FEATURE_RO_COMPAT_QUOTA |\ |
1771 | EXT4_FEATURE_RO_COMPAT_PROJECT) | ||
1769 | 1772 | ||
1770 | #define EXTN_FEATURE_FUNCS(ver) \ | 1773 | #define EXTN_FEATURE_FUNCS(ver) \ |
1771 | static inline bool ext4_has_unknown_ext##ver##_compat_features(struct super_block *sb) \ | 1774 | static inline bool ext4_has_unknown_ext##ver##_compat_features(struct super_block *sb) \ |
@@ -1807,6 +1810,11 @@ static inline bool ext4_has_incompat_features(struct super_block *sb) | |||
1807 | #define EXT4_DEF_RESUID 0 | 1810 | #define EXT4_DEF_RESUID 0 |
1808 | #define EXT4_DEF_RESGID 0 | 1811 | #define EXT4_DEF_RESGID 0 |
1809 | 1812 | ||
1813 | /* | ||
1814 | * Default project ID | ||
1815 | */ | ||
1816 | #define EXT4_DEF_PROJID 0 | ||
1817 | |||
1810 | #define EXT4_DEF_INODE_READAHEAD_BLKS 32 | 1818 | #define EXT4_DEF_INODE_READAHEAD_BLKS 32 |
1811 | 1819 | ||
1812 | /* | 1820 | /* |
@@ -2498,6 +2506,7 @@ extern int ext4_zero_partial_blocks(handle_t *handle, struct inode *inode, | |||
2498 | extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf); | 2506 | extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf); |
2499 | extern int ext4_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf); | 2507 | extern int ext4_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf); |
2500 | extern qsize_t *ext4_get_reserved_space(struct inode *inode); | 2508 | extern qsize_t *ext4_get_reserved_space(struct inode *inode); |
2509 | extern int ext4_get_projid(struct inode *inode, kprojid_t *projid); | ||
2501 | extern void ext4_da_update_reserve_space(struct inode *inode, | 2510 | extern void ext4_da_update_reserve_space(struct inode *inode, |
2502 | int used, int quota_claim); | 2511 | int used, int quota_claim); |
2503 | extern int ext4_issue_zeroout(struct inode *inode, ext4_lblk_t lblk, | 2512 | extern int ext4_issue_zeroout(struct inode *inode, ext4_lblk_t lblk, |