1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvmetad: Attach an outdated_pvs list to vg_lookup replies.

This commit is contained in:
Petr Rockai 2015-04-15 16:39:32 +02:00
parent da1527d65d
commit 1562cd7320

View File

@ -470,8 +470,13 @@ static void mark_outdated_pv(lvmetad_state *s, const char *vgid, const char *pvi
list->v = v; list->v = v;
} }
static void chain_outdated_pvs(lvmetad_state *s, const char *vgid, struct dm_config_tree *metadata) static void chain_outdated_pvs(lvmetad_state *s, const char *vgid, struct dm_config_tree *metadata, struct dm_config_node *last)
{ {
struct dm_config_tree *cft = dm_hash_lookup(s->vgid_to_outdated_pvs, vgid);
if (!cft)
return; /* nothing to chain in */
last->sib = dm_config_clone_node(metadata, dm_config_find_node(cft->root, "outdated_pvs/pv_list"), 0);
last->sib->key = "outdated_pvs";
} }
static response vg_lookup(lvmetad_state *s, request r) static response vg_lookup(lvmetad_state *s, request r)
@ -540,7 +545,7 @@ static response vg_lookup(lvmetad_state *s, request r)
unlock_vg(s, uuid); unlock_vg(s, uuid);
update_pv_status(s, res.cft, n, 1); /* FIXME report errors */ update_pv_status(s, res.cft, n, 1); /* FIXME report errors */
chain_outdated_pvs(s, uuid, res.cft); chain_outdated_pvs(s, uuid, res.cft, n);
return res; return res;
bad: bad: