char buf[SUPERBLOCK_SIZE] __attribute__ ((aligned(8)));
__u8 old_uuid[UUID_SIZE];
+ if (!ext2fs_has_feature_csum_seed(fs->super) &&
+ (ext2fs_has_feature_metadata_csum(fs->super) ||
+ ext2fs_has_feature_ea_inode(fs->super))) {
+ check_fsck_needed(fs,
+ _("Setting the UUID on this "
+ "filesystem could take some time."));
+ rewrite_checksums = 1;
+ }
+
if (ext2fs_has_group_desc_csum(fs)) {
/*
* Changing the UUID on a metadata_csum FS requires
try_confirm_csum_seed_support();
exit(1);
}
- if (!ext2fs_has_feature_csum_seed(fs->super))
- check_fsck_needed(fs,
- _("Setting UUID on a checksummed "
- "filesystem could take some time."));
/*
* Determine if the block group checksums are
}
ext2fs_mark_super_dirty(fs);
- if (!ext2fs_has_feature_csum_seed(fs->super) &&
- (ext2fs_has_feature_metadata_csum(fs->super) ||
- ext2fs_has_feature_ea_inode(fs->super)))
- rewrite_checksums = 1;
}
if (I_flag) {
Resizing inodes could take some time.
Proceed anyway (or wait 5 seconds to proceed) ? (y,N)
Exit status is 1
-tune2fs -U random test.img
-Setting UUID on a checksummed filesystem could take some time.
-Proceed anyway (or wait 5 seconds to proceed) ? (y,N)
-Exit status is 1
Change in FS metadata:
Pass 1: Checking inodes, blocks, and sizes
Proceed anyway (or wait 5 seconds to proceed) ? (y,N) Setting inode size 512
Exit status is 0
tune2fs -U f0f0f0f0-f0f0-f0f0-f0f0-f0f0f0f0f0f0 test.img
-Setting UUID on a checksummed filesystem could take some time.
+Setting the UUID on this filesystem could take some time.
Proceed anyway (or wait 5 seconds to proceed) ? (y,N) Exit status is 0
Backing up journal inode block information.
Pass 5: Checking group summary information
Exit status is 0
+
+Testing with metadata checksum enabled
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: \b\b\b\b\bdone
+Writing inode tables: \b\b\b\b\bdone
+Creating journal (16384 blocks): done
+Creating 445 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: \b\b\b\b\bdone
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+tune2fs -U random test.img
+Setting the UUID on this filesystem could take some time.
+Proceed anyway (or wait 5 seconds to proceed) ? (y,N)
+Exit status is 1
hugefiles_size = 1M
zero_hugefiles = false
}
+ ext4m = {
+ features = has_journal,extent,huge_file,^flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode,64bit,metadata_csum
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 32M
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
ENDL
echo "tune2fs dangerous prompts test" > $OUT
status=$?
echo Exit status is $status >> $OUT
-# change uuid
-echo "tune2fs -U random test.img" >> $OUT
-echo 'n' | TUNE2FS_FORCE_PROMPT=1 $TUNE2FS -U random $TMPFILE >> $OUT 2>&1
-status=$?
-echo Exit status is $status >> $OUT
-
# check
$FSCK -yD -N test_filesys $TMPFILE >> $OUT 2>&1
status=$?
echo Exit status is $status >> $OUT
+echo " " >> $OUT
+echo "Testing with metadata checksum enabled" >> $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4m -U 6fc3daa4-180d-4f2b-a6f2-f7a5efb79bcf $TMPFILE 524288 >> $OUT 2>&1
+$DUMPE2FS $TMPFILE 2> /dev/null | grep '^Group 0:' -B99 -A20 | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -f -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# change uuid
+echo "tune2fs -U random test.img" >> $OUT
+echo 'n' | TUNE2FS_FORCE_PROMPT=1 $TUNE2FS -U random $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
rm $TMPFILE $OUT.before $OUT.after $CONF
#