From: Theodore Tso <tytso@mit.edu>
To: linux-ext4@vger.kernel.org
Subject: Re: Rare xfsqa test failure
Date: Tue, 18 Aug 2009 10:56:33 -0400 [thread overview]
Message-ID: <20090818145633.GB28560@mit.edu> (raw)
In-Reply-To: <E1MdNJu-0006uc-GX@closure.thunk.org>
On Tue, Aug 18, 2009 at 07:57:42AM -0400, Theodore Ts'o wrote:
>
> As a heads up, I'm seeing a rare xfsqa test failure with the stable
> portion of the ext4 patch queue; it doesn't hit all the time, but when
> it does, i_size is corrupted:
The problem shows up with stock 2.6.31-rc4.
I just noticed I'm running with a patch to xfsqa that I had forgotten
to push upstream. xfsqa's check_generic_filesystem doesn't force a
filesystem check, so people running the tests wouldn't have noticed
the problem.
Here's the patch; I'll send it to the XFS folks.
- Ted
commit fbbeb08db507e26f61f44451ce52f9bac24cd8fa
Author: Theodore Ts'o <tytso@mit.edu>
Date: Tue Aug 18 10:51:37 2009 -0400
Add ext2/3/4-specific _check_extN_filesystem function
The _check_generic_filesystem function doesn't force a full filesystem
check, so filesystem inconsistencies after a test wouldn't be noticed.
To fix this, I added an extN specific check filesystem function.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
diff --git a/common.rc b/common.rc
index 82b0d51..da5f99e 100644
--- a/common.rc
+++ b/common.rc
@@ -865,6 +865,52 @@ _check_generic_filesystem()
return 0
}
+# Check an ext2/3/4 filesystem
+#
+_check_extN_filesystem()
+{
+ device=$1
+
+ # If type is set, we're mounted
+ type=`_fs_type $device`
+ ok=1
+
+ if [ "$type" = "$FSTYP" ]
+ then
+ # mounted ...
+ mountpoint=`_umount_or_remount_ro $device`
+ fi
+
+ e2fsck -nf $device >$tmp.fsck 2>&1
+ if [ $? -ne 0 ]
+ then
+ echo "_check_extN_filesystem: filesystem on $device is inconsistent (see $seq.full)"
+
+ echo "_check_extN filesystem: filesystem on $device is inconsistent" >>$here/$seq.full
+ echo "*** e2fsck output ***" >>$here/$seq.full
+ cat $tmp.fsck >>$here/$seq.full
+ echo "*** end e2fsck output" >>$here/$seq.full
+
+ ok=0
+ fi
+ rm -f $tmp.fsck
+
+ if [ $ok -eq 0 ]
+ then
+ echo "*** mount output ***" >>$here/$seq.full
+ _mount >>$here/$seq.full
+ echo "*** end mount output" >>$here/$seq.full
+ elif [ "$type" = "$FSTYP" ]
+ then
+ # was mounted ...
+ _mount_or_remount_rw "$MOUNT_OPTIONS" $device $mountpoint
+ ok=$?
+ fi
+
+ [ $ok -eq 0 ] && exit 1
+ return 0
+}
+
# run xfs_check and friends on a FS.
_check_xfs_filesystem()
@@ -1033,6 +1079,9 @@ _check_test_fs()
udf)
# do nothing for now
;;
+ ext2|ext3|ext4)
+ _check_extN_filesystem $TEST_DEV
+ ;;
*)
_check_generic_filesystem $TEST_DEV
;;
@@ -1059,6 +1108,9 @@ _check_scratch_fs()
nfs*)
# Don't know how to check an NFS filesystem, yet.
;;
+ ext2|ext3|ext4)
+ _check_extN_filesystem $SCRATCH_DEV
+ ;;
*)
_check_generic_filesystem $SCRATCH_DEV
;;
next prev parent reply other threads:[~2009-08-18 14:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-18 11:57 Rare xfsqa test failure Theodore Ts'o
2009-08-18 14:56 ` Theodore Tso [this message]
2009-08-18 17:07 ` Andreas Dilger
2009-08-18 21:42 ` Theodore Tso
2009-08-19 15:28 ` Eric Sandeen
2009-08-19 16:40 ` Christoph Hellwig
2009-08-19 16:51 ` Eric Sandeen
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=20090818145633.GB28560@mit.edu \
--to=tytso@mit.edu \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.