Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 293321 Details for
Bug 429747
[Stratus 5.2 bug] md resync "repair" functionality is broken
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Upstream commits
raid1-check.patch (text/plain), 4.26 KB, created by
Doug Ledford
on 2008-01-29 19:40:39 UTC
(
hide
)
Description:
Upstream commits
Filename:
MIME Type:
Creator:
Doug Ledford
Created:
2008-01-29 19:40:39 UTC
Size:
4.26 KB
patch
obsolete
>commit 3eda22d19b76b15ef3420b251bd47a0ba0127589 >Author: NeilBrown <neilb@suse.de> >Date: Fri Jan 26 00:57:01 2007 -0800 > > [PATCH] md: make 'repair' actually work for raid1 > > 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> > Signed-off-by: Andrew Morton <akpm@osdl.org> > Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> > >diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c >index 164b25d..ab74d40 100644 >--- a/drivers/md/raid1.c >+++ b/drivers/md/raid1.c >@@ -1266,6 +1266,11 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio) > 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); >+ > } > } > } >commit ed45666271f4fafa95b9d8ad44050e9a9bd2376e >Author: Mike Accetta <maccetta@laurelnetworks.com> >Date: Sat Jun 16 10:16:07 2007 -0700 > > md: fix bug in error handling during raid1 repair > > If raid1/repair (which reads all block and fixes any differences it finds) > hits a read error, it doesn't reset the bio for writing before writing > correct data back, so the read error isn't fixed, and the device probably > gets a zero-length write which it might complain about. > > Signed-off-by: Neil Brown <neilb@suse.de> > Cc: <stable@kernel.org> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org> > Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> > >diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c >index 3a95cc5..46677d7 100644 >--- a/drivers/md/raid1.c >+++ b/drivers/md/raid1.c >@@ -1240,17 +1240,24 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio) > } > r1_bio->read_disk = primary; > for (i=0; i<mddev->raid_disks; i++) >- if (r1_bio->bios[i]->bi_end_io == end_sync_read && >- test_bit(BIO_UPTODATE, &r1_bio->bios[i]->bi_flags)) { >+ if (r1_bio->bios[i]->bi_end_io == end_sync_read) { > int j; > int vcnt = r1_bio->sectors >> (PAGE_SHIFT- 9); > struct bio *pbio = r1_bio->bios[primary]; > struct bio *sbio = r1_bio->bios[i]; >- for (j = vcnt; j-- ; ) >- if (memcmp(page_address(pbio->bi_io_vec[j].bv_page), >- page_address(sbio->bi_io_vec[j].bv_page), >- PAGE_SIZE)) >- break; >+ >+ if (test_bit(BIO_UPTODATE, &sbio->bi_flags)) { >+ for (j = vcnt; j-- ; ) { >+ struct page *p, *s; >+ p = pbio->bi_io_vec[j].bv_page; >+ s = sbio->bi_io_vec[j].bv_page; >+ if (memcmp(page_address(p), >+ page_address(s), >+ PAGE_SIZE)) >+ break; >+ } >+ } else >+ j = 0; > if (j >= 0) > mddev->resync_mismatches += r1_bio->sectors; > if (j < 0 || test_bit(MD_RECOVERY_CHECK, &mddev->recovery)) { >commit cf7a44168d743ca97863b7f34ed42a45fd7b5ab0 >Author: NeilBrown <neilb@suse.de> >Date: Tue Oct 16 23:30:55 2007 -0700 > > md: make sure read errors are auto-corrected during a 'check' resync in raid1 > > Whenever a read error is found, we should attempt to overwrite with correct > data to 'fix' it. > > However when do a 'check' pass (which compares data blocks that are > successfully read, but doesn't normally overwrite) we don't do that. We > should. > > Signed-off-by: Neil Brown <neilb@suse.de> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org> > Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> > >diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c >index 0bcefad..16775a0 100644 >--- a/drivers/md/raid1.c >+++ b/drivers/md/raid1.c >@@ -1214,7 +1214,8 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio) > j = 0; > if (j >= 0) > mddev->resync_mismatches += r1_bio->sectors; >- if (j < 0 || test_bit(MD_RECOVERY_CHECK, &mddev->recovery)) { >+ if (j < 0 || (test_bit(MD_RECOVERY_CHECK, &mddev->recovery) >+ && test_bit(BIO_UPTODATE, &sbio->bi_flags))) { > sbio->bi_end_io = NULL; > rdev_dec_pending(conf->mirrors[i].rdev, mddev); > } else {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 429747
: 293321