mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
check_pv_segments: resolve pv name once
This commit is contained in:
parent
eb4b307d0c
commit
73f24443e5
@ -398,9 +398,11 @@ int check_pv_segments(struct volume_group *vg)
|
|||||||
uint32_t start_pe, alloced;
|
uint32_t start_pe, alloced;
|
||||||
uint32_t pv_count = 0, free_count = 0, extent_count = 0;
|
uint32_t pv_count = 0, free_count = 0, extent_count = 0;
|
||||||
int ret = 1;
|
int ret = 1;
|
||||||
|
const char *pv_devname;
|
||||||
|
|
||||||
dm_list_iterate_items(pvl, &vg->pvs) {
|
dm_list_iterate_items(pvl, &vg->pvs) {
|
||||||
pv = pvl->pv;
|
pv = pvl->pv;
|
||||||
|
pv_devname = pv_dev_name(pv);
|
||||||
segno = 0;
|
segno = 0;
|
||||||
start_pe = 0;
|
start_pe = 0;
|
||||||
alloced = 0;
|
alloced = 0;
|
||||||
@ -411,7 +413,7 @@ int check_pv_segments(struct volume_group *vg)
|
|||||||
|
|
||||||
/* FIXME Remove this next line eventually */
|
/* FIXME Remove this next line eventually */
|
||||||
log_debug_alloc("%s %u: %6u %6u: %s(%u:%u)",
|
log_debug_alloc("%s %u: %6u %6u: %s(%u:%u)",
|
||||||
pv_dev_name(pv), segno++, peg->pe, peg->len,
|
pv_devname, segno++, peg->pe, peg->len,
|
||||||
peg->lvseg ? peg->lvseg->lv->name : "NULL",
|
peg->lvseg ? peg->lvseg->lv->name : "NULL",
|
||||||
peg->lvseg ? peg->lvseg->le : 0, s);
|
peg->lvseg ? peg->lvseg->le : 0, s);
|
||||||
/* FIXME Add details here on failure instead */
|
/* FIXME Add details here on failure instead */
|
||||||
|
Loading…
Reference in New Issue
Block a user