From: Eryu Guan <guaneryu@gmail.com>
To: linux-ext4@vger.kernel.org
Cc: Eryu Guan <guaneryu@gmail.com>
Subject: [PATCH 0/2] fix ext4 i_blocks corruption in generic/269
Date: Sat, 4 Jul 2015 00:51:49 +0800 [thread overview]
Message-ID: <1435942311-2337-1-git-send-email-guaneryu@gmail.com> (raw)
I find generic/269 fails on ext4 because of i_blocks corruption like
e2fsck 1.42.12 (29-Aug-2014)
Pass 1: Checking inodes, blocks, and sizes
Inode 4802, i_blocks is 280, should be 248. Fix? no
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
ext4.img: ********** WARNING: Filesystem still has errors **********
ext4.img: 32752/32768 files (12.0% non-contiguous), 128483/131072 blocks
and find that it has something to do with the setattr and write
operations in fsstress, with delalloc enabled.
This can be reproduced more reliably by
# disable all other operations except create/mkdir/write/setattr
# the "-M 524288" restricts the setflags ioctl to EXT4_EXTENTS_FL
export FSSTRESS_AVOID="-fallocsp=0 -fattr_remove=0 -fattr_set=0 \
-fbulkstat=0 -fbulkstat1=0 -fchown=0 -fdread=0 -fdwrite=0 \
-ffallocate=0 -ffiemap=0 -ffreesp=0 -fgetattr=0 -fgetdents=0 \
-flink=0 -fmknod=0 -fpunch=0 -fzero=0 -fcollapse=0 -finsert=0 \
-fread=0 -freadlink=0 -frename=0 -fresvsp=0 -frmdir=0 -fsetxattr=0 \
-fstat=0 -fsymlink=0 -ftruncate=0 -funlink=0 -funresvsp=0 \
-fsetattr=5 -M 524288"
while ./check generic/269; do : ; done
And a simplified reproducer is
xfs_io -fc "pwrite 4k 4k" -c "fsync" /mnt/ext4/testfile
chattr -e /mnt/ext4/testfile
xfs_io -c "pwrite 0 4k" /mnt/ext4/testfile
umount /mnt/ext4
e2fsck -nf /dev/<device>
More details please see the commit log in patches.
Eryu Guan (2):
ext4: be more strict when migrating to non-extent based file
ext4: reserve hole in the migration to non-extent based file
fs/ext4/migrate.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
--
1.8.3.1
next reply other threads:[~2015-07-03 16:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-03 16:51 Eryu Guan [this message]
2015-07-03 16:51 ` [PATCH 1/2] ext4: be more strict when migrating to non-extent based file Eryu Guan
2015-07-04 4:04 ` Theodore Ts'o
2015-07-03 16:51 ` [PATCH 2/2] ext4: reserve hole in the migration " Eryu Guan
2015-07-04 4:33 ` Theodore Ts'o
2015-07-04 16:05 ` Eryu Guan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435942311-2337-1-git-send-email-guaneryu@gmail.com \
--to=guaneryu@gmail.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).