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

raid: add _rimage and _rmeta as origin_only

Since we do not support rimage & rmeta for snapshots - we can
avoid quering for -cow devices and add them as origin_only -
since their snapshots (-cow) could have never existed.
This redumes several ioctl operation during table preloading.
This commit is contained in:
Zdenek Kabelac 2020-09-08 21:06:23 +02:00
parent 3e6bb77228
commit 3388e19489
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.03.11 -
==================================
Use _rmeta and _rimage as origin only devices for table loading.
Switch code base to use flexible array syntax.
Fix 64bit math when calculation cachevol size.
Preserve uint32_t for seqno handling.

View File

@ -2642,10 +2642,11 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree,
/* origin only for cache without pending delete */
(!dm->track_pending_delete || !lv_is_cache(lv)) &&
!_add_lv_to_dtree(dm, dtree, seg_lv(seg, s),
lv_is_vdo_pool(seg_lv(seg, s)) ? 1 : 0))
(lv_is_vdo_pool(seg_lv(seg, s)) ||
lv_is_raid_image(seg_lv(seg, s))) ? 1 : 0))
return_0;
if (seg_is_raid_with_meta(seg) && seg->meta_areas && seg_metalv(seg, s) &&
!_add_lv_to_dtree(dm, dtree, seg_metalv(seg, s), 0))
!_add_lv_to_dtree(dm, dtree, seg_metalv(seg, s), 1))
return_0;
}