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

debug: print VG name in log messages for segment errors

Signed-off-by: Nikhil Kshirsagar <nkshirsa@redhat.com>
This commit is contained in:
Nikhil Kshirsagar 2019-11-26 12:36:45 +05:30 committed by Zdenek Kabelac
parent 4353823306
commit e70d5d470c

View File

@ -73,7 +73,7 @@ int lv_merge_segments(struct logical_volume *lv)
#define seg_error(msg) do { \ #define seg_error(msg) do { \
log_error("LV %s, segment %u invalid: %s for %s segment.", \ log_error("LV %s, segment %u invalid: %s for %s segment.", \
seg->lv->name, seg_count, (msg), lvseg_name(seg)); \ display_lvname(seg->lv), seg_count, (msg), lvseg_name(seg)); \
if ((*error_count)++ > ERROR_MAX) \ if ((*error_count)++ > ERROR_MAX) \
return; \ return; \
} while (0) } while (0)
@ -86,14 +86,14 @@ int lv_merge_segments(struct logical_volume *lv)
*/ */
#define raid_seg_error(msg) do { \ #define raid_seg_error(msg) do { \
log_error("LV %s invalid: %s for %s segment", \ log_error("LV %s invalid: %s for %s segment", \
seg->lv->name, (msg), lvseg_name(seg)); \ display_lvname(seg->lv), (msg), lvseg_name(seg)); \
if ((*error_count)++ > ERROR_MAX) \ if ((*error_count)++ > ERROR_MAX) \
return; \ return; \
} while (0) } while (0)
#define raid_seg_error_val(msg, val) do { \ #define raid_seg_error_val(msg, val) do { \
log_error("LV %s invalid: %s (is %u) for %s segment", \ log_error("LV %s invalid: %s (is %u) for %s segment", \
seg->lv->name, (msg), (val), lvseg_name(seg)); \ display_lvname(seg->lv), (msg), (val), lvseg_name(seg)); \
if ((*error_count)++ > ERROR_MAX) \ if ((*error_count)++ > ERROR_MAX) \
return; \ return; \
} while(0) } while(0)