diff options
author | Petr Rockai <prockai@redhat.com> | 2012-02-10 01:28:27 +0000 |
---|---|---|
committer | Petr Rockai <prockai@redhat.com> | 2012-02-10 01:28:27 +0000 |
commit | 8e5f7cf3dc1d75d0a370729326522bcac29b489d (patch) | |
tree | a8e7130afabb199942ac06ac6298b13ce4988266 /lib/format1/lvm1-label.c | |
parent | 5fa417a9c0aa2d7ea80e1087e0d2943536fc5b9d (diff) | |
download | lvm2-8e5f7cf3dc1d75d0a370729326522bcac29b489d.tar.gz lvm2-8e5f7cf3dc1d75d0a370729326522bcac29b489d.tar.xz lvm2-8e5f7cf3dc1d75d0a370729326522bcac29b489d.zip |
Move lvmcache data structures behind an API (making the structures private to
lvmcache.c). No functional change.
Diffstat (limited to 'lib/format1/lvm1-label.c')
-rw-r--r-- | lib/format1/lvm1-label.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/format1/lvm1-label.c b/lib/format1/lvm1-label.c index 07596a54..4c157ac5 100644 --- a/lib/format1/lvm1-label.c +++ b/lib/format1/lvm1-label.c @@ -77,12 +77,11 @@ static int _lvm1_read(struct labeller *l, struct device *dev, void *buf, if (!(info = lvmcache_add(l, (char *)pvd->pv_uuid, dev, vgname, vgid, exported))) return_0; - *label = info->label; + *label = lvmcache_get_label(info); - info->device_size = xlate32(pvd->pv_size) << SECTOR_SHIFT; - dm_list_init(&info->mdas); - - info->status &= ~CACHE_INVALID; + lvmcache_set_device_size(info, xlate32(pvd->pv_size) << SECTOR_SHIFT); + lvmcache_del_mdas(info); + lvmcache_make_valid(info); return 1; } |