mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
cache: improve activation with -real
When cache volume may be converted from normal to -real layer LV we need to improve logic for call cache_check. With this patch, we register call for cache_check only when metadata LV is not yet present in active table slot (should match initial table load). This avoids unwanted checking when cache would become layer device online.
This commit is contained in:
parent
954c59779d
commit
69434c2eca
@ -1,5 +1,6 @@
|
||||
Version 2.02.169 -
|
||||
=====================================
|
||||
Support cache volume activation with -real layer.
|
||||
Improve search of lock-holder for external origin and thin-pool.
|
||||
Support status checking of cache volume used in layer.
|
||||
Avoid shifting by one number of blocks when clearing dirty cache volume.
|
||||
|
@ -2901,6 +2901,10 @@ static int _add_new_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree,
|
||||
return_0;
|
||||
|
||||
if (lv_is_cache(lv) &&
|
||||
/* Register callback only for layer activation or non-layered cache LV */
|
||||
(layer || !lv_layer(lv)) &&
|
||||
/* Register callback when metadata LV is NOT already active */
|
||||
!_cached_dm_info(dm->mem, dtree, first_seg(first_seg(lv)->pool_lv)->metadata_lv, NULL) &&
|
||||
!_pool_register_callback(dm, dnode, lv))
|
||||
return_0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user