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

logging: messages for found metadata

This commit is contained in:
David Teigland 2021-08-19 15:07:05 -05:00
parent 6cd4470e6d
commit 9e79a022ea
2 changed files with 11 additions and 20 deletions

View File

@ -305,20 +305,8 @@ static struct raw_locn *_read_metadata_location_vg(struct cmd_context *cmd,
if (*precommitted && rlocn_precommitted->size && if (*precommitted && rlocn_precommitted->size &&
(rlocn_precommitted->offset != rlocn->offset)) { (rlocn_precommitted->offset != rlocn->offset)) {
rlocn = rlocn_precommitted; rlocn = rlocn_precommitted;
log_debug_metadata("VG %s metadata check %s mda %llu slot1 offset %llu size %llu",
vgname ?: "",
dev_name(dev_area->dev),
(unsigned long long)dev_area->start,
(unsigned long long)rlocn->offset,
(unsigned long long)rlocn->size);
} else { } else {
*precommitted = 0; *precommitted = 0;
log_debug_metadata("VG %s metadata check %s mda %llu slot0 offset %llu size %llu",
vgname ?: "",
dev_name(dev_area->dev),
(unsigned long long)dev_area->start,
(unsigned long long)rlocn->offset,
(unsigned long long)rlocn->size);
} }
/* Do not check non-existent metadata. */ /* Do not check non-existent metadata. */
@ -440,19 +428,22 @@ static struct volume_group *_vg_read_raw_area(struct cmd_context *cmd,
&when, &desc); &when, &desc);
if (!vg && !*use_previous_vg) { if (!vg && !*use_previous_vg) {
log_warn("WARNING: failed to read metadata text on %s at %llu size %llu for VG %s.", log_warn("WARNING: Failed to read metadata text at %llu off %llu size %llu VG %s on %s",
dev_name(area->dev),
(unsigned long long)(area->start + rlocn->offset), (unsigned long long)(area->start + rlocn->offset),
(unsigned long long)rlocn->offset,
(unsigned long long)rlocn->size, (unsigned long long)rlocn->size,
vgname); vgname,
dev_name(area->dev));
return NULL; return NULL;
} }
log_debug_metadata("Found metadata on %s at %llu size %llu for VG %s", log_debug_metadata("Found metadata text at %llu off %llu size %llu VG %s on %s",
dev_name(area->dev),
(unsigned long long)(area->start + rlocn->offset), (unsigned long long)(area->start + rlocn->offset),
(unsigned long long)rlocn->offset,
(unsigned long long)rlocn->size, (unsigned long long)rlocn->size,
vgname); vgname,
dev_name(area->dev));
if (vg && precommitted) if (vg && precommitted)
vg->status |= PRECOMMITTED; vg->status |= PRECOMMITTED;

View File

@ -561,7 +561,7 @@ static int _text_read(struct cmd_context *cmd, struct labeller *labeller, struct
bad_mda_count++; bad_mda_count++;
} else { } else {
/* The normal success path */ /* The normal success path */
log_debug("Scanned %s mda1 seqno %u", dev_name(dev), vgsummary.seqno); log_debug("Found metadata seqno %u in mda1 on %s", vgsummary.seqno, dev_name(dev));
good_mda_count++; good_mda_count++;
} }
} }
@ -611,7 +611,7 @@ static int _text_read(struct cmd_context *cmd, struct labeller *labeller, struct
bad_mda_count++; bad_mda_count++;
} else { } else {
/* The normal success path */ /* The normal success path */
log_debug("Scanned %s mda2 seqno %u", dev_name(dev), vgsummary.seqno); log_debug("Found metadata seqno %u in mda2 on %s", vgsummary.seqno, dev_name(dev));
good_mda_count++; good_mda_count++;
} }
} }