summaryrefslogtreecommitdiffstats
path: root/genfstab.in
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2022-11-22 04:41:38 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2022-11-22 04:41:38 -0500
commitddb281387aa1c4981bb3059d5703ab17fd6ab191 (patch)
tree5d3f398933f029b3dc27d12e5b32f679f348df11 /genfstab.in
parente650b9b0ff24240197cf0a6f26642fa660e2a110 (diff)
New upstream version 28.upstream/28upstream
Diffstat (limited to 'genfstab.in')
-rw-r--r--genfstab.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/genfstab.in b/genfstab.in
index 6a2ad10..df2b802 100644
--- a/genfstab.in
+++ b/genfstab.in
@@ -58,6 +58,14 @@ optstring_apply_quirks() {
fi
case $fstype in
+ btrfs)
+ # Having only one of subvol= and subvolid= is enough for mounting a btrfs subvolume
+ # And having subvolid= set prevents things like 'snapper rollback' to work, as it
+ # updates the subvolume in-place, leaving subvol= unchanged with a different subvolid.
+ if optstring_has_option "$varname" subvol; then
+ optstring_remove_option "$varname" subvolid
+ fi
+ ;;
f2fs)
# These are Kconfig options for f2fs. Kernels supporting the options will
# only provide the negative versions of these (e.g. noacl), and vice versa
@@ -166,6 +174,7 @@ findmnt -Recvruno SOURCE,TARGET,FSTYPE,OPTIONS,FSROOT "$root" |
if [[ $fsroot != / && $fstype != btrfs ]]; then
# it's a bind mount
src=$(findmnt -funcevo TARGET "$src")$fsroot
+ src="/${src#$root/}"
if [[ $src -ef $target ]]; then
# hrmm, this is weird. we're probably looking at a file or directory
# that was bound into a chroot from the host machine. Ignore it,