Verify correct operation in the case of writing files with allocated
blocks at the end of the file beyond i_size. This can happen for
PAGE_SIZE > blocksize, or through fallocate().
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
--- /dev/null
+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
+test_filesys: 12/32 files (0.0% non-contiguous), 40/100 blocks
+Exit status is 0
--- /dev/null
+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
+test_filesys: 12/32 files (0.0% non-contiguous), 40/100 blocks
+Exit status is 0
--- /dev/null
+PAGE_SIZE larger than blocksize with hole at end
--- /dev/null
+SKIP_GUNZIP="true"
+
+touch $TMPFILE
+$MKE2FS -N 32 -F -o Linux -b 1024 $TMPFILE 100 > /dev/null 2>&1
+
+DATA_FILE=$RANDOM
+dd if=/dev/zero of=$DATA_FILE bs=1k count=16 > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
+write $DATA_FILE foo
+set_inode_field foo size 13000
+q
+EOF
+
+. $cmd_dir/run_e2fsck
+
+rm -f $DATA_FILE
+
+unset DATA_FILE