[CRIU] [PATCH v3 07/12] p.haul: add two common fs methods for shared backups

Alexander Burluka aburluka at virtuozzo.com
Mon Apr 11 09:29:03 PDT 2016


restore_shared_backups and cleanup_shared_backups
was added

Signed-off-by: Alexander Burluka <aburluka at virtuozzo.com>
---
 phaul/fs_haul_ploop.py   | 8 ++++++++
 phaul/fs_haul_shared.py  | 6 ++++++
 phaul/fs_haul_subtree.py | 6 ++++++
 3 files changed, 20 insertions(+)

diff --git a/phaul/fs_haul_ploop.py b/phaul/fs_haul_ploop.py
index a1d5df4..fa380c6 100644
--- a/phaul/fs_haul_ploop.py
+++ b/phaul/fs_haul_ploop.py
@@ -111,6 +111,14 @@ class p_haul_fs:
 			total_xferred += ploopcopy.copy_stop()
 		return mstats.fs_iter_stats(total_xferred)
 
+	def restore_shared_backups(self):
+		for pl in self.__shared_ploops:
+			pl.restore()
+
+	def cleanup_shared_backups(self):
+		for pl in self.__shared_ploops:
+			pl.cleanup()
+
 	def persistent_inodes(self):
 		"""Inode numbers do not change during ploop disk migration"""
 		return True
diff --git a/phaul/fs_haul_shared.py b/phaul/fs_haul_shared.py
index 77a5a27..28fd322 100644
--- a/phaul/fs_haul_shared.py
+++ b/phaul/fs_haul_shared.py
@@ -24,6 +24,12 @@ class p_haul_fs:
 	def stop_migration(self):
 		return None
 
+	def restore_shared_backups(self):
+		pass
+
+	def cleanup_shared_backups(self):
+		pass
+
 	# Inode numbers do not change on this FS
 	# during migration
 	def persistent_inodes(self):
diff --git a/phaul/fs_haul_subtree.py b/phaul/fs_haul_subtree.py
index 7f7e46d..ffb0788 100644
--- a/phaul/fs_haul_subtree.py
+++ b/phaul/fs_haul_subtree.py
@@ -58,3 +58,9 @@ class p_haul_fs:
 	# When rsync-ing FS inodes number will change
 	def persistent_inodes(self):
 		return False
+
+	def restore_shared_backups(self):
+		pass
+
+	def cleanup_shared_backups(self):
+		pass
-- 
1.8.3.1



More information about the CRIU mailing list