9 Feb 10:09
[PATCH] FIX: Add missed '0' case for reshape position verification
Adam Kwolek <adam.kwolek <at> intel.com>
2012-02-09 09:09:03 GMT
2012-02-09 09:09:03 GMT
Reading sysfs entry that is '0' long should cause an error.
Reshape position cannot be empty.
Absence of reshape position should be ignored. It is possible
that we are about raid0 reshape continuation and it is before takeover.
This means that according metadata (changed by mdmon) it should be reshaped
but md knows nothing about it at this moment. Reshape continuation
in reshape_array() will change it to raid4 and reshape position appears
in sysfs.
Signed-off-by: Adam Kwolek <adam.kwolek <at> intel.com>
---
Grow.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Grow.c b/Grow.c
index e295a5f..1da5ea3 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1874,11 +1874,14 @@ release:
*/
static int verify_reshape_position(struct mdinfo *info, int level)
{
- int ret_val = 0;
+ int ret_val;
char buf[40];
+ int rv;
/* read sync_max, failure can mean raid0 array */
(Continue reading)
RSS Feed