[CRIU] [PATCH v2] filemap: collect mapped file fs type
Andrew Vagin
avagin at virtuozzo.com
Thu Jul 28 19:37:48 PDT 2016
On Thu, Jul 28, 2016 at 12:06:41PM +0300, Stanislav Kinsburskiy wrote:
> This is essential to define whether this file is located on NFS (and thus has
> to be "link-remapped") or not (see nfs_silly_renamed).
>
> v2:
> Compilation issue fixed
>
> 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 06ff2d7..2288908 100644
> --- a/criu/cr-dump.c
> +++ b/criu/cr-dump.c
> @@ -365,12 +365,20 @@ static int dump_filemap(struct vma_area *vma_area, int fd)
> 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(fd, &fst)) {
> + pr_perror("Unable to statfs fd %d", fd);
> + return -1;
> + }
> +
> + p.fs_type = fst.f_type;
Can we get fs_type in handle_vma()? We get vmst and mnt_id there.
> +
> /*
> * AUFS support to compensate for the kernel bug
> * exposing branch pathnames in map_files.
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list