mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-24 17:57:48 +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:
parent
ea90a3d622
commit
df02917d7e
@ -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",
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user