Skip to content

Commit eb40a09

Browse files
Jose R. Santostytso
authored andcommitted
ext4: Set the journal JBD2_FEATURE_INCOMPAT_64BIT on large devices
Set the journals JBD2_FEATURE_INCOMPAT_64BIT on devices with more than 32bit block sizes during mount time. This ensure proper record lenth when writing to the journal. Signed-off-by: Jose R. Santos <jrs@us.ibm.com> Signed-off-by: Andreas Dilger <adilger@clusterfs.com> Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
1 parent c29c0ae commit eb40a09

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fs/ext4/super.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,6 +1813,13 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
18131813
goto failed_mount3;
18141814
}
18151815

1816+
if (ext4_blocks_count(es) > 0xffffffffULL &&
1817+
!jbd2_journal_set_features(EXT4_SB(sb)->s_journal, 0, 0,
1818+
JBD2_FEATURE_INCOMPAT_64BIT)) {
1819+
printk(KERN_ERR "ext4: Failed to set 64-bit journal feature\n");
1820+
goto failed_mount4;
1821+
}
1822+
18161823
/* We have now updated the journal if required, so we can
18171824
* validate the data journaling mode. */
18181825
switch (test_opt(sb, DATA_FLAGS)) {

0 commit comments

Comments
 (0)