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

lvmcache: set device in label when switching devs V2

This is an alternative/equivalent to commit
ca67cf84df

The problem (wrong label->dev after a new preferred
duplicate device is chosen) was isolated to the lvmetad
case (non-lvmetad worked fine), and this fixes the problem
by setting the new label->dev in the lvmetad-specific
code rather than in the general lvmcache code.
This commit is contained in:
David Teigland 2015-05-08 17:10:53 -05:00
parent ca67cf84df
commit be23fae488
2 changed files with 1 additions and 1 deletions

View File

@ -1880,7 +1880,6 @@ struct lvmcache_info *lvmcache_add(struct labeller *labeller, const char *pvid,
info->label->info = info;
}
label = info->label;
label->dev = dev;
}
info->fmt = labeller->fmt;

1
lib/cache/lvmetad.c vendored
View File

@ -372,6 +372,7 @@ static int _pv_populate_lvmcache(struct cmd_context *cmd,
vgname, (const char *)&vgid, 0))) {
dev_alternate_cache = dev_alternate;
info = info_alternate;
lvmcache_get_label(info)->dev = dev_alternate;
}
} else {
log_warn("Duplicate of PV %s dev %s exists on unknown device %"PRId64 ":%" PRId64,