]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Merge branch 'master' into devel-3.2
authorNeilBrown <neilb@suse.de>
Thu, 9 Dec 2010 00:16:42 +0000 (11:16 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 9 Dec 2010 00:16:42 +0000 (11:16 +1100)
Conflicts:
mdadm.8.in

Same conceptual change was written with different words in each version.
Signed-off-by: NeilBrown <neilb@suse.de>
1  2 
mdadm.8.in
super1.c

diff --cc mdadm.8.in
index 8a75e256662f2d4fc144655f5976506913ec542a,00c32dc22286a32119fa6b0e759bea933a5cb870..fed5b62802eaa2351f72f97e29c944f36285179f
@@@ -676,12 -664,27 +680,12 @@@ facts the operator knows
  .BR \-\-backup\-file=
  This is needed when
  .B \-\-grow
- is used to increase the number of
- raid-devices in a RAID5 if there are no spare devices available.
- See the GROW MODE section below on RAID\-DEVICES CHANGES.  The file
- should be stored on a separate device, not on the RAID array being
- reshaped.
+ is used to increase the number of raid-devices in a RAID5 or RAID6 if
+ there are no spare devices available, or to shrink, change RAID level
+ or layout.  See the GROW MODE section below on RAID\-DEVICES CHANGES.
+ The file must be stored on a separate device, not on the RAID array
being reshaped.
  
 -.TP
 -.BR \-\-array-size= ", " \-Z
 -Set the size of the array which is seen by users of the device such as
 -filesystems.  This can be less that the real size, but never greater.
 -The size set this way does not persist across restarts of the array.
 -
 -This is most useful when reducing the number of devices in a RAID5 or
 -RAID6.  Such arrays require the array-size to be reduced before a
 -reshape can be performed that reduces the real size.
 -
 -A value of
 -.B max
 -restores the apparent size of the array to be whatever the real
 -amount of available space is.
 -
  .TP
  .BR \-N ", " \-\-name=
  Set a
@@@ -889,19 -893,9 +893,20 @@@ chunk size) and the system crashed duri
  .B \-\-backup\-file
  must be presented to
  .B \-\-assemble
- to allow possibly corrupted data to be restored.
+ to allow possibly corrupted data to be restored, and the reshape
+ to be completed.
  
 +.TP
 +.BR \-\-invalid\-backup
 +If the file needed for the above option is not available for any
 +reason an empty file can be given together with this option to
 +indicate that the backup file is invalid.  In this case the data that
 +was being rearranged at the time of the crash could be irrecoverably
 +lost, but the rest of the array may still be recoverable.  This option
 +should only be used as a last resort if there is no way to recover the
 +backup file.
 +
 +
  .TP
  .BR \-U ", " \-\-update=
  Update the superblock on each device while assembling the array.  The
diff --cc super1.c
index ee940333c18956a1f35c85f9bc5c6c7d2fb0d076,0eb03230a79fd4b8bf791f2b5057be5ee0db83be..f879e669db79ee1bb3f0376d43bfc850141139fc
+++ b/super1.c
@@@ -691,14 -673,15 +691,14 @@@ static int update_super1(struct superty
                int d = info->disk.number;
                int want;
                if (info->disk.state == 6)
-                       want = __cpu_to_le32(info->disk.raid_disk);
+                       want = info->disk.raid_disk;
                else
                        want = 0xFFFF;
-               if (sb->dev_roles[d] != want) {
-                       sb->dev_roles[d] = want;
+               if (sb->dev_roles[d] != __cpu_to_le16(want)) {
+                       sb->dev_roles[d] = __cpu_to_le16(want);
                        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);