1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

polldaemon: respect lv_attr parm in poll_get_copy_lv

as a part of bigger effort to unify polling intefaces
poll_get_copy_lv should be able to look up LVs based
on theirs lv->status field.

Effective after pvmove starts using poll_get_copy_lv
fn as well.
This commit is contained in:
Ondrej Kozina 2015-05-04 15:41:27 +02:00
parent 26f4b1da88
commit 32527861d0

View File

@ -66,11 +66,11 @@ struct logical_volume *poll_get_copy_lv(struct cmd_context *cmd __attribute__((u
struct volume_group *vg, struct volume_group *vg,
const char *name, const char *name,
const char *uuid, const char *uuid,
uint64_t lv_type __attribute__((unused))) uint64_t lv_type)
{ {
struct logical_volume *lv = find_lv(vg, name); struct logical_volume *lv = find_lv(vg, name);
if (!lv || (uuid && strcmp(uuid, (char *)&lv->lvid))) if (!lv || (uuid && strcmp(uuid, (char *)&lv->lvid)) || (lv_type && !(lv->status & lv_type)))
return NULL; return NULL;
return lv; return lv;