summaryrefslogtreecommitdiffstats
path: root/sysfs.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-10-04 08:34:21 +0200
committerNeilBrown <neilb@suse.de>2012-10-04 08:34:21 +0200
commitfe384ca0b90e4e8e18f705aacbf031ea76d9c604 (patch)
tree34aef8ba5528327e3f0909162ed934332b21a80f /sysfs.c
parentAdd space_before/space_after fields to mdinfo (diff)
downloadmdadm-fe384ca0b90e4e8e18f705aacbf031ea76d9c604.tar.xz
mdadm-fe384ca0b90e4e8e18f705aacbf031ea76d9c604.zip
Grow: set new_data_offset if appropriate
Diffstat (limited to '')
-rw-r--r--sysfs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysfs.c b/sysfs.c
index 47294556..a7ff38a4 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -302,6 +302,11 @@ struct mdinfo *sysfs_read(int fd, int devnum, unsigned long options)
if (load_sys(fname, buf))
goto abort;
dev->data_offset = strtoull(buf, NULL, 0);
+ strcpy(dbase, "new_offset");
+ if (load_sys(fname, buf) == 0)
+ dev->new_data_offset = strtoull(buf, NULL, 0);
+ else
+ dev->new_data_offset = dev->data_offset;
}
if (options & GET_SIZE) {
strcpy(dbase, "size");