From: NeilBrown Date: Thu, 10 Mar 2011 06:37:04 +0000 (+1100) Subject: Merge branch 'master' into devel-3.2 X-Git-Tag: mdadm-3.2.1~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca6529edf6f7216003863a9ea847e6689693bd96;p=thirdparty%2Fmdadm.git Merge branch 'master' into devel-3.2 Conflicts: Grow.c Manage.c managemon.c mdadm.8.in util.c --- ca6529edf6f7216003863a9ea847e6689693bd96 diff --cc ReadMe.c index fb778ec2,e1f8c686..90cab871 --- a/ReadMe.c +++ b/ReadMe.c @@@ -86,15 -86,15 +86,15 @@@ char Version[] = Name " - v3.2 DEVELOPE * 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, '@'}, - {"misc", 0, 0, '#'}, + {"manage", 0, 0, ManageOpt}, + {"misc", 0, 0, MiscOpt}, {"assemble", 0, 0, 'A'}, {"build", 0, 0, 'B'}, {"create", 0, 0, 'C'}, diff --cc super0.c index 4f7110d0,e8555413..3ae236a8 --- a/super0.c +++ b/super0.c @@@ -503,7 -492,22 +503,21 @@@ static int update_super0(struct superty 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; + } - } - 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])); sb->disks[info->disk.number].number = info->disk.number; sb->disks[info->disk.number].major = info->disk.major; diff --cc super1.c index 9299322f,457e2d6e..79bb4d0c --- a/super1.c +++ b/super1.c @@@ -698,7 -681,22 +698,21 @@@ static int update_super1(struct superty 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; + } - } - if (strcmp(update, "linear-grow-new") == 0) { + } else if (strcmp(update, "linear-grow-new") == 0) { unsigned int i; int rfd, fd; unsigned int max = __le32_to_cpu(sb->max_dev);