From: Takahiro Yasui <tyasui@redhat.com>
To: dm-devel@redhat.com
Subject: Re: [PATCH 7/7] Hold all write bios when errors are handled
Date: Mon, 23 Nov 2009 12:54:47 -0500 [thread overview]
Message-ID: <4B0ACC67.6060805@redhat.com> (raw)
In-Reply-To: <20091123055835.GA28981@us.ibm.com>
On 11/23/09 00:58, malahal@us.ibm.com wrote:
> Mikulas Patocka [mpatocka@redhat.com] wrote:
>> @@ -730,10 +719,25 @@ static void do_failures(struct mirror_se
>> if (!ms->log_failure) {
>> ms->in_sync = 0;
>> dm_rh_mark_nosync(ms->rh, bio);
>> + }
>> + /*
>> + * If all the legs are dead, fail the I/O.
>> + *
>> + * If we are not using dmeventd, we pretend that the I/O
>> + * succeeded. This is wrong (the failed leg might come online
>> + * again after reboot and it would be replicated back to
>> + * the good leg) but it is consistent with current behavior.
>> + * For proper behavior, dm-raid1 shouldn't be used without
>> + * dmeventd at all.
>> + *
>> + * If we use dmeventd, hold the bio until dmeventd does its job.
>> + */
>> + if (!get_valid_mirror(ms))
>> + bio_endio(bio, -EIO);
>> + else if (!errors_handled(ms))
>> bio_endio(bio, 0);
>> - } else {
>> + else
>> hold_bio(ms, bio);
>
> You seem to be holding the I/O that has failed, but what about writes
> that are issued after this failure. They seem to go through just fine.
> Did I miss something? I think do_writes() needs to check for a leg
> failure (just like it does for log_failure already), and put them on
> failure/hold list, right?
On 09/09/09 16:18, Takahiro Yasui wrote:
> - As I mentioned before, bios which are sent to out-of-sync regions also
> need to be blocked because bios to out-of-sync regions are processed by
> generic_make_request() and would return the "success" to upper layer
> without dm-raid1 notices it. This might cause data corruption.
> https://www.redhat.com/archives/dm-devel/2009-July/msg00118.html
I think you are right. I also commented above two months ago, but
I haven't got comments from Mikulas.
> Also, we do need to do the above work only if "primary" leg fails. We
> can continue to work just like the old code if "secondary" legs fail,
> right? Not sure if this is worth optimizing though, but I would like to
> see it implemented as it is just a few extra checks. We can have
> primary_failure field like log_failure field.
Good idea. This data corruption we are talking could happen only if
the primary leg fails. Keeping system running in case of non-primary
legs looks reasonable.
Taka
next prev parent reply other threads:[~2009-11-23 17:54 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-18 12:09 [PATCH 0/7] patches: fix dm-raid1 race, bug 502927 Mikulas Patocka
2009-11-18 12:10 ` [PATCH 1/7] Explicitly initialize bio lists Mikulas Patocka
2009-11-18 12:11 ` [PATCH 2/7] A framework for holding bios until suspend Mikulas Patocka
2009-11-18 12:11 ` [PATCH 3/7] Use the hold framework in do_failures Mikulas Patocka
2009-11-18 12:12 ` [PATCH 4/7] Don't optimize for failure case Mikulas Patocka
2009-11-18 12:13 ` [PATCH 5/7] Move a logic to get a valid mirror leg to a function Mikulas Patocka
2009-11-18 12:18 ` [PATCH 6/7] Move bio completion from dm_rh_mark_nosync to its caller Mikulas Patocka
2009-11-18 12:19 ` [PATCH 7/7] Hold all write bios when errors are handled Mikulas Patocka
2009-11-23 5:58 ` malahal
2009-11-23 17:54 ` Takahiro Yasui [this message]
2009-11-24 11:51 ` Mikulas Patocka
2009-11-24 19:17 ` malahal
2009-11-25 13:19 ` Mikulas Patocka
2009-11-25 15:43 ` Takahiro Yasui
2009-11-25 20:44 ` malahal
2009-11-25 22:50 ` Takahiro Yasui
2009-11-26 17:56 ` Mikulas Patocka
2009-11-26 17:54 ` [PATCH 8/7] Hold all write bios in nosync region Mikulas Patocka
2009-11-25 20:23 ` [PATCH 7/7] Hold all write bios when errors are handled malahal
2009-11-25 22:47 ` Takahiro Yasui
2009-11-25 23:20 ` malahal
2009-11-25 23:50 ` Takahiro Yasui
2009-11-26 0:30 ` malahal
2009-11-26 17:58 ` Mikulas Patocka
2009-11-26 22:22 ` malahal
2009-11-28 18:02 ` [PATCH 2/7] A framework for holding bios until suspend Takahiro Yasui
2009-11-30 2:55 ` malahal
2009-11-30 9:41 ` Alasdair G Kergon
2009-11-30 16:46 ` [PATCH 0/7] patches: fix dm-raid1 race, bug 502927 Takahiro Yasui
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=4B0ACC67.6060805@redhat.com \
--to=tyasui@redhat.com \
--cc=dm-devel@redhat.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 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.