From: NeilBrown <neilb@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 002 of 4] md: Make 'repair' actually work for raid1.
Date: Tue, 23 Jan 2007 11:26:52 +1100 [thread overview]
Message-ID: <1070123002652.29462@suse.de> (raw)
In-Reply-To: 20070123112437.29357.patches@notabene
When 'repair' finds a block that is different one the various
parts of the mirror. it is meant to write a chosen good version
to the others. However it currently writes out the original data
to each. The memcpy to make all the data the same is missing.
Signed-off-by: Neil Brown <neilb@suse.de>
### Diffstat output
./drivers/md/raid1.c | 5 +++++
1 file changed, 5 insertions(+)
diff .prev/drivers/md/raid1.c ./drivers/md/raid1.c
--- .prev/drivers/md/raid1.c 2007-01-23 11:13:45.000000000 +1100
+++ ./drivers/md/raid1.c 2007-01-23 11:23:43.000000000 +1100
@@ -1221,6 +1221,11 @@ static void sync_request_write(mddev_t *
sbio->bi_sector = r1_bio->sector +
conf->mirrors[i].rdev->data_offset;
sbio->bi_bdev = conf->mirrors[i].rdev->bdev;
+ for (j = 0; j < vcnt ; j++)
+ memcpy(page_address(sbio->bi_io_vec[j].bv_page),
+ page_address(pbio->bi_io_vec[j].bv_page),
+ PAGE_SIZE);
+
}
}
}
next prev parent reply other threads:[~2007-01-23 0:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-23 0:26 [PATCH 000 of 4] md: Introduction - Assorted bugfixes NeilBrown
2007-01-23 0:26 ` [PATCH 001 of 4] md: Update email address and status for MD in MAINTAINERS NeilBrown
2007-01-23 0:26 ` NeilBrown [this message]
2007-01-24 6:57 ` [PATCH 002 of 4] md: Make 'repair' actually work for raid1 Andrew Morton
2007-01-24 7:27 ` Neil Brown
2007-01-23 0:26 ` [PATCH 003 of 4] md: Make sure the events count in an md array never returns to zero NeilBrown
2007-01-23 0:27 ` [PATCH 004 of 4] md: Avoid reading past the end of a bitmap file NeilBrown
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=1070123002652.29462@suse.de \
--to=neilb@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@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;
as well as URLs for NNTP newsgroup(s).