Merge branch 'master' into devel-3.2
Conflicts: Grow.c Manage.c managemon.c mdadm.8.in util.c
This commit is contained in:
commit
ca6529edf6
6
ReadMe.c
6
ReadMe.c
|
@ -86,11 +86,11 @@ char Version[] = Name " - v3.2 DEVELOPER_ONLY - 1st February 2011 (USE WITH CARE
|
||||||
* At the time if writing, there is only minimal support.
|
* At the time if writing, there is only minimal support.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char short_options[]="-ABCDEFGIQhVXWZ:vqbc:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:";
|
char short_options[]="-ABCDEFGIQhVXYWZ:vqbc:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:";
|
||||||
char short_bitmap_options[]=
|
char short_bitmap_options[]=
|
||||||
"-ABCDEFGIQhVXWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:";
|
"-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:";
|
||||||
char short_bitmap_auto_options[]=
|
char short_bitmap_auto_options[]=
|
||||||
"-ABCDEFGIQhVXWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sa:rfRSow1tye:";
|
"-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sa:rfRSow1tye:";
|
||||||
|
|
||||||
struct option long_options[] = {
|
struct option long_options[] = {
|
||||||
{"manage", 0, 0, ManageOpt},
|
{"manage", 0, 0, ManageOpt},
|
||||||
|
|
|
@ -2972,18 +2972,23 @@ static struct mdinfo *container_content_ddf(struct supertype *st, char *subarray
|
||||||
for (i = 0 ; i < ddf->mppe ; i++) {
|
for (i = 0 ; i < ddf->mppe ; i++) {
|
||||||
struct mdinfo *dev;
|
struct mdinfo *dev;
|
||||||
struct dl *d;
|
struct dl *d;
|
||||||
|
int stt;
|
||||||
|
|
||||||
if (vc->conf.phys_refnum[i] == 0xFFFFFFFF)
|
if (vc->conf.phys_refnum[i] == 0xFFFFFFFF)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
this->array.working_disks++;
|
|
||||||
|
|
||||||
for (d = ddf->dlist; d ; d=d->next)
|
for (d = ddf->dlist; d ; d=d->next)
|
||||||
if (d->disk.refnum == vc->conf.phys_refnum[i])
|
if (d->disk.refnum == vc->conf.phys_refnum[i])
|
||||||
break;
|
break;
|
||||||
if (d == NULL)
|
if (d == NULL)
|
||||||
/* Haven't found that one yet, maybe there are others */
|
/* Haven't found that one yet, maybe there are others */
|
||||||
continue;
|
continue;
|
||||||
|
stt = __be16_to_cpu(ddf->phys->entries[d->pdnum].state);
|
||||||
|
if ((stt & (DDF_Online|DDF_Failed|DDF_Rebuilding))
|
||||||
|
!= DDF_Online)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
this->array.working_disks++;
|
||||||
|
|
||||||
dev = malloc(sizeof(*dev));
|
dev = malloc(sizeof(*dev));
|
||||||
memset(dev, 0, sizeof(*dev));
|
memset(dev, 0, sizeof(*dev));
|
||||||
|
|
14
super0.c
14
super0.c
|
@ -503,6 +503,20 @@ static int update_super0(struct supertype *st, struct mdinfo *info,
|
||||||
sb->disks[d].state = info->disk.state | wonly;
|
sb->disks[d].state = info->disk.state | wonly;
|
||||||
rv = 1;
|
rv = 1;
|
||||||
}
|
}
|
||||||
|
if (info->reshape_active &&
|
||||||
|
sb->minor_version > 90 && (sb->reshape_position+1) != 0 &&
|
||||||
|
info->delta_disks >= 0 &&
|
||||||
|
info->reshape_progress < sb->reshape_position) {
|
||||||
|
sb->reshape_position = info->reshape_progress;
|
||||||
|
rv = 1;
|
||||||
|
}
|
||||||
|
if (info->reshape_active &&
|
||||||
|
sb->minor_version > 90 && (sb->reshape_position+1) != 0 &&
|
||||||
|
info->delta_disks < 0 &&
|
||||||
|
info->reshape_progress > sb->reshape_position) {
|
||||||
|
sb->reshape_position = info->reshape_progress;
|
||||||
|
rv = 1;
|
||||||
|
}
|
||||||
} else if (strcmp(update, "linear-grow-new") == 0) {
|
} else if (strcmp(update, "linear-grow-new") == 0) {
|
||||||
memset(&sb->disks[info->disk.number], 0, sizeof(sb->disks[0]));
|
memset(&sb->disks[info->disk.number], 0, sizeof(sb->disks[0]));
|
||||||
sb->disks[info->disk.number].number = info->disk.number;
|
sb->disks[info->disk.number].number = info->disk.number;
|
||||||
|
|
14
super1.c
14
super1.c
|
@ -698,6 +698,20 @@ static int update_super1(struct supertype *st, struct mdinfo *info,
|
||||||
sb->dev_roles[d] = __cpu_to_le16(want);
|
sb->dev_roles[d] = __cpu_to_le16(want);
|
||||||
rv = 1;
|
rv = 1;
|
||||||
}
|
}
|
||||||
|
if (info->reshape_active &&
|
||||||
|
sb->feature_map & __le32_to_cpu(MD_FEATURE_RESHAPE_ACTIVE) &&
|
||||||
|
info->delta_disks >= 0 &&
|
||||||
|
info->reshape_progress < __le64_to_cpu(sb->reshape_position)) {
|
||||||
|
sb->reshape_position = __cpu_to_le64(info->reshape_progress);
|
||||||
|
rv = 1;
|
||||||
|
}
|
||||||
|
if (info->reshape_active &&
|
||||||
|
sb->feature_map & __le32_to_cpu(MD_FEATURE_RESHAPE_ACTIVE) &&
|
||||||
|
info->delta_disks < 0 &&
|
||||||
|
info->reshape_progress > __le64_to_cpu(sb->reshape_position)) {
|
||||||
|
sb->reshape_position = __cpu_to_le64(info->reshape_progress);
|
||||||
|
rv = 1;
|
||||||
|
}
|
||||||
} else if (strcmp(update, "linear-grow-new") == 0) {
|
} else if (strcmp(update, "linear-grow-new") == 0) {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int rfd, fd;
|
int rfd, fd;
|
||||||
|
|
Loading…
Reference in New Issue