[CRIU] [PATCH 02/17] filemap: collect mapped file fs type
Stanislav Kinsburskiy
skinsbursky at virtuozzo.com
Wed May 18 09:27:50 PDT 2016
It will be used later to define wheither this file is unreachable on restore
(located on NFS, for example)
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
criu/cr-dump.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/criu/cr-dump.c b/criu/cr-dump.c
index b7e30ba..bbee8de 100644
--- a/criu/cr-dump.c
+++ b/criu/cr-dump.c
@@ -370,12 +370,20 @@ static int dump_filemap(struct vma_area *vma_area)
struct fd_parms p = FD_PARMS_INIT;
VmaEntry *vma = vma_area->e;
int ret = 0;
+ struct statfs fst;
u32 id;
BUG_ON(!vma_area->vmst);
p.stat = *vma_area->vmst;
p.mnt_id = vma_area->mnt_id;
+ if (fstatfs(vma_area->vm_file_fd, &fst)) {
+ pr_perror("Unable to statfs fd %d", vma_area->vm_file_fd);
+ return -1;
+ }
+
+ p.fs_type = fst.f_type;
+
/*
* AUFS support to compensate for the kernel bug
* exposing branch pathnames in map_files.
More information about the CRIU
mailing list