diff options
author | NeilBrown <neilb@suse.de> | 2011-03-10 07:37:04 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-03-10 07:37:04 +0100 |
commit | ca6529edf6f7216003863a9ea847e6689693bd96 (patch) | |
tree | ed3091b74e94cfec89134b9ed6701fc1c4e8a69e | |
parent | Man page updates for new --grow options. (diff) | |
parent | Manage: be more careful about --add attempts. (diff) | |
download | mdadm-ca6529edf6f7216003863a9ea847e6689693bd96.tar.xz mdadm-ca6529edf6f7216003863a9ea847e6689693bd96.zip |
Merge branch 'master' into devel-3.2
Conflicts:
Grow.c
Manage.c
managemon.c
mdadm.8.in
util.c
-rw-r--r-- | ReadMe.c | 6 | ||||
-rw-r--r-- | super-ddf.c | 9 | ||||
-rw-r--r-- | super0.c | 14 | ||||
-rw-r--r-- | super1.c | 14 |
4 files changed, 38 insertions, 5 deletions
@@ -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. */ -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[]= - "-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[]= - "-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[] = { {"manage", 0, 0, ManageOpt}, diff --git a/super-ddf.c b/super-ddf.c index 41ff0053..41f5264e 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -2972,18 +2972,23 @@ static struct mdinfo *container_content_ddf(struct supertype *st, char *subarray for (i = 0 ; i < ddf->mppe ; i++) { struct mdinfo *dev; struct dl *d; + int stt; if (vc->conf.phys_refnum[i] == 0xFFFFFFFF) continue; - this->array.working_disks++; - for (d = ddf->dlist; d ; d=d->next) if (d->disk.refnum == vc->conf.phys_refnum[i]) break; if (d == NULL) /* Haven't found that one yet, maybe there are others */ 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)); memset(dev, 0, sizeof(*dev)); @@ -503,6 +503,20 @@ static int update_super0(struct supertype *st, struct mdinfo *info, sb->disks[d].state = info->disk.state | wonly; 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) { memset(&sb->disks[info->disk.number], 0, sizeof(sb->disks[0])); sb->disks[info->disk.number].number = info->disk.number; @@ -698,6 +698,20 @@ static int update_super1(struct supertype *st, struct mdinfo *info, sb->dev_roles[d] = __cpu_to_le16(want); 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) { unsigned int i; int rfd, fd; |