NeilBrown: Grow: fix problem with validating chunk size
Martin F. Krafft
madduck at alioth.debian.org
Mon May 24 09:21:16 UTC 2010
Module: mdadm
Branch: upstream
Commit: be1cabbd29000fb7f245d0934f3b4c834416b24f
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=be1cabbd29000fb7f245d0934f3b4c834416b24f
Author: NeilBrown <neilb at suse.de>
Date: Tue Mar 9 14:14:39 2010 +1100
Grow: fix problem with validating chunk size
When checking if the new chunk size fit in the component size
we were confusing sectors and K, and so getting it wrong.
Signed-off-by: NeilBrown <neilb at suse.de>
---
Grow.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Grow.c b/Grow.c
index d7d8472..62c67d0 100644
--- a/Grow.c
+++ b/Grow.c
@@ -573,7 +573,7 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
goto release;
}
ioctl(fd, GET_ARRAY_INFO, &array);
- size = get_component_size(fd);
+ size = get_component_size(fd)/2;
if (size == 0)
size = array.size;
if (!quiet)
@@ -581,7 +581,7 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
devname, size);
changed = 1;
} else {
- size = get_component_size(fd);
+ size = get_component_size(fd)/2;
if (size == 0)
size = array.size;
}
More information about the pkg-mdadm-commits
mailing list