mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-30 17:18:21 +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 */
|
||||
dm_list_iterate_items(mda, &vg->fid->metadata_areas_in_use) {
|
||||
mda_dev = mda_get_device(mda);
|
||||
|
||||
if (mda->status & MDA_FAILED)
|
||||
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
|
||||
* leave the info struct in lvmcache, and leave the mda in
|
||||
|
Loading…
Reference in New Issue
Block a user