aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ext4_fs.h
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2008-01-28 23:58:27 -0500
committerTheodore Ts'o <tytso@mit.edu>2008-01-28 23:58:27 -0500
commita48380f769dfed6163fb82a68b13bd562ea1e027 (patch)
tree2c898479122b3da5c9531aba4b3629c3e6ecfe9f /include/linux/ext4_fs.h
parent7973c0c19ecba92f113488045005f8e7ce1cd7c8 (diff)
ext4: Rename i_dir_acl to i_size_high
Rename ext4_inode.i_dir_acl to i_size_high drop ext4_inode_info.i_dir_acl as it is not used Rename ext4_inode.i_size to ext4_inode.i_size_lo Add helper function for accessing the ext4_inode combined i_size. 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.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h
index 6894f361d01d..a8f3faea8eff 100644
--- a/include/linux/ext4_fs.h
+++ b/include/linux/ext4_fs.h
@@ -275,7 +275,7 @@ struct ext4_mount_options {
275struct ext4_inode { 275struct ext4_inode {
276 __le16 i_mode; /* File mode */ 276 __le16 i_mode; /* File mode */
277 __le16 i_uid; /* Low 16 bits of Owner Uid */ 277 __le16 i_uid; /* Low 16 bits of Owner Uid */
278 __le32 i_size; /* Size in bytes */ 278 __le32 i_size_lo; /* Size in bytes */
279 __le32 i_atime; /* Access time */ 279 __le32 i_atime; /* Access time */
280 __le32 i_ctime; /* Inode Change time */ 280 __le32 i_ctime; /* Inode Change time */
281 __le32 i_mtime; /* Modification time */ 281 __le32 i_mtime; /* Modification time */
@@ -298,7 +298,7 @@ struct ext4_inode {
298 __le32 i_block[EXT4_N_BLOCKS];/* Pointers to blocks */ 298 __le32 i_block[EXT4_N_BLOCKS];/* Pointers to blocks */
299 __le32 i_generation; /* File version (for NFS) */ 299 __le32 i_generation; /* File version (for NFS) */
300 __le32 i_file_acl_lo; /* File ACL */ 300 __le32 i_file_acl_lo; /* File ACL */
301 __le32 i_dir_acl; /* Directory ACL */ 301 __le32 i_size_high;
302 __le32 i_obso_faddr; /* Obsoleted fragment address */ 302 __le32 i_obso_faddr; /* Obsoleted fragment address */
303 union { 303 union {
304 struct { 304 struct {
@@ -330,7 +330,6 @@ struct ext4_inode {
330 __le32 i_crtime_extra; /* extra FileCreationtime (nsec << 2 | epoch) */ 330 __le32 i_crtime_extra; /* extra FileCreationtime (nsec << 2 | epoch) */
331}; 331};
332 332
333#define i_size_high i_dir_acl
334 333
335#define EXT4_EPOCH_BITS 2 334#define EXT4_EPOCH_BITS 2
336#define EXT4_EPOCH_MASK ((1 << EXT4_EPOCH_BITS) - 1) 335#define EXT4_EPOCH_MASK ((1 << EXT4_EPOCH_BITS) - 1)
@@ -1049,7 +1048,17 @@ static inline void ext4_r_blocks_count_set(struct ext4_super_block *es,
1049 es->s_r_blocks_count_hi = cpu_to_le32(blk >> 32); 1048 es->s_r_blocks_count_hi = cpu_to_le32(blk >> 32);
1050} 1049}
1051 1050
1051static inline loff_t ext4_isize(struct ext4_inode *raw_inode)
1052{
1053 return ((loff_t)le32_to_cpu(raw_inode->i_size_high) << 32) |
1054 le32_to_cpu(raw_inode->i_size_lo);
1055}
1052 1056
1057static inline void ext4_isize_set(struct ext4_inode *raw_inode, loff_t i_size)
1058{
1059 raw_inode->i_size_lo = cpu_to_le32(i_size);
1060 raw_inode->i_size_high = cpu_to_le32(i_size >> 32);
1061}
1053 1062
1054#define ext4_std_error(sb, errno) \ 1063#define ext4_std_error(sb, errno) \
1055do { \ 1064do { \