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

Alexander Burluka aburluka at virtuozzo.com
Fri Apr 1 08:45:25 PDT 2016


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



More information about the CRIU mailing list