summaryrefslogtreecommitdiffstats
path: root/lib/cache/lvmcache.c
diff options
context:
space:
mode:
authorDave Wysochanski <dwysocha@redhat.com>2010-06-28 20:34:58 +0000
committerDave Wysochanski <dwysocha@redhat.com>2010-06-28 20:34:58 +0000
commitbb723d7897c41d7bcaa900d015d1dca5cfd93d2a (patch)
tree456e3a3418788edc97bcb3c96a5e9206e8610981 /lib/cache/lvmcache.c
parentf9c307cd073ddc042c3d79f504c303ddea210a57 (diff)
downloadlvm2-bb723d7897c41d7bcaa900d015d1dca5cfd93d2a.tar.gz
lvm2-bb723d7897c41d7bcaa900d015d1dca5cfd93d2a.tar.xz
lvm2-bb723d7897c41d7bcaa900d015d1dca5cfd93d2a.zip
Use mdas_empty_or_ignored() in place of checks for empty mda list.
With the addition of ignored mdas, we replace all checks for an empty mda list with a new function to look for either an empty mda list or ignored mdas. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Diffstat (limited to 'lib/cache/lvmcache.c')
-rw-r--r--lib/cache/lvmcache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 213f3cff..a7b11cc6 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -1197,7 +1197,8 @@ int lvmcache_update_vgname_and_id(struct lvmcache_info *info,
}
/* If PV without mdas is already in a real VG, don't make it orphan */
- if (is_orphan_vg(vgname) && info->vginfo && !dm_list_size(&info->mdas) &&
+ if (is_orphan_vg(vgname) && info->vginfo &&
+ mdas_empty_or_ignored(&info->mdas) &&
!is_orphan_vg(info->vginfo->vgname) && memlock())
return 1;