mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
metadata: check for mda_device existance
This commit is contained in:
parent
f61572eef2
commit
a5e3f0e6dd
@ -3028,11 +3028,14 @@ int vg_write(struct volume_group *vg)
|
|||||||
|
|
||||||
/* Write to each copy of the metadata area */
|
/* Write to each copy of the metadata area */
|
||||||
dm_list_iterate_items(mda, &vg->fid->metadata_areas_in_use) {
|
dm_list_iterate_items(mda, &vg->fid->metadata_areas_in_use) {
|
||||||
mda_dev = mda_get_device(mda);
|
|
||||||
|
|
||||||
if (mda->status & MDA_FAILED)
|
if (mda->status & MDA_FAILED)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (!(mda_dev = mda_get_device(mda))) {
|
||||||
|
log_warn("WARNING: mda without device.");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When the scan and vg_read find old metadata in an mda, they
|
* When the scan and vg_read find old metadata in an mda, they
|
||||||
* leave the info struct in lvmcache, and leave the mda in
|
* leave the info struct in lvmcache, and leave the mda in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user