1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Avoid changing aligned pe_start as a side-effect of very verbose logging.

This commit is contained in:
Mike Snitzer 2010-08-03 18:19:42 +00:00
parent 97df4e4675
commit 14a9722185
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.73 -
================================
Avoid changing aligned pe_start as a side-effect of very verbose logging.
Fix 'void*' arithmetic warnings in dbg_malloc.c.
Fix 'void*' arithmetic warning in some functions from libdm-iface.c.
Fix const warning in dev_manager_info() and _dev_manager_lv_rmnodes().

View File

@ -1498,7 +1498,7 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume
adjustment =
(pv->pe_start - pv->pe_align_offset) % pv->pe_align;
if (adjustment)
pv->pe_start += pv->pe_align - adjustment;
pv->pe_start += (pv->pe_align - adjustment);
log_very_verbose("%s: setting pe_start=%" PRIu64
" (orig_pe_start=%" PRIu64 ", "
@ -1506,7 +1506,7 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume
"adjustment=%" PRIu64 ")",
pv_dev_name(pv), pv->pe_start,
(adjustment ?
pv->pe_start -= pv->pe_align - adjustment :
pv->pe_start - (pv->pe_align - adjustment) :
pv->pe_start),
pv->pe_align, pv->pe_align_offset, adjustment);
}