]> git.ipfire.org Git - thirdparty/grub.git/commit
Increase LVM implementation robustness in order not to crash on
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 3 Apr 2011 14:28:14 +0000 (16:28 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 3 Apr 2011 14:28:14 +0000 (16:28 +0200)
commit850e937329ab9da72cca06efeb1c10ec2e996a42
treeb49df7dc1b592ed61222184620f6301acd2fb09d
parent6f332153941293db9cb28ecb4cbe323f94134d82
Increase LVM implementation robustness in order not to crash on
configurations like pvmove. Previously code assumed that in some places
only lvs or only pvs are used whereas it seems that they are used
interchangeably.

* grub-core/disk/lvm.c (read_node): New function.
(read_lv): Use read_node.
(grub_lvm_scan_device): Use only first mirror on pvmove'd lvs.
Match volumes only at the end when all lvs are found. Take both
pvs (first) and lvs (second) into account.
* include/grub/lvm.h (grub_lvm_segment): Merge fields stripe_* and
mirror_* into node_*. All users updated.
(grub_lvm_stripe): Merge this ...
(grub_lvm_mirror): ... and this ...
(grub_lvm_node): ... into this. All users updated.
ChangeLog
grub-core/disk/lvm.c
include/grub/lvm.h