From: Jonathan Brassow <jbrassow@redhat.com>
To: dm-devel@redhat.com, linux-raid@vger.kernel.org
Cc: neilb@suse.de, agk@redhat.com
Subject: [PATCH 5 of 5] MD RAID1: Further conditionalize 'fullsync'
Date: Tue, 17 Apr 2012 21:43:51 -0500 [thread overview]
Message-ID: <1334717031.23908.28.camel@f14.redhat.com> (raw)
In-Reply-To: <1334716219.23908.14.camel@f14.redhat.com>
A RAID1 device does not necessarily need a fullsync if the bitmap can be used instead.
Similar to commit d6b212f4b19da5301e6b6eca562e5c7a2a6e8c8d in raid5.c, if a raid1
device can be brought back (i.e. from a transient failure) it shouldn't need a
complete resync. Provided the bitmap is not to old, it will have recorded the areas
of the disk that need recovery.
** I've used 'saved_raid_disk' here similar to RAID5, but it doesn't seem to fit
as well. The positions aren't really as important as they are in RAID5, and
I'm using the 'saved_raid_disk' as more of an indicator that it can use the
bitmap, rather than for any other purpose. Perhaps the meaning is being
overloaded and a different solution should be found?
RFC-by: Jonathan Brassow <jbrassow@redhat.com>
Index: linux-upstream/drivers/md/raid1.c
===================================================================
--- linux-upstream.orig/drivers/md/raid1.c
+++ linux-upstream/drivers/md/raid1.c
@@ -2597,7 +2597,8 @@ static struct r1conf *setup_conf(struct
if (!disk->rdev ||
!test_bit(In_sync, &disk->rdev->flags)) {
disk->head_position = 0;
- if (disk->rdev)
+ if (disk->rdev &&
+ (disk->rdev->saved_raid_disk != disk->rdev->raid_disk))
conf->fullsync = 1;
} else if (conf->last_used < 0)
/*
next prev parent reply other threads:[~2012-04-18 2:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 2:30 [PATCH 0 of 4] dm-raid: various bug fixes Jonathan Brassow
2012-04-18 2:36 ` [PATCH 1 of 5] DM RAID: Set recovery flags on resume Jonathan Brassow
2012-04-18 2:37 ` [PATCH 2 of 5] DM RAID: Record and handle missing devices Jonathan Brassow
2012-04-18 2:38 ` [PATCH 3 of 5] DM RAID: Use safe version of rdev_for_each Jonathan Brassow
2012-04-18 2:41 ` [PATCH 4 of 5] DM RAID: Use md_error() in place of simply setting Faulty bit Jonathan Brassow
2012-04-18 2:43 ` Jonathan Brassow [this message]
2012-04-18 3:48 ` [PATCH 0 of 4] dm-raid: various bug fixes NeilBrown
2012-04-18 14:05 ` Brassow Jonathan
2012-04-18 21:32 ` Brassow Jonathan
2012-04-18 23:58 ` [dm-devel] " NeilBrown
2012-04-19 2:42 ` Brassow Jonathan
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=1334717031.23908.28.camel@f14.redhat.com \
--to=jbrassow@redhat.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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).