[Fai-commit] r5380 - people/michael/experimental/patches

Michael Tautschnig mt at alioth.debian.org
Tue Apr 28 11:01:03 UTC 2009


Author: mt
Date: 2009-04-28 11:01:03 +0000 (Tue, 28 Apr 2009)
New Revision: 5380

Added:
   people/michael/experimental/patches/setup-storage_raid-preserve-entry-missing
Modified:
   people/michael/experimental/patches/series
Log:
Added patch to ensure that preserves properly works together with RAID (I think,
nobody ever has yet tested/used that)


Modified: people/michael/experimental/patches/series
===================================================================
--- people/michael/experimental/patches/series	2009-04-28 08:29:39 UTC (rev 5379)
+++ people/michael/experimental/patches/series	2009-04-28 11:01:03 UTC (rev 5380)
@@ -10,3 +10,4 @@
 bugfix-524347
 setup-storage_missing-raid-devs
 bugfix-515704
+setup-storage_raid-preserve-entry-missing

Added: people/michael/experimental/patches/setup-storage_raid-preserve-entry-missing
===================================================================
--- people/michael/experimental/patches/setup-storage_raid-preserve-entry-missing	                        (rev 0)
+++ people/michael/experimental/patches/setup-storage_raid-preserve-entry-missing	2009-04-28 11:01:03 UTC (rev 5380)
@@ -0,0 +1,21 @@
+2009-04-28  Michael Tautschnig  <mt at debian.org>
+
+	* setup-storage/Parser.pm: Ensure that RAID volumes marked preserve don't
+		count as extra RAID volumes being defined.
+Index: trunk/lib/setup-storage/Parser.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Parser.pm
++++ trunk/lib/setup-storage/Parser.pm	
+@@ -465,7 +465,11 @@
+           # initialise RAID entry, if it doesn't exist already
+           defined ($FAI::configs{RAID}) or $FAI::configs{RAID}{volumes} = {};
+           # compute the next available index - the size of the entry
+-          my $vol_id = scalar (keys %{ $FAI::configs{RAID}{volumes} });
++          my $vol_id = 0;
++          foreach my $ex_vol_id (&numsort(keys %{ $FAI::configs{RAID}{volumes} })) {
++            defined ($FAI::configs{RAID}{volumes}{$ex_vol_id}{mode}) or last;
++            $vol_id++;
++          }
+           # set the RAID type of this volume
+           $FAI::configs{RAID}{volumes}{$vol_id}{mode} = $1;
+           # initialise the hash of devices




More information about the Fai-commit mailing list