[Devel] [PATCH v7 0/2] overlayfs: C/R enhancements

Alexander Mikhalitsyn alexander.mikhalitsyn at virtuozzo.com
Wed Jun 3 19:58:11 MSK 2020


This patchset aimed to make C/R of overlayfs mounts with CRIU possible.
We introduce two new overlayfs module options -- dyn_path_opts and
mnt_id_path_opts. If enabled this options allows to see real *full* paths
in lowerdir, workdir, upperdir options, and also mnt_ids for corresponding
paths.

This changes should not break anything because for showing mnt_ids we simply
introduce new show-time mount options. And for paths we simply *always*
provide *full paths* instead of relative path on mountinfo.

BEFORE

overlay on /var/lib/docker/overlay2/XYZ/merged type overlay (rw,relatime,
lowerdir=/var/lib/docker/overlay2/XYZ-init/diff:/var/lib/docker/overlay2/
ABC/diff,upperdir=/var/lib/docker/overlay2/XYZ/diff,workdir=/var/lib/docker
/overlay2/XYZ/work)
none on /sys type sysfs (rw,relatime)

AFTER

overlay on /var/lib/docker/overlay2/XYZ/merged type overlay (rw,relatime,
lowerdir=/var/lib/docker/overlay2/XYZ-init/diff:/var/lib/docker/overlay2/
ABC/diff,upperdir=/var/lib/docker/overlay2/XYZ/diff,workdir=/var/lib/docker
/overlay2/XYZ/work,lowerdir_mnt_id=175:175,upperdir_mnt_id=175)
none on /sys type sysfs (rw,relatime)


Alexander Mikhalitsyn (2):
  overlayfs: add dynamic path resolving in mount options
  overlayfs: add mnt_id paths options

 fs/overlayfs/Kconfig     | 57 ++++++++++++++++++++++++++++
 fs/overlayfs/overlayfs.h |  7 ++++
 fs/overlayfs/ovl_entry.h |  6 ++-
 fs/overlayfs/super.c     | 99 +++++++++++++++++++++++++++++-------------------
 fs/overlayfs/util.c      | 42 ++++++++++++++++++++
 5 files changed, 171 insertions(+), 40 deletions(-)

-- 
1.8.3.1



More information about the Devel mailing list