public inbox for linux-unionfs@vger.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 v2 0/5] Support nested overlayfs mounts
Date: Thu, 17 Aug 2023 13:05:19 +0200	[thread overview]
Message-ID: <cover.1692270188.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

Changes since v1:

 * Moved all xattr handling to xattr.c
 * Made creation of escaped whiteouts atomic

Alexander Larsson (5):
  ovl: Move xattr support to new xattrs.c file
  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/Makefile                   |   2 +-
 fs/overlayfs/dir.c                      |  24 ++-
 fs/overlayfs/inode.c                    | 124 -----------
 fs/overlayfs/namei.c                    |  14 +-
 fs/overlayfs/overlayfs.h                |  40 +++-
 fs/overlayfs/readdir.c                  |   7 +-
 fs/overlayfs/super.c                    |  67 +-----
 fs/overlayfs/util.c                     |  20 ++
 fs/overlayfs/xattrs.c                   | 268 ++++++++++++++++++++++++
 10 files changed, 376 insertions(+), 212 deletions(-)
 create mode 100644 fs/overlayfs/xattrs.c

-- 
2.41.0


             reply	other threads:[~2023-08-17 11:06 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17 11:05 Alexander Larsson [this message]
2023-08-17 11:05 ` [PATCH v2 1/5] ovl: Move xattr support to new xattrs.c file Alexander Larsson
2023-08-17 12:48   ` Amir Goldstein
2023-08-17 11:05 ` [PATCH v2 2/5] ovl: Add OVL_XATTR_TRUSTED/USER_PREFIX_LEN macros Alexander Larsson
2023-08-17 12:48   ` Amir Goldstein
2023-08-17 11:05 ` [PATCH v2 3/5] ovl: Support escaped overlay.* xattrs Alexander Larsson
2023-08-17 14:31   ` Amir Goldstein
2023-08-17 15:00     ` Alexander Larsson
2023-08-17 11:05 ` [PATCH v2 4/5] ovl: Support creation of whiteout files on overlayfs Alexander Larsson
2023-08-17 13:40   ` Amir Goldstein
2023-08-21 10:59   ` Miklos Szeredi
2023-08-21 12:55     ` Alexander Larsson
2023-08-21 13:25       ` Amir Goldstein
2023-08-21 15:31         ` Alexander Larsson
2023-08-21 15:40           ` Miklos Szeredi
2023-08-21 20:07             ` Alexander Larsson
2023-08-22 13:22     ` Alexander Larsson
2023-08-22 13:56       ` Miklos Szeredi
2023-08-22 14:25         ` Alexander Larsson
2023-08-22 14:36           ` Alexander Larsson
2023-08-22 15:02             ` Miklos Szeredi
2023-08-22 15:31               ` Alexander Larsson
2023-08-22 15:30             ` Amir Goldstein
2023-08-22 15:43               ` Alexander Larsson
2023-08-22 15:57                 ` Amir Goldstein
2023-08-22 16:18                   ` Miklos Szeredi
2023-08-22 17:29                     ` Amir Goldstein
2023-09-08  2:21                       ` Gao Xiang
     [not found]                         ` <CAL7ro1EsjzNeYAbjPN3HnB7Sq4D48my3PGhPG5L+4DTXzA9xFw@mail.gmail.com>
2023-09-08  8:44                           ` Gao Xiang
2023-08-23  8:51                   ` Alexander Larsson
2023-08-23 13:13               ` Alexander Larsson
2023-08-23 13:21                 ` Alexander Larsson
2023-08-23 14:42                 ` Amir Goldstein
2023-08-23 14:52                   ` Miklos Szeredi
2023-08-23 15:02                     ` Alexander Larsson
2023-08-23 15:50                     ` Amir Goldstein
2023-08-24  9:56                       ` Alexander Larsson
2023-08-24 11:43                         ` Amir Goldstein
2023-08-24 14:22                           ` Alexander Larsson
2023-08-25  8:40                             ` Amir Goldstein
2023-08-25 11:29                               ` Alexander Larsson
2023-08-25 14:39                                 ` Amir Goldstein
2023-08-23 14:50                 ` Alexander Larsson
2023-08-17 11:05 ` [PATCH v2 5/5] ovl: Add documentation on nesting of overlayfs mounts Alexander Larsson
2023-08-17 13:31   ` Amir Goldstein
2023-08-17 13:59     ` Alexander Larsson
2023-08-17 14:45 ` [PATCH v2 0/5] Support nested " Amir Goldstein

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.1692270188.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox