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

Alexander Burluka aburluka at virtuozzo.com
Sat Apr 9 06:41:16 PDT 2016


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
+		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
-- 
1.8.3.1



More information about the CRIU mailing list