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

Fix some pvmove error status codes.

This commit is contained in:
Alasdair Kergon 2008-04-09 12:45:32 +00:00
parent f99a79b64a
commit 178e1df257
3 changed files with 18 additions and 16 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.34 - Version 2.02.34 -
=================================== ===================================
Fix some pvmove error status codes.
Fix vgsplit error paths to release vg_to lock. Fix vgsplit error paths to release vg_to lock.
Indicate whether or not VG is clustered in vgcreate log message. Indicate whether or not VG is clustered in vgcreate log message.
Mention default --clustered setting in vgcreate man page. Mention default --clustered setting in vgcreate man page.

View File

@ -19,21 +19,21 @@
#include "metadata-exported.h" #include "metadata-exported.h"
struct poll_functions { struct poll_functions {
const char *(*get_copy_name_from_lv) (struct logical_volume * lv_mirr); const char *(*get_copy_name_from_lv) (struct logical_volume *lv_mirr);
struct volume_group *(*get_copy_vg) (struct cmd_context * cmd, struct volume_group *(*get_copy_vg) (struct cmd_context *cmd,
const char *name); const char *name);
struct logical_volume *(*get_copy_lv) (struct cmd_context * cmd, struct logical_volume *(*get_copy_lv) (struct cmd_context *cmd,
struct volume_group * vg, struct volume_group *vg,
const char *name, const char *name,
uint32_t lv_type); uint32_t lv_type);
int (*update_metadata) (struct cmd_context * cmd, int (*update_metadata) (struct cmd_context *cmd,
struct volume_group * vg, struct volume_group *vg,
struct logical_volume * lv_mirr, struct logical_volume *lv_mirr,
struct list * lvs_changed, int first_time); struct list *lvs_changed, int first_time);
int (*finish_copy) (struct cmd_context * cmd, int (*finish_copy) (struct cmd_context *cmd,
struct volume_group * vg, struct volume_group *vg,
struct logical_volume * lv_mirr, struct logical_volume *lv_mirr,
struct list * lvs_changed); struct list *lvs_changed);
}; };
struct daemon_parms { struct daemon_parms {

View File

@ -565,8 +565,10 @@ int pvmove(struct cmd_context *cmd, int argc, char **argv)
char *colon; char *colon;
int ret; int ret;
if (!pvmove_target_present(cmd, 0)) if (!pvmove_target_present(cmd, 0)) {
return 0; stack;
return ECMD_FAILED;
}
if (argc) { if (argc) {
pv_name = argv[0]; pv_name = argv[0];
@ -577,7 +579,7 @@ int pvmove(struct cmd_context *cmd, int argc, char **argv)
(unsigned) (colon - (unsigned) (colon -
pv_name)))) { pv_name)))) {
log_error("Failed to clone PV name"); log_error("Failed to clone PV name");
return 0; return ECMD_FAILED;
} }
} }
@ -587,7 +589,6 @@ int pvmove(struct cmd_context *cmd, int argc, char **argv)
stack; stack;
return ret; return ret;
} }
} }
return pvmove_poll(cmd, pv_name, return pvmove_poll(cmd, pv_name,