Steinar,

> Aha. So overlayfs simply does not support O_TMPFILE?
> I have a workaround for FreeBSD that can probably
> be reused, but it has the usual concerns of not
> going away if the process is forcibly interrupted.

openat(2):
        https://manpages.debian.org/testing/manpages-dev/openat.2.en.html
says:
  "O_TMPFILE requires support by the underlying filesystem; only a
subset of Linux filesystems provide that support. In the initial
implementation, support was provided in the ext2, ext3, ext4, UDF,
Minix, and shmem filesystems. Support for other filesystems has
subsequently been added as follows: XFS (Linux 3.15); Btrfs (Linux
3.16); F2FS (Linux 3.16); and ubifs (Linux 4.9)"

Below is some more detail.
The lowerdir is squashfs and the upperdir and workdir are tmpfs.

Since writing to /tmp (tmpfs) works, I would expect that writing to
/var/lib/plocate would too, since upper/work dir are tmpfs.
Perhaps this is a bug in overlayfs?

Thank you!
Dan
Urbana, Illinois
---
$ df -hT /var/lib/plocate /tmp
Filesystem     Type     Size  Used Avail Use% Mounted on
overlay        overlay  2.0G  316M  1.7G  17% /
tmpfs          tmpfs    2.0G   72K  2.0G   1% /tmp

$ findmnt -P /
TARGET="/" SOURCE="overlay" FSTYPE="overlay"
OPTIONS="rw,noatime,
    lowerdir=/run/live/rootfs/filesystem.squashfs/,
    upperdir=/run/live/overlay/rw,
    workdir=/run/live/overlay/work"
###

Reply via email to