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

RAID: Report RAID images split with tracking as out-of-sync ("I").

Split image should have an out-of-sync attr ('I') - always.  Even if
the RAID LV has not been written to since the LV was split off, it is
still not part of the group that makes up the RAID and is therefore
"out-of-sync".
This commit is contained in:
Jonathan Brassow 2013-10-14 10:48:44 -05:00
parent 0f55d7cccc
commit f58b26b633
2 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.104
===================================
Report RAID images split with tracking as out-of-sync ("I").
Improve parsing of snapshot lv segment.
Add workaround for deactivation problem of opened virtual snapshot.
Disable unsupported merge for virtual snapshot.

View File

@ -565,7 +565,13 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv)
else if (lv->status & MIRROR_IMAGE)
repstr[0] = (_lv_mimage_in_sync(lv)) ? 'i' : 'I';
else if (lv->status & RAID_IMAGE)
repstr[0] = (_lv_raid_image_in_sync(lv)) ? 'i' : 'I';
/*
* Visible RAID_IMAGES are sub-LVs that have been exposed for
* top-level use by being split from the RAID array with
* '--splitmirrors 1 --trackchanges'. They always report 'I'.
*/
repstr[0] = (!lv_is_visible(lv) && _lv_raid_image_in_sync(lv)) ?
'i' : 'I';
else if (lv->status & MIRROR_LOG)
repstr[0] = 'l';
else if (lv_is_cow(lv))