diff options
author | Ondrej Kozina <okozina@redhat.com> | 2015-03-12 16:21:43 +0100 |
---|---|---|
committer | Ondrej Kozina <okozina@redhat.com> | 2015-04-01 20:40:39 +0200 |
commit | a098aa419f5be5d8f805ab6dc747770e58a4b7b1 (patch) | |
tree | 78bb21119831a5ec5facd817d76f345324db988c /tools/pvmove_poll.h | |
parent | bf2d831e7e9ceb7fe0528dba8587a4157b4ac789 (diff) | |
download | lvm2-a098aa419f5be5d8f805ab6dc747770e58a4b7b1.tar.gz |
pvmove: move poll code in before refactoring
This commit has no impact on functionality. Code required to
be visible outside pvmove.c is just moved into new file
pvmove_poll.c and some calls are made non-static and declared in
new header file pvmove.h
Diffstat (limited to 'tools/pvmove_poll.h')
-rw-r--r-- | tools/pvmove_poll.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tools/pvmove_poll.h b/tools/pvmove_poll.h new file mode 100644 index 000000000..2fee23a9c --- /dev/null +++ b/tools/pvmove_poll.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2015 Red Hat, Inc. All rights reserved. + * + * This file is part of LVM2. + * + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU Lesser General Public License v.2.1. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _LVM_PVMOVE_H +#define _LVM_PVMOVE_H + +#define PVMOVE_FIRST_TIME 0x00000001 /* Called for first time */ +#define PVMOVE_EXCLUSIVE 0x00000002 /* Require exclusive LV */ + +struct cmd_context; +struct dm_list; +struct logical_volume; +struct volume_group; + +int pvmove_target_present(struct cmd_context *cmd, int clustered); + +unsigned pvmove_is_exclusive(struct cmd_context *cmd, struct volume_group *vg); + +struct volume_group *get_vg(struct cmd_context *cmd, const char *vgname); + +int _activate_lv(struct cmd_context *cmd, struct logical_volume *lv_mirr, + unsigned exclusive); + +int pvmove_update_metadata(struct cmd_context *cmd, struct volume_group *vg, + struct logical_volume *lv_mirr, + struct dm_list *lvs_changed, unsigned flags); + +int pvmove_finish(struct cmd_context *cmd, struct volume_group *vg, + struct logical_volume *lv_mirr, struct dm_list *lvs_changed); + +struct volume_group *pvmove_get_copy_vg(struct cmd_context *cmd, + const char *name, const char *uuid); + +#endif /* _LVM_PVMOVE_H */ |