From: NeilBrown Date: Wed, 22 Jun 2005 00:17:24 +0000 (-0700) Subject: [PATCH] md: initialise sync_blocks in raid1 resync X-Git-Tag: v2.6.13-rc4~130^2~202^2~8 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=289e99e8ed8f36e386bf7de49947311c17ae1482;p=~shefty%2Frdma-dev.git [PATCH] md: initialise sync_blocks in raid1 resync Otherwise it could have a random value and might BUG. This fixes a BUG during resync problem in raid1 introduced by the bitmap-based-intent-loggin patches. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 9d9acc3e51a..c3b4772cfae 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -1230,6 +1230,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i } nr_sectors = 0; + sync_blocks = 0; do { struct page *page; int len = PAGE_SIZE;