[CRIU] [PATCH v2 06/12] p.haul: modify p_haul_fs initialization

Nikita Spiridonov nspiridonov at virtuozzo.com
Mon Apr 11 05:09:16 PDT 2016


On Sat, 2016-04-09 at 16:41 +0300, Alexander Burluka wrote: 
> Add parsing of shared disks
> 
> Signed-off-by: Alexander Burluka <aburluka at virtuozzo.com>
> ---
>  phaul/fs_haul_ploop.py | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/phaul/fs_haul_ploop.py b/phaul/fs_haul_ploop.py
> index 194c5d9..6ab2fd0 100644
> --- a/phaul/fs_haul_ploop.py
> +++ b/phaul/fs_haul_ploop.py
> @@ -70,6 +70,7 @@ class p_haul_fs:
>  		# Create libploop.ploopcopy objects, one per active ploop delta
>  		self.__log_init_hauler(deltas)
>  		self.__ct_priv = ct_priv
> +		self.__shared_ploops = []
>  		self.__ploop_copies = []
>  		for delta_path, delta_fd in deltas:
>  			ddxml_path = get_ddxml_path(delta_path)
> @@ -83,7 +84,9 @@ class p_haul_fs:
>  		return (get_delta_abspath(s, self.__ct_priv) for s in shareds.split(","))
>  
>  	def set_options(self, opts):
> -		pass

Mode check needed here, "iters.is_live_mode(mode)". You can grab mode
from opts. 

> +		shareds = self.__parse_shared_ploops(opts.get("vz_shared_disks", None))
> +		for shared in shareds:
> +			self.__shared_ploops.append(shared_ploop(shared))
>  
>  	def set_work_dir(self, wdir):
>  		pass





More information about the CRIU mailing list