From: Dave Chinner <david@fromorbit.com>
To: "Edwin Török" <edvin.torok@citrix.com>
Cc: fstests@vger.kernel.org, Mark Syms <Mark.Syms@citrix.com>,
Tim Smith <Tim.Smith@citrix.com>,
Ross Lagerwall <Ross.Lagerwall@citrix.com>
Subject: Re: [PATCH] Add new tests/generic/536: intermittent I/O errors must not corrupt a filesystem
Date: Fri, 22 Mar 2019 08:26:41 +1100 [thread overview]
Message-ID: <20190321212641.GD26298@dastard> (raw)
In-Reply-To: <20190321103045.6441-1-edvin.torok@citrix.com>
On Thu, Mar 21, 2019 at 10:30:46AM +0000, Edwin Török wrote:
> Based on tests/generic/347.
>
> In our lab we've found that if multiple iSCSI connection errors are
> detected (without completely loosing the iSCSI connection) then the GFS2
> filesystem becomes corrupt due to differences in filesystem and device blocksizes.
> Add a test that explicitly checks for this by simulating I/O errors
> deterministically with dm-thin.
Exactly what IO errors is dm-thinp generating here? If you run it
out of space, then it triggers ENOSPC, not EIO. That's very, very
different to iSCSI throwing random EIO errors..
.....
> +# now remount the filesystem without triggering IO errors,
> +# and check that the filesystem is not corrupt
> +_dmthin_cycle_mount
> +# ls --color makes ls stat each file, which finds the corruption
Not sure it always does - ISTR that in the past if the dtype
returned indicated the type of file, then it ls would omit the stat
just for the purposes of coloring....
And, realistically, the way we find /filesystem/ corruption is to
run fsck/repair, not iterate the directory structure. If we are
looking for missing files, then we dump the directory structure to
the golden output file or dump it before/after errors and compare
that they are the same.
> +ls --color=always $SCRATCH_MNT/ >/dev/null || _fail "Failed to list filesystem after remount"
> +ls --color=always $SCRATCH_MNT/ >/dev/null || _fail "Failed to list filesystem after remount"
> +ls --color=always $SCRATCH_MNT/ >/dev/null || _fail "Failed to list filesystem after remount"
If corruption is not found on the first pass, why would the next 2
passes find anything different?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2019-03-21 21:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-21 10:30 [PATCH] Add new tests/generic/536: intermittent I/O errors must not corrupt a filesystem Edwin Török
2019-03-21 20:23 ` Darrick J. Wong
2019-03-22 14:42 ` Edwin Török
2019-03-21 21:26 ` Dave Chinner [this message]
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=20190321212641.GD26298@dastard \
--to=david@fromorbit.com \
--cc=Mark.Syms@citrix.com \
--cc=Ross.Lagerwall@citrix.com \
--cc=Tim.Smith@citrix.com \
--cc=edvin.torok@citrix.com \
--cc=fstests@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