mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
To: ptxdist@pengutronix.de
Cc: matthias.schiffer@ew.tq-group.com
Subject: [ptxdist] [PATCH] varoverlayfs: support kernels without metacopy
Date: Thu, 13 Feb 2020 18:22:07 +0100	[thread overview]
Message-ID: <20200213172208.22452-5-matthias.schiffer@ew.tq-group.com> (raw)
In-Reply-To: <20200213172208.22452-1-matthias.schiffer@ew.tq-group.com>

metacopy=on is supported on Linux 4.19+. Add fallback for older kernels.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
---
 projectroot/usr/lib/systemd/system/var.mount | 1 -
 projectroot/usr/sbin/mount.varoverlayfs      | 4 +++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/projectroot/usr/lib/systemd/system/var.mount b/projectroot/usr/lib/systemd/system/var.mount
index bd6350237..3b686a260 100644
--- a/projectroot/usr/lib/systemd/system/var.mount
+++ b/projectroot/usr/lib/systemd/system/var.mount
@@ -8,4 +8,3 @@ Where=/var
 # note: this is a dummy filesystem only to trigger the corresponding mount helper
 What=varoverlayfs
 Type=varoverlayfs
-Options=metacopy=on
diff --git a/projectroot/usr/sbin/mount.varoverlayfs b/projectroot/usr/sbin/mount.varoverlayfs
index 913004d15..efab16aef 100644
--- a/projectroot/usr/sbin/mount.varoverlayfs
+++ b/projectroot/usr/sbin/mount.varoverlayfs
@@ -8,6 +8,8 @@ set -e
 systemctl start run-varoverlayfs.mount
 mkdir -p /run/varoverlayfs/upper
 mkdir -p /run/varoverlayfs/work
-mount -t overlay -olowerdir=/var,upperdir=/run/varoverlayfs/upper,workdir=/run/varoverlayfs/work "${@}"
+# metacopy=on is supported on Linux 4.19+, fall back on older kernels
+mount -t overlay -olowerdir=/var,upperdir=/run/varoverlayfs/upper,workdir=/run/varoverlayfs/work,metacopy=on "${@}" ||
+	mount -t overlay -olowerdir=/var,upperdir=/run/varoverlayfs/upper,workdir=/run/varoverlayfs/work "${@}"
 systemctl stop run-varoverlayfs.mount
 rmdir /run/varoverlayfs
-- 
2.17.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2020-02-13 17:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 17:22 [ptxdist] [PATCH] kmscube: switch to https URL Matthias Schiffer
2020-02-13 17:22 ` [ptxdist] [PATCH] parted: update to 3.3 Matthias Schiffer
2020-02-14  8:49   ` Michael Olbrich
2020-02-14  9:07   ` [ptxdist] [PATCH v2] " Matthias Schiffer
2020-02-14 10:38   ` [ptxdist] [PATCH v3] " Matthias Schiffer
2020-02-15 10:05     ` Michael Olbrich
2020-02-17  8:53     ` [ptxdist] [PATCH v4] " Matthias Schiffer
2020-02-13 17:22 ` [ptxdist] [PATCH] gettext: deterministically build with included libraries Matthias Schiffer
2020-02-14  9:12   ` Michael Olbrich
2020-02-14  9:48     ` [ptxdist] (EXT) " Matthias Schiffer
2020-02-14 10:38       ` Matthias Schiffer
2020-02-15  9:27         ` Michael Olbrich
2020-02-13 17:22 ` [ptxdist] [PATCH] gst-plugins-good1: qmlglsink: fix build on EGL platform without X11 headers Matthias Schiffer
2020-02-14  9:18   ` Michael Olbrich
2020-02-13 17:22 ` Matthias Schiffer [this message]
2020-02-14  9:21   ` [ptxdist] [PATCH] varoverlayfs: support kernels without metacopy Michael Olbrich
2020-02-14 10:38   ` [ptxdist] [PATCH v2] " Matthias Schiffer
2020-02-13 17:22 ` [ptxdist] [PATCH] syslogng: update to 3.25.1 Matthias Schiffer
2020-02-17  9:38   ` Michael Olbrich
2020-02-17  9:59   ` Michael Olbrich
2020-02-20  8:39   ` [ptxdist] [PATCH v2] " Matthias Schiffer
2020-02-21  7:47     ` Michael Olbrich
2020-02-21  8:30       ` [ptxdist] (EXT) " Matthias Schiffer
2020-03-18 10:50         ` Michael Olbrich
2020-04-03  5:28           ` Michael Olbrich
2020-04-03  8:00             ` [ptxdist] (EXT) " Matthias Schiffer
2020-02-14  8:40 ` [ptxdist] [PATCH] kmscube: switch to https URL Michael Olbrich
2020-02-14  8:53   ` [ptxdist] (EXT) " Matthias Schiffer
2020-02-15  9:29     ` Michael Olbrich
2020-02-17  9:00 ` [ptxdist] [PATCH v2] kmscube: switch to https archive download Matthias Schiffer

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=20200213172208.22452-5-matthias.schiffer@ew.tq-group.com \
    --to=matthias.schiffer@ew.tq-group.com \
    --cc=ptxdist@pengutronix.de \
    /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