diff options
author | Neil Brown <neilb@suse.de> | 2004-11-01 04:49:34 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2004-11-01 04:49:34 +0000 |
commit | b5e64645037e99b5f05c9499b27b422ae60d23a9 (patch) | |
tree | f0999c8649d1488a367ee3d9442aff538ae366a8 /Manage.c | |
parent | e5329c3747a4e9eb7addbfaa59b8d5e8688ce2a1 (diff) | |
download | mdadm-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.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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) |