1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +03:00

vg_validate: fix seg->extents_copied check introduced with

commit 8f62b7bfe5 and add comment for the member
             to 'struct lv_segment'
This commit is contained in:
Heinz Mauelshagen 2016-07-27 23:09:54 +02:00
parent ea90a3d622
commit df02917d7e
2 changed files with 4 additions and 3 deletions

View File

@ -192,8 +192,6 @@ static void _check_non_raid_seg_members(struct lv_segment *seg, int *error_count
raid_seg_error("non-zero cow LV");
if (!dm_list_empty(&seg->origin_list)) /* snap */
raid_seg_error("non-zero origin_list");
if (seg->extents_copied)
raid_seg_error("non-zero extents_copied");
if (seg->log_lv)
raid_seg_error("non-zero log LV");
if (seg->segtype_private)
@ -256,6 +254,9 @@ static void _check_raid_seg(struct lv_segment *seg, int *error_count)
if (!seg->areas)
raid_seg_error("zero areas");
if (seg->extents_copied > seg->area_len)
raid_seg_error_val("extents_copied too large", seg->extents_copied);
/* Default still 8, change! */
if (seg->area_count > DEFAULT_RAID_MAX_IMAGES) {
log_error("LV %s invalid: maximum supported areas %u (is %u) for %s segment",

View File

@ -463,7 +463,7 @@ struct lv_segment {
struct logical_volume *cow;
struct dm_list origin_list;
uint32_t region_size; /* For mirrors, replicators - in sectors */
uint32_t extents_copied;
uint32_t extents_copied;/* Number of extents synced for raids/mirrors */
struct logical_volume *log_lv;
struct lv_segment *pvmove_source_seg;
void *segtype_private;