summaryrefslogtreecommitdiffstats
path: root/perl-install/raid.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-24 11:57:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-24 11:57:17 +0000
commit97c7fd33d60103086d91d8c88e08fb902de45e29 (patch)
treeaa6cfb5ff86cfac393df47d260125bed108ddb82 /perl-install/raid.pm
parent77776f48d599383668a46d93a32b8de91a8b7ea9 (diff)
downloaddrakx-97c7fd33d60103086d91d8c88e08fb902de45e29.tar
drakx-97c7fd33d60103086d91d8c88e08fb902de45e29.tar.gz
drakx-97c7fd33d60103086d91d8c88e08fb902de45e29.tar.bz2
drakx-97c7fd33d60103086d91d8c88e08fb902de45e29.tar.xz
drakx-97c7fd33d60103086d91d8c88e08fb902de45e29.zip
calling inactivate_and_dirty() on a new structure is bad, we loose the {isFormatted} flag
(no big deal though, it happened because raid::new() was creating a new raid with an already active md name)
Diffstat (limited to 'perl-install/raid.pm')
-rw-r--r--perl-install/raid.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/raid.pm b/perl-install/raid.pm
index d52956935..3b66c8c08 100644
--- a/perl-install/raid.pm
+++ b/perl-install/raid.pm
@@ -56,10 +56,11 @@ sub delete {
}
sub change_device {
- my ($md_part, $prev_device) = @_;
- if ($prev_device ne $md_part->{device}) {
- inactivate_and_dirty({ device => $prev_device });
- $_->{raid} = $md_part->{device} foreach @{$md_part->{disks}};
+ my ($md_part, $new_device) = @_;
+ if ($new_device ne $md_part->{device}) {
+ inactivate_and_dirty($md_part);
+ $md_part->{device} = $new_device;
+ $_->{raid} = $new_device foreach @{$md_part->{disks}};
}
}