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)
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",
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;