[Devel] [PATCH libvzctl 2/4] vz-cpt: NFS suppress added
Stanislav Kinsburskiy
skinsbursky at virtuozzo.com
Fri May 13 10:32:05 PDT 2016
This patch add usage of new special toggle, which suppresses NFS requests to
server when enabled.
Required to allow criu to dump NFS mounts.
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
scripts/vz-cpt.in | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/scripts/vz-cpt.in b/scripts/vz-cpt.in
index f79f665..3d7198a 100755
--- a/scripts/vz-cpt.in
+++ b/scripts/vz-cpt.in
@@ -56,8 +56,19 @@ function cg_dump_props {
return 0
}
+function suppress_nfs {
+ value=0
+ path=/proc/$VE_PID/net/nfsfs/suppress_revalidate
+
+ [ "$1" == "true" ] && value=1
+ [ -w $path ] || return 0
+
+ echo $value > /proc/$VE_PID/net/nfsfs/suppress_revalidate
+}
+
mkdir -p $dumpdir &&
cg_dump_props $dumpdir &&
+suppress_nfs true &&
criu dump -v$CRIU_LOGLEVEL -o dump.log \
--file-locks \
--tcp-established \
@@ -74,6 +85,7 @@ criu dump -v$CRIU_LOGLEVEL -o dump.log \
$CRIU_EXTRA_ARGS
if [ $? -ne 0 ]; then
+ suppress_nfs false
[ -d $VE_DUMP_DIR.fail ] && rm -rf $VE_DUMP_DIR.fail
mv -f $dumpdir $VE_DUMP_DIR.fail
echo Failed to checkpoint the Container
More information about the Devel
mailing list