[PATCH 03/31] FIX: allow for execution for new size set to 0

[PATCH 03/31] FIX: allow for execution for new size set to 0

am 09.11.2010 18:00:45 von adam.kwolek

User doesn't change array size during operation on container.
This has to be performed automatically.
When no size is specified by user as expected, 0 size should be passed for container operations and '0' value should be accepted.

Signed-off-by: Adam Kwolek
---

mdadm/mdadm/Grow.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mdadm/mdadm/Grow.c b/mdadm/mdadm/Grow.c index 3721c9c..d97480a 100644
--- a/mdadm/mdadm/Grow.c
+++ b/mdadm/mdadm/Grow.c
@@ -1177,7 +1177,7 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
int count;

/* double check that we are not changing anything but raid_disks */
- if (size >= 0 || layout_str != NULL || chunksize != 0 || level != UnSet) {
+ if (size > 0 || layout_str != NULL || chunksize != 0 || level !=
+UnSet) {
fprintf(stderr,
Name ": %s is a container, only 'raid-devices' can be changed\n",
devname);

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html