mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Cope with a PV only discovered missing when creating deptree.
This commit is contained in:
parent
86b15c7c90
commit
f5f3defc02
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.86 -
|
Version 2.02.86 -
|
||||||
=================================
|
=================================
|
||||||
|
Cope with a PV only discovered missing when creating deptree.
|
||||||
Abort operation if dm_tree_node_add_target_area fails.
|
Abort operation if dm_tree_node_add_target_area fails.
|
||||||
Add activation/checks to lvm.conf to perform additional ioctl validation.
|
Add activation/checks to lvm.conf to perform additional ioctl validation.
|
||||||
When suspending, automatically preload newly-visible existing LVs.
|
When suspending, automatically preload newly-visible existing LVs.
|
||||||
|
@ -1194,13 +1194,21 @@ int add_areas_line(struct dev_manager *dm, struct lv_segment *seg,
|
|||||||
uint64_t extent_size = seg->lv->vg->extent_size;
|
uint64_t extent_size = seg->lv->vg->extent_size;
|
||||||
uint32_t s;
|
uint32_t s;
|
||||||
char *dlid;
|
char *dlid;
|
||||||
|
struct stat info;
|
||||||
|
const char *name;
|
||||||
|
|
||||||
|
/* FIXME Avoid repeating identical stat in dm_tree_node_add_target_area */
|
||||||
for (s = start_area; s < areas; s++) {
|
for (s = start_area; s < areas; s++) {
|
||||||
if ((seg_type(seg, s) == AREA_PV &&
|
if ((seg_type(seg, s) == AREA_PV &&
|
||||||
(!seg_pvseg(seg, s) ||
|
(!seg_pvseg(seg, s) || !seg_pv(seg, s) || !seg_dev(seg, s) ||
|
||||||
!seg_pv(seg, s) ||
|
!(name = dev_name(seg_dev(seg, s))) || !*name ||
|
||||||
!seg_dev(seg, s))) ||
|
stat(name, &info) < 0 || !S_ISBLK(info.st_mode))) ||
|
||||||
(seg_type(seg, s) == AREA_LV && !seg_lv(seg, s))) {
|
(seg_type(seg, s) == AREA_LV && !seg_lv(seg, s))) {
|
||||||
|
if (!seg->lv->vg->cmd->partial_activation) {
|
||||||
|
log_error("Aborting. LV %s is now incomplete "
|
||||||
|
"and --partial was not specified.", seg->lv->name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (!_add_error_area(dm, node, seg, s))
|
if (!_add_error_area(dm, node, seg, s))
|
||||||
return_0;
|
return_0;
|
||||||
} else if (seg_type(seg, s) == AREA_PV) {
|
} else if (seg_type(seg, s) == AREA_PV) {
|
||||||
|
Loading…
Reference in New Issue
Block a user