]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Merge branch 'master' into devel-3.2
authorNeilBrown <neilb@suse.de>
Thu, 10 Mar 2011 06:37:04 +0000 (17:37 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 10 Mar 2011 06:37:04 +0000 (17:37 +1100)
Conflicts:
Grow.c
Manage.c
managemon.c
mdadm.8.in
util.c

1  2 
ReadMe.c
super-ddf.c
super0.c
super1.c

diff --cc ReadMe.c
index fb778ec2d52a3886616be9bfa7179b97e9ed449d,e1f8c6867851ed532ef483c386736261d85698c7..90cab8713058583299ef2a517e1f4b6e8e3ac8e3
+++ 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 super-ddf.c
Simple merge
diff --cc super0.c
index 4f7110d08a0de28324ae4ed0af864d718d2f9c29,e855541369e797db7a420c2000bdf27c65a71229..3ae236a82d57b9d8fd7efff4a96b7e5d1d6e3ba8
+++ 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 (strcmp(update, "linear-grow-new") == 0) {
+               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;
                sb->disks[info->disk.number].major = info->disk.major;
diff --cc super1.c
index 9299322fff9c4844a440c5619059619b1ceb51df,457e2d6e0f034b45deca157486ca40f7c878160b..79bb4d0cdcaf10c2dd95840e283e4f06eb7983af
+++ 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 (strcmp(update, "linear-grow-new") == 0) {
+               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;
                unsigned int max = __le32_to_cpu(sb->max_dev);