All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Larsson <alexl@redhat.com>
To: miklos@szeredi.hu
Cc: linux-unionfs@vger.kernel.org, amir73il@gmail.com,
	Alexander Larsson <alexl@redhat.com>
Subject: [PATCH 0/4] Support nested overlayfs mounts
Date: Wed, 16 Aug 2023 17:29:38 +0200	[thread overview]
Message-ID: <cover.1692198910.git.alexl@redhat.com> (raw)

There are cases where you want to use an overlayfs mount as a lowerdir for
another overlayfs mount. For example, if the system rootfs is on overlayfs due
to composefs, or to make it volatile (via tmps), then you cannot currently store
a lowerdir on the rootfs, becasue the inner overlayfs will eat all the whiteouts
and overlay xattrs. This means you can't e.g. store on the rootfs a prepared
container image for use using overlayfs.

This patch series adds support for nesting of overlayfs mounts by escaping the
problematic features on and unescaping them when exposing to the overlayfs user.

This series is also available here:
  https://github.com/alexlarsson/linux/tree/ovl-nesting

And xfstest to test it is available here:
  https://github.com/alexlarsson/xfstests/tree/overlayfs-nesting

Alexander Larsson (4):
  ovl: Add OVL_XATTR_TRUSTED/USER_PREFIX_LEN macros
  ovl: Support escaped overlay.* xattrs
  ovl: Support creation of whiteout files on overlayfs
  ovl: Add documentation on nesting of overlayfs mounts

 Documentation/filesystems/overlayfs.rst | 22 ++++++++++
 fs/overlayfs/dir.c                      | 14 ++++---
 fs/overlayfs/inode.c                    | 31 +++++++++++++--
 fs/overlayfs/namei.c                    | 14 ++++---
 fs/overlayfs/overlayfs.h                | 22 ++++++++++
 fs/overlayfs/readdir.c                  |  7 +++-
 fs/overlayfs/super.c                    | 53 +++++++++++++++++++++++--
 fs/overlayfs/util.c                     | 20 ++++++++++
 8 files changed, 164 insertions(+), 19 deletions(-)

-- 
2.41.0


             reply	other threads:[~2023-08-16 15:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16 15:29 Alexander Larsson [this message]
2023-08-16 15:29 ` [PATCH 1/4] ovl: Add OVL_XATTR_TRUSTED/USER_PREFIX_LEN macros Alexander Larsson
2023-08-16 15:29 ` [PATCH 2/4] ovl: Support escaped overlay.* xattrs Alexander Larsson
2023-08-16 18:45   ` Amir Goldstein
2023-08-16 15:29 ` [PATCH 3/4] ovl: Support creation of whiteout files on overlayfs Alexander Larsson
2023-08-16 18:40   ` Amir Goldstein
2023-08-16 15:29 ` [PATCH 4/4] ovl: Add documentation on nesting of overlayfs mounts Alexander Larsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1692198910.git.alexl@redhat.com \
    --to=alexl@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.