sys-kernel/gentoo-sources is missing shiftfs support shiftfs support could be added with a masked use flag by patching gentoo-sources with diffs extracted from https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/eoan like this: n=5001 ; for c in $(git log fs/shiftfs.c | grep ^commit | sed s/commit\ // | tac) ; do git format-patch -1 --start-number $n $c ; n=$(($n+1)) ; done 5001-UBUNTU-SAUCE-shiftfs-uid-gid-shifting-bind-mount.patch 5002-UBUNTU-SAUCE-shiftfs-rework-and-extend.patch 5003-UBUNTU-SAUCE-shiftfs-support-some-btrfs-ioctls.patch 5004-UBUNTU-SAUCE-shiftfs-use-translated-ids-when-chaning.patch 5005-UBUNTU-SAUCE-shiftfs-fix-passing-of-attrs-to-underal.patch 5006-UBUNTU-SAUCE-shiftfs-prevent-use-after-free-when-ver.patch 5007-UBUNTU-SAUCE-shiftfs-use-separate-llseek-method-for-.patch 5008-UBUNTU-SAUCE-shiftfs-lock-down-certain-superblock-fl.patch 5009-UBUNTU-SAUCE-shiftfs-allow-changing-ro-rw-for-subvol.patch shiftfs works with linux 5.0, 5.1 and 5.2. I tested these patches successfully with =sys-kernel/gentoo-sources-5.1.21.
I thinking this is a candidate for the 'experimental' use flag.
Can you test with 5.2, as 5.1 is EOL'd and 5.0 is long gone.
(In reply to Mike Pagano from comment #2) > Can you test with 5.2, as 5.1 is EOL'd and 5.0 is long gone. I extracted it from 5.2 repo btw. Going to test the patches with 5.2 soon, waiting for the release of zfs 0.8.2 which adds 5.2 support.
Tested with 5.1 and lxd 3.16 from https://bugs.gentoo.org/show_bug.cgi?id=692198 Everything works as expected.
(In reply to Mike Pagano from comment #2) > Can you test with 5.2, as 5.1 is EOL'd and 5.0 is long gone. Tested with gentoo-sources-5.2.9, everything works as expected.
Sorry for slacking on this. Would getting the patches from this git repo provide the support that is needed rather than from Ubuntu ? https://github.com/linuxkit/linuxkit/tree/master/projects/shiftfs
Ubuntu has more patches pertaining to shiftfs, the linuxkit repository might be rather outdated. https://patchwork.ozlabs.org/project/ubuntu-kernel/list/?q=shiftfs
5.4 patches located at git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/unstable for now
(In reply to fling from comment #8) > 5.4 patches located at > git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/unstable > for now Is there something showing which patches are part of shitfs ?
Ubuntu also modified OverlayFS to cooperate with ShiftFS The patches are pretty recognizable, but I'm not sure a distro (gentoo) should rely on his hackish porting of patches, I will probably use it on my own kernel tough, so thankyou Fling. List of patches for 5.8: git log --pretty=tformat:"%H %s" fs/ | grep shiftfs fd79a5b629d3fa2104b2b847e58930d55ecb2cd1 UBUNTU: SAUCE: shiftfs: prevent ESTALE for LOOKUP_JUMP lookups 22bb84cb8794758d24efea9920dd2eda8edf431e UBUNTU: SAUCE: Revert "UBUNTU: SAUCE: shiftfs: fix dentry revalidation" f1a412a7e62ded49e86782bbfe068b984e4622de UBUNTU: SAUCE: shiftfs -- Fix build errors from missing fiemap definitions 8dd5a6951352d1db8cc426586bc54e7a7a03b3bf Revert "UBUNTU: SAUCE: overlayfs: use shiftfs hacks only with shiftfs as underlay" 307658071f5860748c5fe9930b75c8d285002ea3 UBUNTU: SAUCE: shiftfs: let userns root destroy subvolumes from other users 102ff48452f387031f9ef1263d0c4249f873ec07 UBUNTU: SAUCE: overlayfs: use shiftfs hacks only with shiftfs as underlay 25a3522a1cdc1fb82d0c1c43c795f1bcf23826aa UBUNTU: SAUCE: shiftfs: fix dentry revalidation a72950138baa2718c3c96af53660b85298cc201e UBUNTU: SAUCE: shiftfs: record correct creator credentials 895897a4d1527482764dbb472644330ceddc359c UBUNTU: SAUCE: shiftfs: prevent lower dentries from going negative during unlink 9143853f23aac585cb1c0754eeb93b1860aed998 UBUNTU: SAUCE: shiftfs: Correct id translation for lower fs operations c64361e737f7693d080269553ad454324cbab76a UBUNTU: SAUCE: shiftfs: prevent type confusion 6c21bbce87a3742ae3dcf50804bc86b45e73024d UBUNTU: SAUCE: shiftfs: Fix refcount underflow in btrfs ioctl handling 6f3ac54d9b188a74a7606e6e31a10baaa4607626 UBUNTU: SAUCE: shiftfs: drop CAP_SYS_RESOURCE from effective capabilities 5f195e2bd5183d4e11f5c20e60cb319057f1c01c UBUNTU: SAUCE: shiftfs: setup correct s_maxbytes limit fb2ae3d90b2af578d768a2339c97600d7f5379f1 UBUNTU: SAUCE: shiftfs: Restore vm_file value when lower fs mmap fails 81ba1d42d9346fa0ffae737010f690e7b447e706 UBUNTU: SAUCE: overlayfs: allow with shiftfs as underlay ce055e2f5f4a3c35e61e4d7cb6b3a94a6bbb997b UBUNTU: SAUCE: shiftfs: rework how shiftfs opens files 51d83babf55143d58bdebbe9a955e9e99b11ad2b UBUNTU: SAUCE: shiftfs: mark slab objects SLAB_RECLAIM_ACCOUNT 5e07b8b60379c1f27219d7aa472021406d37ab4c UBUNTU: SAUCE: shiftfs: fix buggy unlink logic bf557b085d5c3b3358199bba56459bc06bc0bc53 UBUNTU: SAUCE: shiftfs: pass correct point down 53586bc9efa92d6e5ec0f3933624fed35594c9bd UBUNTU: SAUCE: shiftfs: add O_DIRECT support d28e4da3bb96a75429336c8c950d55ffd9d0ea25 UBUNTU: SAUCE: shiftfs: allow changing ro/rw for subvolumes 93b0ebcf8d084d5cc8881c40a5134b9c78c15b77 UBUNTU: SAUCE: shiftfs: lock down certain superblock flags f4d3476a099f456f101fdc96eea0844dfe121c3c UBUNTU: SAUCE: shiftfs: use separate llseek method for directories 474a18df9caed16278e5231f84f8d25dfee5b7f0 UBUNTU: SAUCE: shiftfs: prevent use-after-free when verifying mount options d665fec51b0e9979168c06035d1a022979955e0b UBUNTU: SAUCE: shiftfs: fix passing of attrs to underaly for setattr de21c4356b90f1f23b40fb11e889023599bb15fa UBUNTU: SAUCE: shiftfs: use translated ids when chaning lower fs attrs 93091621be96e01cfc580c8263f8c135c5207bbc UBUNTU: SAUCE: shiftfs: support some btrfs ioctls b63e321c486ab78acb0e2eac880b1c2c864a32ca UBUNTU: SAUCE: shiftfs: rework and extend b1c9ba60e228f4fc6ccd91c3614ba090c639a93e UBUNTU: SAUCE: shiftfs: uid/gid shifting bind mount
Created attachment 681631 [details, diff] Shiftfs Patch for 5.4.87 Fling, can you test this patch. It's from Ubuntu's 5.4 kernel patchset. I haven't tried applying it against 5.10. Can you test with 5.4.X ?
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbe7b9fee2684ad0cc0b3015c9e1d16506d4c078 commit dbe7b9fee2684ad0cc0b3015c9e1d16506d4c078 Author: Mike Pagano <mpagano@gentoo.org> AuthorDate: 2021-01-09 18:28:05 +0000 Commit: Mike Pagano <mpagano@gentoo.org> CommitDate: 2021-01-09 18:28:05 +0000 sys-kernel/gentoo-sources: Linux patch 5.10.6 and add support for shiftfs Closes: https://bugs.gentoo.org/692204 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Mike Pagano <mpagano@gentoo.org> sys-kernel/gentoo-sources/Manifest | 3 +++ .../gentoo-sources/gentoo-sources-5.10.6.ebuild | 28 ++++++++++++++++++++++ 2 files changed, 31 insertions(+)