diff options
author | Neil Brown <neilb@suse.de> | 2006-03-20 03:17:31 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-03-20 03:17:31 +0000 |
commit | 353632d927d6e46282ef4f51d4ad17940a30cdf0 (patch) | |
tree | 7257d93e459937f1b5bffa90ea5b2dccd18a2b00 /sysfs.c | |
parent | e86c9dd6d847ec57ec400b118efaf2c1808f10bc (diff) | |
download | mdadm-353632d927d6e46282ef4f51d4ad17940a30cdf0.tar.gz mdadm-353632d927d6e46282ef4f51d4ad17940a30cdf0.tar.xz mdadm-353632d927d6e46282ef4f51d4ad17940a30cdf0.zip |
Support restarting of a reshape on --assemble
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'sysfs.c')
-rw-r--r-- | sysfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -98,6 +98,8 @@ struct sysarray *sysfs_read(int fd, int devnum, unsigned long options) if (load_sys(fname, buf)) goto abort; sra->component_size = strtoull(buf, NULL, 0); + /* sysfs reports "K", but we want sectors */ + sra->component_size *= 2; } if (options & GET_CHUNK) { strcpy(base, "chunk_size"); @@ -192,6 +194,8 @@ unsigned long long get_component_size(int fd) * We cannot trust GET_ARRAY_INFO ioctl as it's * size field is only 32bits. * So look in /sys/block/mdXXX/md/component_size + * + * WARNING: this returns in units of Kilobytes. */ struct stat stb; char fname[50]; |