[CRIU] [PATCH 2/2] mnt: Update can_mount_now to test if master peer is ready
Cyrill Gorcunov
gorcunov at openvz.org
Thu Oct 8 12:45:55 PDT 2015
If we're in someone's slave list we have to wait until
master peer is mounted before mounting ourself otherwise
we ruin the master/slave order.
https://jira.sw.ru/browse/PSBM-39957
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
mount.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/mount.c b/mount.c
index 52cb8a1766d0..f99bce414cff 100644
--- a/mount.c
+++ b/mount.c
@@ -2126,6 +2126,12 @@ static bool can_mount_now(struct mount_info *mi)
if (mi->external)
return true;
+ /*
+ * We're in someone's slave list so wait
+ * until master peer is mounted.
+ */
+ if (mi->mnt_master && mi->mnt_master->mounted == false)
+ return false;
if (mi->master_id && mi->bind == NULL)
return false;
--
2.4.3
More information about the CRIU
mailing list