mdmon: fix resync completion detection
Starting with 2.6.30 the md/resync_start attribute will no longer return a non-sensical number when resync is complete, instead it now returns 'none'. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
48924014b0
commit
7e7fffc402
|
@ -74,8 +74,10 @@ int get_resync_start(struct active_array *a)
|
|||
n = read_attr(buf, 30, a->resync_start_fd);
|
||||
if (n <= 0)
|
||||
return n;
|
||||
|
||||
a->resync_start = strtoull(buf, NULL, 10);
|
||||
if (strncmp(buf, "none", 4) == 0)
|
||||
a->resync_start = ~0ULL;
|
||||
else
|
||||
a->resync_start = strtoull(buf, NULL, 10);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue