diff options
author | Ondrej Kozina <okozina@redhat.com> | 2015-04-10 13:57:13 +0200 |
---|---|---|
committer | Ondrej Kozina <okozina@redhat.com> | 2015-05-04 16:56:39 +0200 |
commit | 26f4b1da88ed1b26be232cbdab1d000697ef5aa9 (patch) | |
tree | 2c7bb37acf149b28509eccec79605fb076880c72 /tools/polldaemon.c | |
parent | 079895b8bee452c36bf1952df7e40d508ff299eb (diff) | |
download | lvm2-26f4b1da88ed1b26be232cbdab1d000697ef5aa9.tar.gz |
polldaemon: move lvconvert_get_copy_lv code
Moving lvconvert_get_copy_lv to polldaemon (poll_get_copy_lv).
Clear move and rename.
Diffstat (limited to 'tools/polldaemon.c')
-rw-r--r-- | tools/polldaemon.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/polldaemon.c b/tools/polldaemon.c index b78e36435..a90bcfbe8 100644 --- a/tools/polldaemon.c +++ b/tools/polldaemon.c @@ -62,6 +62,20 @@ struct volume_group *poll_get_copy_vg(struct cmd_context *cmd, return vg_read_for_update(cmd, extract_vgname(cmd, name), NULL, 0); } +struct logical_volume *poll_get_copy_lv(struct cmd_context *cmd __attribute__((unused)), + struct volume_group *vg, + const char *name, + const char *uuid, + uint64_t lv_type __attribute__((unused))) +{ + struct logical_volume *lv = find_lv(vg, name); + + if (!lv || (uuid && strcmp(uuid, (char *)&lv->lvid))) + return NULL; + + return lv; +} + static int _check_lv_status(struct cmd_context *cmd, struct volume_group *vg, struct logical_volume *lv, |