mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Change background polldaemon's process name to "(lvm2)".
Made .update_metadata optional in 'struct poll_functions' definitions; eliminated _update_lvconvert_mirror() stub. Tweak a mirror-specific error message in the generic polldaemon code. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
parent
5f6519758f
commit
c9f27b1ca1
@ -1,5 +1,6 @@
|
||||
Version 2.02.57 -
|
||||
====================================
|
||||
Change background polldaemon's process name to "(lvm2)".
|
||||
Allow vgremove of a VG with PVs missing.
|
||||
Keep log type consistent when changing mirror image count.
|
||||
Always set environment variables for an LVM2 device in 11-dm-lvm.rules.
|
||||
|
@ -258,16 +258,6 @@ static struct logical_volume *_get_lvconvert_lv(struct cmd_context *cmd __attrib
|
||||
return lv;
|
||||
}
|
||||
|
||||
static int _update_lvconvert_mirror(struct cmd_context *cmd __attribute((unused)),
|
||||
struct volume_group *vg __attribute((unused)),
|
||||
struct logical_volume *lv __attribute((unused)),
|
||||
struct dm_list *lvs_changed __attribute((unused)),
|
||||
unsigned flags __attribute((unused)))
|
||||
{
|
||||
/* lvconvert mirror doesn't require periodical metadata update */
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int _finish_lvconvert_mirror(struct cmd_context *cmd,
|
||||
struct volume_group *vg,
|
||||
struct logical_volume *lv,
|
||||
@ -316,7 +306,6 @@ static struct poll_functions _lvconvert_mirror_fns = {
|
||||
.get_copy_vg = _get_lvconvert_vg,
|
||||
.get_copy_lv = _get_lvconvert_lv,
|
||||
.poll_progress = poll_mirror_progress,
|
||||
.update_metadata = _update_lvconvert_mirror,
|
||||
.finish_copy = _finish_lvconvert_mirror,
|
||||
};
|
||||
|
||||
|
@ -54,7 +54,7 @@ static int _become_daemon(struct cmd_context *cmd)
|
||||
close(STDOUT_FILENO);
|
||||
close(STDERR_FILENO);
|
||||
|
||||
strncpy(*cmd->argv, "(lvm2copyd)", strlen(*cmd->argv));
|
||||
strncpy(*cmd->argv, "(lvm2)", strlen(*cmd->argv));
|
||||
|
||||
reset_locking();
|
||||
lvmcache_init();
|
||||
@ -137,8 +137,8 @@ static int _check_lv_status(struct cmd_context *cmd,
|
||||
if (!parms->poll_fns->finish_copy(cmd, vg, lv, lvs_changed))
|
||||
return 0;
|
||||
} else {
|
||||
if (!parms->poll_fns->update_metadata(cmd, vg, lv, lvs_changed,
|
||||
0)) {
|
||||
if (parms->poll_fns->update_metadata &&
|
||||
!parms->poll_fns->update_metadata(cmd, vg, lv, lvs_changed, 0)) {
|
||||
log_error("ABORTING: Segment progression failed.");
|
||||
parms->poll_fns->finish_copy(cmd, vg, lv, lvs_changed);
|
||||
return 0;
|
||||
@ -177,7 +177,7 @@ static int _wait_for_single_lv(struct cmd_context *cmd, const char *name, const
|
||||
|
||||
if (!(lv = parms->poll_fns->get_copy_lv(cmd, vg, name, uuid,
|
||||
parms->lv_type))) {
|
||||
log_error("ABORTING: Can't find mirror LV in %s for %s",
|
||||
log_error("ABORTING: Can't find LV in %s for %s",
|
||||
vg->name, name);
|
||||
unlock_and_release_vg(cmd, vg, vg->name);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user