Bug 15742 - Fallocated extents handled incorrectly if beyond i_size
Summary: Fallocated extents handled incorrectly if beyond i_size
Status: RESOLVED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: ext4 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_ext4@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-09 17:02 UTC by Dmitry Monakhov
Modified: 2010-07-06 07:16 UTC (History)
0 users

See Also:
Kernel Version: v2.6.25
Subsystem:
Regression: No
Bisected commit-id:


Attachments
testcase (628 bytes, text/x-csrc)
2010-04-09 17:20 UTC, Dmitry Monakhov
Details

Description Dmitry Monakhov 2010-04-09 17:02:43 UTC
bad commit: 3977c965ec35ce1a7eac988ad313f0fc9aee9660

Zerrout trick allow us to optimize cases where it is more reasonable
to explicitly zeroout extent and mark it as initialized instead of
splitting to several small ones.
But this optimization is not acceptable is extent is beyond i_size
Because it is not possible to have initialized blocks after i_size.
Fsck treat this as incorrect inode size.

#TESTCASE
mkfs.ext4 /dev/sdb1
mount /dev/sdb1 /mnt
./falloc_test /mnt/F1
umount /mnt
fsck.ext4 -f /dev/sdb1

fsck.ext4 -f /dev/sdb1
e2fsck 1.41.9 (22-Aug-2009)
Pass 1: Checking inodes, blocks, and sizes
Inode 12, i_size is 1, should be 40960.  Fix<y>? no
Comment 1 Dmitry Monakhov 2010-04-09 17:20:56 UTC
Created attachment 25931 [details]
testcase
Comment 2 Dmitry Monakhov 2010-04-09 17:24:00 UTC
Proposed patch:
http://patchwork.ozlabs.org/patch/49856/

Note You need to log in before you can comment on or make changes to this bug.