Skip to contentSkip to conversation

Add i_version_hi for 64-bit version

PATCH In review Kalpak Shah 4 participants 4 messages Mar 18, 2007 – Apr 2, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add i_version_hi for 64-bit version

Hi,

This patch adds a 32-bit i_version_hi field to ext4_inode, which can be used for 64-bit inode versions. This field will store the higher 32 bits of the version, while Jean Noel's patch has added support to store the lower 32-bits in osd1.linux1.l_i_version.

include/linux/ext4_fs.h +1 -0
Index: linux-2.6.20/include/linux/ext4_fs.h
===================================================================
@@ -336,6 +336,7 @@ struct ext4_inode {
        __le32  i_atime_extra;  /* extra Access time      (nsec << 2 | epoch) */
        __le32  i_crtime;       /* File Creation time */
        __le32  i_crtime_extra; /* extra File Creation time (nsec << 2 | epoch) */
+       __u32   i_version_hi;   /* high 32 bits for 64-bit version */
 };
 
 #define i_size_high    i_dir_acl

Thanks,
Kalpak <[email protected]>

#1 lore raw
Quoted 12 lines · Kalpak Shah

Hi,

This patch adds a 32-bit i_version_hi field to ext4_inode, which can be used for 64-bit inode versions. This field will store the higher 32 bits of the version, while Jean Noel's patch has added support to store the lower 32-bits in osd1.linux1.l_i_version.

Index: linux-2.6.20/include/linux/ext4_fs.h
===================================================================

include/linux/ext4_fs.h struct ext4_inode { · line 340

Quoted 5 lines
include/linux/ext4_fs.h +1 -0
@@ -336,6 +336,7 @@ struct ext4_inode {
        __le32  i_atime_extra;  /* extra Access time      (nsec << 2 | epoch) */
        __le32  i_crtime;       /* File Creation time */
        __le32  i_crtime_extra; /* extra File Creation time (nsec << 2 | epoch) */
+       __u32   i_version_hi;   /* high 32 bits for 64-bit version */
 };

This is whitespace damaged. I see spaces instead of tabs.

Quoted 5 lines
include/linux/ext4_fs.h +0 -0
 #define i_size_high    i_dir_acl
 

Thanks,
Kalpak <[email protected]>

Thanks,
Shaggy

Signature · 2 lines
David Kleikamp
IBM Linux Technology Center
#2 lore raw
In reply to Kalpak Shah
Quoted 12 lines · Kalpak Shah

Hi,

This patch adds a 32-bit i_version_hi field to ext4_inode, which can be used for 64-bit inode versions. This field will store the higher 32 bits of the version, while Jean Noel's patch has added support to store the lower 32-bits in osd1.linux1.l_i_version.

Index: linux-2.6.20/include/linux/ext4_fs.h
===================================================================

include/linux/ext4_fs.h struct ext4_inode { · line 341

Quoted 6 lines
include/linux/ext4_fs.h +1 -0
@@ -336,6 +336,7 @@ struct ext4_inode {
        __le32  i_atime_extra;  /* extra Access time      (nsec << 2 | epoch) */
        __le32  i_crtime;       /* File Creation time */
        __le32  i_crtime_extra; /* extra File Creation time (nsec << 2 | epoch) */
+       __u32   i_version_hi;   /* high 32 bits for 64-bit version */
 };
 

Any reason not using __le32 for the i_version_hi?

Thanks,
Mingming

#3 lore raw
Quoted 6 lines · Mingming Cao
Quoted 5 lines · Kalpak Shah

This patch adds a 32-bit i_version_hi field to ext4_inode, which can be used for 64-bit inode versions. This field will store the higher 32 bits of the version, while Jean Noel's patch has added support to store the lower 32-bits in osd1.linux1.l_i_version.

Quoted 13 lines

include/linux/ext4_fs.h struct ext4_inode { · line 341

Quoted 11 lines

Index: linux-2.6.20/include/linux/ext4_fs.h
===================================================================

include/linux/ext4_fs.h +1 -0
@@ -336,6 +336,7 @@ struct ext4_inode {
        __le32  i_atime_extra;  /* extra Access time      (nsec << 2 | epoch) */
        __le32  i_crtime;       /* File Creation time */
        __le32  i_crtime_extra; /* extra File Creation time (nsec << 2 | epoch) */
+       __u32   i_version_hi;   /* high 32 bits for 64-bit version */
 };
 

Any reason not using __le32 for the i_version_hi?

Not really. I've also asked Kalpak to run sparse with Shaggy's flags against the other patches to fix up any similar issues.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.