linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rich Johnston <rjohnston@sgi.com>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	dchinner@redhat.com, xfs@oss.sgi.com
Subject: Re: [PATCH 10/10] xfstests: add disk failure simulation test
Date: Mon, 4 Mar 2013 17:44:16 -0600	[thread overview]
Message-ID: <513531D0.9080409@sgi.com> (raw)
In-Reply-To: <87621ah8q4.fsf@openvz.org>

On 03/01/2013 07:49 PM, Dmitry Monakhov wrote:
> On Fri, 1 Mar 2013 14:11:15 -0600, Rich Johnston <rjohnston@sgi.com> wrote:
>> On 02/20/2013 04:42 AM, Dmitry Monakhov wrote:
>>> There are many situations where disk may fail for example
>>> 1) brutal usb dongle unplug
>>> 2) iscsi (or any other netbdev) failure due to network issues
>>> In this situation filesystem which use this blockdevice is
>>> expected to fail(force RO remount, abort, etc) but whole system
>>> should still be operational. In other words:
>>> 1) Kernel should not panic
>>> 2) Memory should not leak
>>> 3) Data integrity operations (sync,fsync,fdatasync, directio) should fail
>>>      for affected filesystem
>>> 4) It should be possible to umount broken filesystem
>>>
>>> Later when disk becomes available again we expect(only for journaled filesystems):
>>> 5) It will be possible to mount filesystem w/o explicit fsck (in order to caught
>>
>> typo                                     s/caught/catch/g
>>
>>>      issues like https://patchwork.kernel.org/patch/1983981/)
>>> 6) Filesystem should be operational
>>> 7) After mount/umount has being done all errors should be fixed so fsck should
>>>      not spot any issues.
>>>
>>> This test use fault enjection (CONFIG_FAIL_MAKE_REQUEST=y config option )
>>     May want to mention all the kernel config options required.
>> i.e. CONFIG_FAULT_INJECTION=y ... are there others?
>> CONFIG_FAULT_INJECTION_DEBUG_FS=y ???
> Yes, all three options are required.
>>
>>> which force all new IO requests to fail for a given device. Xfs already has
>>     to force
>>
>>> XFS_IOC_GOINGDOWN ioctl which provides similar behaviour, but it is fs speciffic
>>
>> typos s/behaviour/behavior/g  s/speciffic/specific
>>                                           > and it does it in an easy way
>> because it perform freeze_bdev() before actual
>>> shotdown.
>> typo s/shotdown/shutdown/g
> Agree with your diagnosis. My gramma is bad and I've forget to call spell check
> before submission. Should I resend this one or you fix it manually
> on commit time?

No worries, I'm sure your English is much better than any of my attempts 
to write in your native tongue. ;)
No need to resend, glad to take care of these minor changes at commit time.

commit 02e57e1e3a42856dca9061ff943ba72fa7be8469
Author: Dmitry Monakhov <dmonakhov@openvz.org>
Date:   Wed Feb 20 10:42:15 2013 +0000

     xfstests: add disk failure simulation test

     There are many situations where disk may fail for example
     1) brutal usb dongle unplug
     2) iscsi (or any other netbdev) failure due to network issues
     In this situation filesystem which use this blockdevice is
     expected to fail(force RO remount, abort, etc) but whole system
     should still be operational. In other words:
     1) Kernel should not panic
     2) Memory should not leak
     3) Data integrity operations (sync,fsync,fdatasync, directio) 
should fail
        for affected filesystem
     4) It should be possible to umount broken filesystem

     Later when disk becomes available again we expect(only for 
journaled filesystems):
     5) It will be possible to mount filesystem w/o explicit fsck (in 
order to catch
        issues like https://patchwork.kernel.org/patch/1983981/)
     6) Filesystem should be operational
     7) After mount/umount has being done all errors should be fixed so 
fsck should
        not spot any issues.

     This test use fault injection (CONFIG_FAULT_INJECTION=y,
     CONFIG_FAIL_MAKE_REQUEST=y and CONFIG_FAULT_INJECTION_DEBUG_FS=y config
     options) to force all new IO requests to fail for a given device. Xfs
     already has XFS_IOC_GOINGDOWN ioctl which provides similar 
behavior, but it
     is fs specific and it does it in an easy way because it performs 
freeze_bdev()
     before actual shutdown.

     Test run fsstress in background and then force disk failure.
     Once disk failed it check that (1)-(4) is true.
     Then makes disk available again and check that (5)-(7) is also true

     BE CAREFUL!! test known to cause memory corruption for XFS
     see: https://gist.github.com/dmonakhov/4953045



_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-03-04 23:44 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-20 10:42 [PATCH 00/10] xfstests: Stress tests improments v5 Dmitry Monakhov
2013-02-20 10:42 ` [PATCH 01/10] xfstests: add fio requirement V2 Dmitry Monakhov
2013-03-01 15:43   ` Rich Johnston
2013-02-20 10:42 ` [PATCH 02/10] xfstest: add configurable load factors Dmitry Monakhov
2013-03-01 15:43   ` Rich Johnston
2013-02-20 10:42 ` [PATCH 03/10] xfstests: hardcode fops for determinable fsstests runs Dmitry Monakhov
2013-03-01 15:43   ` Rich Johnston
2013-02-20 10:42 ` [PATCH 04/10] xfstets: fsstress add replace file operation Dmitry Monakhov
2013-03-01 15:43   ` Rich Johnston
2013-02-20 10:42 ` [PATCH 05/10] xfstest: allow fsstress to use load factor where appropriate Dmitry Monakhov
2013-03-01 15:43   ` Rich Johnston
2013-02-20 10:42 ` [PATCH 06/10] xfstest: move run_check to common.rc Dmitry Monakhov
2013-03-01 15:44   ` Rich Johnston
2013-02-20 10:42 ` [PATCH 07/10] xfstest: add fallocate/truncate vs AIO/DIO stress test Dmitry Monakhov
2013-03-01 17:49   ` Rich Johnston
2013-02-20 10:42 ` [PATCH 08/10] xfstest: add fallocate/punch_hole " Dmitry Monakhov
2013-03-01 17:50   ` Rich Johnston
2013-02-20 10:42 ` [PATCH 09/10] xfstest: add defragmentation stress tests for ext4 Dmitry Monakhov
2013-03-01 19:23   ` Rich Johnston
2013-03-02  1:30     ` Dmitry Monakhov
2013-03-04 23:19       ` Rich Johnston
2013-03-03 16:43   ` Zheng Liu
2013-03-03 17:23     ` Zheng Liu
2013-02-20 10:42 ` [PATCH 10/10] xfstests: add disk failure simulation test Dmitry Monakhov
2013-03-01 20:11   ` Rich Johnston
2013-03-02  1:49     ` Dmitry Monakhov
2013-03-04 23:44       ` Rich Johnston [this message]
2013-02-25 15:45 ` [PATCH 00/10] xfstests: Stress tests improments v5 Theodore Ts'o
2013-02-25 21:28   ` Ben Myers
2013-02-25 22:09     ` Dave Chinner
2013-02-25 23:00       ` Ben Myers
2013-03-01 20:23 ` Rich Johnston

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=513531D0.9080409@sgi.com \
    --to=rjohnston@sgi.com \
    --cc=dchinner@redhat.com \
    --cc=dmonakhov@openvz.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /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).