summaryrefslogtreecommitdiffstats
path: root/Manage.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2004-11-01 04:49:34 +0000
committerNeil Brown <neilb@suse.de>2004-11-01 04:49:34 +0000
commitb5e64645037e99b5f05c9499b27b422ae60d23a9 (patch)
treef0999c8649d1488a367ee3d9442aff538ae366a8 /Manage.c
parente5329c3747a4e9eb7addbfaa59b8d5e8688ce2a1 (diff)
downloadmdadm-b5e64645037e99b5f05c9499b27b422ae60d23a9.tar.gz
mdadm-b5e64645037e99b5f05c9499b27b422ae60d23a9.tar.xz
mdadm-b5e64645037e99b5f05c9499b27b422ae60d23a9.zip
mdadm-1.8.0mdadm-1.8.0
Diffstat (limited to 'Manage.c')
-rw-r--r--Manage.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/Manage.c b/Manage.c
index 624c775..56cc1ad 100644
--- a/Manage.c
+++ b/Manage.c
@@ -134,6 +134,23 @@ int Manage_resize(char *devname, int fd, long long size, int raid_disks)
return 0;
}
+int Manage_reconfig(char *devname, int fd, int layout)
+{
+ mdu_array_info_t info;
+ if (ioctl(fd, GET_ARRAY_INFO, &info) != 0) {
+ fprintf(stderr, Name ": Cannot get array information for %s: %s\n",
+ devname, strerror(errno));
+ return 1;
+ }
+ info.layout = layout;
+ printf("layout set to %d\n", info.layout);
+ if (ioctl(fd, SET_ARRAY_INFO, &info) != 0) {
+ fprintf(stderr, Name ": Cannot set layout for %s: %s\n",
+ devname, strerror(errno));
+ return 1;
+ }
+ return 0;
+}
int Manage_subdevs(char *devname, int fd,
mddev_dev_t devlist)