diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2008-01-28 23:58:26 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-01-28 23:58:26 -0500 |
commit | 0fc1b451471dfc3cabd6e99ef441df9804616e63 (patch) | |
tree | b018b6ddc5bb5f02b985b06c11f0c01adb38167a /include/linux/ext4_fs.h | |
parent | a48380f769dfed6163fb82a68b13bd562ea1e027 (diff) |
ext4: Add support for 48 bit inode i_blocks.
Use the __le16 l_i_reserved1 field of the linux2 struct of ext4_inode
to represet the higher 16 bits for i_blocks. With this change max_file
size becomes (2**48 -1 )* 512 bytes.
We add a RO_COMPAT feature to the super block to indicate that inode
have i_blocks represented as a split 48 bits. Super block with this
feature set cannot be mounted read write on a kernel with CONFIG_LSF
disabled.
Super block flag EXT4_FEATURE_RO_COMPAT_HUGE_FILE
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux/ext4_fs.h')
-rw-r--r-- | include/linux/ext4_fs.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h index a8f3faea8eff..be25eca9c040 100644 --- a/include/linux/ext4_fs.h +++ b/include/linux/ext4_fs.h | |||
@@ -282,7 +282,7 @@ struct ext4_inode { | |||
282 | __le32 i_dtime; /* Deletion Time */ | 282 | __le32 i_dtime; /* Deletion Time */ |
283 | __le16 i_gid; /* Low 16 bits of Group Id */ | 283 | __le16 i_gid; /* Low 16 bits of Group Id */ |
284 | __le16 i_links_count; /* Links count */ | 284 | __le16 i_links_count; /* Links count */ |
285 | __le32 i_blocks; /* Blocks count */ | 285 | __le32 i_blocks_lo; /* Blocks count */ |
286 | __le32 i_flags; /* File flags */ | 286 | __le32 i_flags; /* File flags */ |
287 | union { | 287 | union { |
288 | struct { | 288 | struct { |
@@ -302,7 +302,7 @@ struct ext4_inode { | |||
302 | __le32 i_obso_faddr; /* Obsoleted fragment address */ | 302 | __le32 i_obso_faddr; /* Obsoleted fragment address */ |
303 | union { | 303 | union { |
304 | struct { | 304 | struct { |
305 | __le16 l_i_reserved1; /* Obsoleted fragment number/size which are removed in ext4 */ | 305 | __le16 l_i_blocks_high; /* were l_i_reserved1 */ |
306 | __le16 l_i_file_acl_high; | 306 | __le16 l_i_file_acl_high; |
307 | __le16 l_i_uid_high; /* these 2 fields */ | 307 | __le16 l_i_uid_high; /* these 2 fields */ |
308 | __le16 l_i_gid_high; /* were reserved2[0] */ | 308 | __le16 l_i_gid_high; /* were reserved2[0] */ |
@@ -404,6 +404,7 @@ do { \ | |||
404 | #if defined(__KERNEL__) || defined(__linux__) | 404 | #if defined(__KERNEL__) || defined(__linux__) |
405 | #define i_reserved1 osd1.linux1.l_i_reserved1 | 405 | #define i_reserved1 osd1.linux1.l_i_reserved1 |
406 | #define i_file_acl_high osd2.linux2.l_i_file_acl_high | 406 | #define i_file_acl_high osd2.linux2.l_i_file_acl_high |
407 | #define i_blocks_high osd2.linux2.l_i_blocks_high | ||
407 | #define i_uid_low i_uid | 408 | #define i_uid_low i_uid |
408 | #define i_gid_low i_gid | 409 | #define i_gid_low i_gid |
409 | #define i_uid_high osd2.linux2.l_i_uid_high | 410 | #define i_uid_high osd2.linux2.l_i_uid_high |
@@ -670,6 +671,7 @@ static inline int ext4_valid_inum(struct super_block *sb, unsigned long ino) | |||
670 | #define EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001 | 671 | #define EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001 |
671 | #define EXT4_FEATURE_RO_COMPAT_LARGE_FILE 0x0002 | 672 | #define EXT4_FEATURE_RO_COMPAT_LARGE_FILE 0x0002 |
672 | #define EXT4_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 | 673 | #define EXT4_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 |
674 | #define EXT4_FEATURE_RO_COMPAT_HUGE_FILE 0x0008 | ||
673 | #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010 | 675 | #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010 |
674 | #define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020 | 676 | #define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020 |
675 | #define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040 | 677 | #define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040 |
@@ -681,6 +683,7 @@ static inline int ext4_valid_inum(struct super_block *sb, unsigned long ino) | |||
681 | #define EXT4_FEATURE_INCOMPAT_META_BG 0x0010 | 683 | #define EXT4_FEATURE_INCOMPAT_META_BG 0x0010 |
682 | #define EXT4_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */ | 684 | #define EXT4_FEATURE_INCOMPAT_EXTENTS 0x0040 /* extents support */ |
683 | #define EXT4_FEATURE_INCOMPAT_64BIT 0x0080 | 685 | #define EXT4_FEATURE_INCOMPAT_64BIT 0x0080 |
686 | #define EXT4_FEATURE_INCOMPAT_MMP 0x0100 | ||
684 | #define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200 | 687 | #define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200 |
685 | 688 | ||
686 | #define EXT4_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR | 689 | #define EXT4_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR |
@@ -695,7 +698,8 @@ static inline int ext4_valid_inum(struct super_block *sb, unsigned long ino) | |||
695 | EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \ | 698 | EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \ |
696 | EXT4_FEATURE_RO_COMPAT_DIR_NLINK | \ | 699 | EXT4_FEATURE_RO_COMPAT_DIR_NLINK | \ |
697 | EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE | \ | 700 | EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE | \ |
698 | EXT4_FEATURE_RO_COMPAT_BTREE_DIR) | 701 | EXT4_FEATURE_RO_COMPAT_BTREE_DIR |\ |
702 | EXT4_FEATURE_RO_COMPAT_HUGE_FILE) | ||
699 | 703 | ||
700 | /* | 704 | /* |
701 | * Default values for user and/or group using reserved blocks | 705 | * Default values for user and/or group using reserved blocks |