[CRIU] [PATCH 08/12] p.haul: add prepare_shared_backups function

Nikita Spiridonov nspiridonov at virtuozzo.com
Tue Apr 5 03:37:59 PDT 2016


On Fri, 2016-04-01 at 18:45 +0300, Alexander Burluka wrote:
> Two snapshots on every shared ploop is created via this
> function.
> Signed-off-by: Alexander Burluka <aburluka at virtuozzo.com>
> ---
>  phaul/fs_haul_ploop.py | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/phaul/fs_haul_ploop.py b/phaul/fs_haul_ploop.py
> index f95086c..db7ebd6 100644
> --- a/phaul/fs_haul_ploop.py
> +++ b/phaul/fs_haul_ploop.py
> @@ -110,8 +110,14 @@ class p_haul_fs:
>  		total_xferred = 0
>  		for ploopcopy in self.__ploop_copies:
>  			total_xferred += ploopcopy.copy_stop()
> +		self.prepare_shared_backups()
>  		return mstats.fs_iter_stats(total_xferred)
>  
> +	def prepare_shared_backups(self):
> +		if iters.is_live_mode(self.__mode):

Please remove mode check (iters.is_live_mode) from
prepare_shared_backup functions, it is
excess (was mentioned in comments to previous patches).

> +			for pl in self.__shared_ploops:
> +				pl.prepare()
> +
>  	def restore_shared_backups(self):
>  		if iters.is_live_mode(self.__mode):
>  			for pl in self.__shared_ploops:




More information about the CRIU mailing list