1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-18 10:04:20 +03:00

cache: add pool deps for preload

for_each_sub_lv() normally does not put  pool_lv into deps.

So for now go around it in 'lv_preload()' and add explicit
call with pool.

TODO: think about a better way, we want pool_lv deps only in certain
moments, so maybe for_each_sub_lv() needs new arg for this.
This commit is contained in:
Zdenek Kabelac 2015-01-28 16:29:35 +01:00
parent 4f1309080a
commit c3bb6d77dd

View File

@ -1879,6 +1879,11 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s,
if (!for_each_sub_lv((struct logical_volume *)ondisk_lv, &_preload_detached_lv, &detached))
goto_out;
/* ATM cache/thin pool is not scanned in 'for_each_sub_lv()', TODO explore better way */
if (lv_is_cache(ondisk_lv) &&
!for_each_sub_lv(first_seg(ondisk_lv)->pool_lv, &_preload_detached_lv, &detached))
goto_out;
/*
* Preload any snapshots that are being removed.
*/