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>
n = read_attr(buf, 30, a->resync_start_fd);
if (n <= 0)
return n;
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);