[CRIU] [PATCH 2/2] images: regfile -- Save file @mode into image
Cyrill Gorcunov
gorcunov at openvz.org
Fri Jun 17 02:46:29 PDT 2016
We will need it for NFS. While we're saving it
into image, the test for mode change must be
done in account with NFS. So put fixme there.
CC: Pavel Emelyanov <xemul at virtuozzo.com>
CC: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
criu/files-reg.c | 2 ++
images/regfile.proto | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/criu/files-reg.c b/criu/files-reg.c
index 899dcf6fdb67..6ad3a773730f 100644
--- a/criu/files-reg.c
+++ b/criu/files-reg.c
@@ -1166,6 +1166,8 @@ ext:
rfe.flags = p->flags;
rfe.pos = p->pos;
rfe.fown = (FownEntry *)&p->fown;
+ rfe.has_mode = true;
+ rfe.mode = p->stat.st_mode;
if (S_ISREG(p->stat.st_mode) && should_check_size(rfe.flags)) {
rfe.has_size = true;
diff --git a/images/regfile.proto b/images/regfile.proto
index e25d58902fd1..af2926771fb9 100644
--- a/images/regfile.proto
+++ b/images/regfile.proto
@@ -10,4 +10,11 @@ message reg_file_entry {
optional sint32 mnt_id = 7 [default = -1];
optional uint64 size = 8;
optional bool ext = 9;
+ /*
+ * FIXME Implement @mode testing just
+ * like we do for @size field (but make
+ * sure such testing is allowed for NFS
+ * case).
+ */
+ optional uint32 mode = 10;
}
--
2.5.5
More information about the CRIU
mailing list