1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-24 17:57:48 +03:00

Drop backtrace after log_error

Just a minor change to not give backtrace when log_error has been just
reported.
This commit is contained in:
Zdenek Kabelac 2012-02-23 22:24:47 +00:00
parent ba337a5f3e
commit 219e040062
4 changed files with 11 additions and 11 deletions

2
lib/cache/lvmetad.c vendored
View File

@ -245,7 +245,7 @@ int lvmetad_vg_update(struct volume_group *vg)
* request. */
if (!export_vg_to_buffer(vg, &buf)) {
log_error("Could not format VG metadata.");
return_0;
return 0;
}
reply = daemon_send_simple(_lvmetad, "vg_update", "vgname = %s", vg->name,

View File

@ -2331,7 +2331,7 @@ int lv_add_mirror_lvs(struct logical_volume *lv,
if (dm_list_size(&lv->segments) != 1 || seg_type(seg, 0) != AREA_LV) {
log_error("Mirror layer must be inserted before adding mirrors");
return_0;
return 0;
}
mirror_segtype = get_segtype_from_string(lv->vg->cmd, "mirror");

View File

@ -873,7 +873,7 @@ static int _remove_mirror_images(struct logical_volume *lv,
if ((s == 0) && !_mirrored_lv_in_sync(lv) &&
!(lv->status & PARTIAL_LV)) {
log_error("Unable to remove primary mirror image while mirror is not in-sync");
return_0;
return 0;
}
if (!shift_mirror_images(mirrored_seg, s))
return_0;
@ -1015,7 +1015,7 @@ static int _remove_mirror_images(struct logical_volume *lv,
if (!resume_lv(detached_log_lv->vg->cmd, detached_log_lv)) {
log_error("Failed to resume %s",
detached_log_lv->name);
return_0;
return 0;
}
}
@ -1091,7 +1091,7 @@ static int _remove_mirror_images(struct logical_volume *lv,
/* As a result, unnecessary sync may run after
* collapsing. But safe.*/
log_error("Failed to initialize log device");
return_0;
return 0;
}
}
@ -2136,7 +2136,7 @@ int lv_split_mirror_images(struct logical_volume *lv, const char *split_name,
/* Can't split a mirror that is not in-sync... unless force? */
if (!_mirrored_lv_in_sync(lv)) {
log_error("Unable to split mirror that is not in-sync.");
return_0;
return 0;
}
/*

View File

@ -251,7 +251,7 @@ static int _mirrored_transient_status(struct lv_segment *seg, char *params)
if (num_devs > DEFAULT_MIRROR_MAX_IMAGES || num_devs < 0) {
log_error("Unexpectedly many (%d) mirror images in %s.",
num_devs, lv->name);
return_0;
return 0;
}
args = alloca((num_devs + 5) * sizeof(char *));
@ -265,7 +265,7 @@ static int _mirrored_transient_status(struct lv_segment *seg, char *params)
if (log_argc > 16 || log_argc < 0) {
log_error("Unexpectedly many (%d) log arguments in %s.",
log_argc, lv->name);
return_0;
return 0;
}
log_args = alloca(log_argc * sizeof(char *));
@ -277,7 +277,7 @@ static int _mirrored_transient_status(struct lv_segment *seg, char *params)
if (num_devs != seg->area_count) {
log_error("Active mirror has a wrong number of mirror images!");
log_error("Metadata says %d, kernel says %d.", seg->area_count, num_devs);
return_0;
return 0;
}
if (!strcmp(log_args[0], "disk")) {
@ -293,7 +293,7 @@ static int _mirrored_transient_status(struct lv_segment *seg, char *params)
if (strcmp(buf, log_args[1])) {
log_error("Mirror log mismatch. Metadata says %s, kernel says %s.",
buf, log_args[1]);
return_0;
return 0;
}
log_very_verbose("Status of log (%s): %s", buf, log_args[2]);
if (log_args[2][0] != 'A') {
@ -327,7 +327,7 @@ static int _mirrored_transient_status(struct lv_segment *seg, char *params)
for (i = 0; i < num_devs; ++i) {
if (!images[i]) {
log_error("Failed to find image %d (%s).", i, args[i]);
return_0;
return 0;
}
log_very_verbose("Status of image %d: %c", i, status[i]);
if (status[i] != 'A') {