From: "Mike Snitzer" <snitzer@gmail.com>
To: "Neil Brown" <neilb@suse.de>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
paul.clements@steeleye.com
Subject: Re: [RFC][PATCH] md: avoid fullsync if a faulty member missed a dirty transition
Date: Mon, 19 May 2008 00:33:58 -0400 [thread overview]
Message-ID: <170fa0d20805182133o46501cc4va81b087fb6b417bf@mail.gmail.com> (raw)
In-Reply-To: <18477.30199.992302.271647@notabene.brown>
On Fri, May 16, 2008 at 7:54 AM, Neil Brown <neilb@suse.de> wrote:
> On Friday May 9, snitzer@gmail.com wrote:
>> On Fri, May 9, 2008 at 2:01 AM, Neil Brown <neilb@suse.de> wrote:
>> >
>> > On Friday May 9, snitzer@gmail.com wrote:
>>
>> > > Unfortunately my testing with this patch results in a full resync.
...
>> > diff .prev/drivers/md/bitmap.c ./drivers/md/bitmap.c
>> > --- .prev/drivers/md/bitmap.c 2008-05-09 11:02:13.000000000 +1000
>> > +++ ./drivers/md/bitmap.c 2008-05-09 16:00:07.000000000 +1000
>> >
>> > @@ -465,8 +465,6 @@ void bitmap_update_sb(struct bitmap *bit
>> > spin_unlock_irqrestore(&bitmap->lock, flags);
>> > sb = (bitmap_super_t *)kmap_atomic(bitmap->sb_page, KM_USER0);
>> > sb->events = cpu_to_le64(bitmap->mddev->events);
>> > - if (!bitmap->mddev->degraded)
>> > - sb->events_cleared = cpu_to_le64(bitmap->mddev->events);
>>
>> Before, events_cleared was _not_ updated if the array was degraded.
>> Your patch doesn't appear to maintain that design.
>
> It does, but it is well hidden.
> Bits in the bitmap are only cleared when the array is not degraded.
> The new code for updating events_cleared is only triggered when a bit
> is about to be cleared.
Hi Neil,
Sorry about not getting back with you sooner. Thanks for putting
significant time to chasing this problem.
I tested your most recent patch and unfortunately still hit the case
where the nbd member becomes degraded yet the array continues to clear
bits (events_cleared of the non-degraded member is higher than the
degraded member). Is this behavior somehow expected/correct?
This was the state of the array after the nbd0 member became degraded
and the array was stopped:
# mdadm -X /dev/nbd0 /dev/sdq
Filename : /dev/nbd0
Magic : 6d746962
Version : 4
UUID : 7140cc3c:8681416c:12c5668a:984ca55d
Events : 2642
Events Cleared : 2642
State : OK
Chunksize : 128 KB
Daemon : 5s flush period
Write Mode : Normal
Sync Size : 52428736 (50.00 GiB 53.69 GB)
Bitmap : 409600 bits (chunks), 1 dirty (0.0%)
Filename : /dev/sdq
Magic : 6d746962
Version : 4
UUID : 7140cc3c:8681416c:12c5668a:984ca55d
Events : 2646
Events Cleared : 2645
State : OK
Chunksize : 128 KB
Daemon : 5s flush period
Write Mode : Normal
Sync Size : 52428736 (50.00 GiB 53.69 GB)
Bitmap : 409600 bits (chunks), 1 dirty (0.0%)
At the time the nbd0 member became degraded events_cleared was 2642.
What I'm failing to understand is how sdq's events_cleared could be
allowed to increment higher than 2642?
I've not yet taken steps to understand/verify your test script. As
such I'm not sure it models my test scenario yet.
Mike
next prev parent reply other threads:[~2008-05-19 4:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-02 22:09 Mike Snitzer
2008-05-06 6:53 ` Neil Brown
2008-05-06 11:58 ` Mike Snitzer
2008-05-08 6:13 ` Neil Brown
2008-05-08 20:11 ` Mike Snitzer
2008-05-09 1:40 ` Neil Brown
2008-05-09 4:42 ` Mike Snitzer
2008-05-09 5:08 ` Mike Snitzer
2008-05-09 5:26 ` Mike Snitzer
2008-05-09 6:01 ` Neil Brown
2008-05-09 15:00 ` Mike Snitzer
2008-05-16 11:54 ` Neil Brown
2008-05-19 4:33 ` Mike Snitzer [this message]
2008-05-19 5:27 ` Neil Brown
2008-05-20 15:30 ` Mike Snitzer
2008-05-20 15:33 ` Mike Snitzer
2008-05-27 6:56 ` Neil Brown
2008-05-27 14:33 ` Mike Snitzer
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=170fa0d20805182133o46501cc4va81b087fb6b417bf@mail.gmail.com \
--to=snitzer@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--cc=paul.clements@steeleye.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
all inboxes | Powered by JetHome®