]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Merge branch 'master' into devel-3.2
authorNeilBrown <neilb@suse.de>
Tue, 15 Mar 2011 04:35:04 +0000 (15:35 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 15 Mar 2011 04:35:04 +0000 (15:35 +1100)
Conflicts:
Manage.c
managemon.c
super-ddf.c
super-intel.c

1  2 
Manage.c
managemon.c
mdadm.8.in
super-ddf.c

diff --cc Manage.c
Simple merge
diff --cc managemon.c
index 15b6e692efcbcf78a54afc9708db5d528ba742b6,8684e27369aec7c9f44e1c3fe5b975554beb750a..d6c57f78bd28a038d92dcad390272a79fbd82429
@@@ -441,31 -430,12 +441,36 @@@ static void manage_member(struct mdstat
        a->info.array.raid_disks = mdstat->raid_disks;
        // MORE
  
-       if (a->check_degraded && !frozen) {
 +      /* honor 'frozen' */
 +      if (sysfs_get_str(&a->info, NULL, "metadata_version", buf, sizeof(buf)) > 0)
 +              frozen = buf[9] == '-';
 +      else
 +              frozen = 1; /* can't read metadata_version assume the worst */
 +
 +      /* If sync_action is not 'idle' then don't try recovery now */
 +      if (!frozen
 +          && sysfs_get_str(&a->info, NULL, "sync_action", buf, sizeof(buf)) > 0
 +          && strncmp(buf, "idle", 4) != 0)
 +              frozen = 1;
 +
 +      if (mdstat->level) {
 +              int level = map_name(pers, mdstat->level);
 +              if (a->info.array.level != level && level >= 0) {
 +                      struct active_array *newa = duplicate_aa(a);
 +                      if (newa) {
 +                              newa->info.array.level = level;
 +                              replace_array(a->container, a, newa);
 +                              a = newa;
 +                      }
 +              }
 +      }
 +
 -       * might container a change (such as a spare assignment) which 
+       /* We don't check the array while any update is pending, as it
 -      if (a->check_degraded &&
++       * might container a change (such as a spare assignment) which
+        * could affect our decisions.
+        */
++      if (a->check_degraded && !frozen &&
+           update_queue == NULL && update_queue_pending == NULL) {
                struct metadata_update *updates = NULL;
                struct mdinfo *newdev = NULL;
                struct active_array *newa;
diff --cc mdadm.8.in
index d99bc05dbdcc9c5818da1cdcee1391e0f791cbd2,05ae34f66177010707a6ea98e8f0f76c0b311d8a..4b70e2050354fa0494e03b3d54482f42299c38c5
@@@ -2240,8 -2158,12 +2240,12 @@@ space to start being used.  If the siz
  are synchronised.
  
  Note that when an array changes size, any filesystem that may be
- stored in the array will not automatically grow to use the space.  The
- filesystem will need to be explicitly told to use the extra space.
+ stored in the array will not automatically grow for shrink to use or
 -vacate the space.  The 
++vacate the space.  The
+ filesystem will need to be explicitly told to use the extra space
+ after growing, or to reduce its size
+ .B prior
+ to shrinking the array.
  
  Also the size of an array cannot be changed while it has an active
  bitmap.  If an array has a bitmap, it must be removed before the size
@@@ -2269,19 -2191,10 +2273,20 @@@ increase the number of devices in a RAI
  an interrupted "reshape".  From 2.6.31, the Linux Kernel is able to
  increase or decrease the number of devices in a RAID5 or RAID6.
  
 +From 2.6.35, the Linux Kernel is able to convert a RAID0 in to a RAID4
 +or RAID5.
 +.I mdadm
 +uses this functionality and the ability to add
 +devices to a RAID4 to allow devices to be added to a RAID0.  When
 +requested to do this,
 +.I mdadm
 +will convert the RAID0 to a RAID4, add the necessary disks and make
 +the reshape happen, and then convert the RAID4 back to RAID0.
 +
  When decreasing the number of devices, the size of the array will also
  decrease.  If there was data in the array, it could get destroyed and
- this is not reversible.  To help prevent accidents,
+ this is not reversible, so you should firstly shrink the filesystem on
+ the array to fit within the new size.  To help prevent accidents,
  .I mdadm
  requires that the size of the array be decreased first with
  .BR "mdadm --grow --array-size" .
diff --cc super-ddf.c
Simple merge