tree 2db30198606683da3b683cabac531d902a249b27
parent b38817dda45bc2990a8d593f3a1b4d444b2dcf4f
author NeilBrown <[EMAIL PROTECTED]> Thu, 28 Jul 2005 01:43:28 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Thu, 28 Jul 2005 06:25:48 -0700

[PATCH] md: when resizing an array, we need to update resync_max_sectors as 
well as size

Without this, and attempt to 'grow' an array will claim to have synced the
extra part without actually having done anything.

Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 drivers/md/raid1.c     |    1 +
 drivers/md/raid5.c     |    1 +
 drivers/md/raid6main.c |    1 +
 3 files changed, 3 insertions(+)

diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1468,6 +1468,7 @@ static int raid1_resize(mddev_t *mddev, 
                set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
        }
        mddev->size = mddev->array_size;
+       mddev->resync_max_sectors = sectors;
        return 0;
 }
 
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1931,6 +1931,7 @@ static int raid5_resize(mddev_t *mddev, 
                set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
        }
        mddev->size = sectors /2;
+       mddev->resync_max_sectors = sectors;
        return 0;
 }
 
diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c
--- a/drivers/md/raid6main.c
+++ b/drivers/md/raid6main.c
@@ -2095,6 +2095,7 @@ static int raid6_resize(mddev_t *mddev, 
                set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
        }
        mddev->size = sectors /2;
+       mddev->resync_max_sectors = sectors;
        return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to