summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-03-13 05:51:32 +0000
committerNeil Brown <neilb@suse.de>2006-03-13 05:51:32 +0000
commite86c9dd6d847ec57ec400b118efaf2c1808f10bc (patch)
tree6cb0e2d0c2e48d102b08b99d41941ae7f215a90c /util.c
parent8a4440794afbebe6bdc710eefd21c221c9046644 (diff)
downloadmdadm-e86c9dd6d847ec57ec400b118efaf2c1808f10bc.tar.gz
mdadm-e86c9dd6d847ec57ec400b118efaf2c1808f10bc.tar.xz
mdadm-e86c9dd6d847ec57ec400b118efaf2c1808f10bc.zip
Initial reshape support
Needs work for other levels etc. Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'util.c')
-rw-r--r--util.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/util.c b/util.c
index 26254c0..0af4331 100644
--- a/util.c
+++ b/util.c
@@ -676,34 +676,6 @@ struct supertype *guess_super(int fd)
return NULL;
}
-unsigned long long get_component_size(int fd)
-{
- /* Find out the component size of the array.
- * We cannot trust GET_ARRAY_INFO ioctl as it's
- * size field is only 32bits.
- * So look in /sys/block/mdXXX/md/component_size
- */
- struct stat stb;
- char fname[50];
- int n;
- if (fstat(fd, &stb)) return 0;
- if (major(stb.st_rdev) == 9)
- sprintf(fname, "/sys/block/md%d/md/component_size",
- minor(stb.st_rdev));
- else
- sprintf(fname, "/sys/block/md_d%d/md/component_size",
- minor(stb.st_rdev)/16);
- fd = open(fname, O_RDONLY);
- if (fd < 0)
- return 0;
- n = read(fd, fname, sizeof(fname));
- close(fd);
- if (n == sizeof(fname))
- return 0;
- fname[n] = 0;
- return strtoull(fname, NULL, 10);
-}
-
#ifdef __TINYC__
/* tinyc doesn't optimize this check in ioctl.h out ... */