reserved_ratio = 0;
fs_param.s_feature_incompat = EXT3_FEATURE_INCOMPAT_JOURNAL_DEV;
fs_param.s_feature_compat = 0;
- fs_param.s_feature_ro_compat = 0;
+ fs_param.s_feature_ro_compat &=
+ EXT4_FEATURE_RO_COMPAT_METADATA_CSUM;
}
/* Check the user's mkfs options for 64bit */
/* Check the user's mkfs options for metadata checksumming */
if (!quiet &&
+ !EXT2_HAS_INCOMPAT_FEATURE(fs->super,
+ EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) &&
EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)) {
if (!EXT2_HAS_INCOMPAT_FEATURE(fs->super,
if (fs->super->s_feature_incompat &
EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) {
create_journal_dev(fs);
+ printf("\n");
exit(ext2fs_close_free(&fs) ? 1 : 0);
}
--- /dev/null
+Creating filesystem with 4096 1k blocks and 0 inodes
+Superblock backups stored on blocks:
+
+Zeroing journal device: \b\b\b\b\b\b\b\b\b
+Filesystem features: journal_dev metadata_csum
--- /dev/null
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+cp /dev/null $OUT
+
+$MKE2FS -F -o Linux -b 1024 -O journal_dev,metadata_csum -T ext4 $TMPFILE 4096 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT 2>&1
+$DUMPE2FS -h $TMPFILE 2>&1 | grep 'Filesystem features:' >> $OUT
+
+rm -f $TMPFILE
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP