From 0bef2a91a1b529425bb53bedd0eba087270e1eb5 Mon Sep 17 00:00:00 2001 From: dalto Date: Wed, 10 Nov 2021 17:16:09 -0600 Subject: [PATCH 1/3] [fstab] Remove space_cache from btrfs mount options --- src/modules/fstab/fstab.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/fstab/fstab.conf b/src/modules/fstab/fstab.conf index fdf0d41ec..0e710980b 100644 --- a/src/modules/fstab/fstab.conf +++ b/src/modules/fstab/fstab.conf @@ -13,7 +13,7 @@ # options from this mapping. mountOptions: default: defaults,noatime - btrfs: defaults,noatime,space_cache,autodefrag,compress=zstd + btrfs: defaults,noatime,autodefrag,compress=zstd # Mount options to use for the EFI System Partition. If not defined, the # *mountOptions* for *vfat* are used, or if that is not set either, From 9ef520f8627ddfdcbcb060a0f7776e8593935f2f Mon Sep 17 00:00:00 2001 From: dalto Date: Fri, 12 Nov 2021 08:58:43 -0600 Subject: [PATCH 2/3] Add comment describing the situation with space_cache on btrfs --- src/modules/fstab/fstab.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/fstab/fstab.conf b/src/modules/fstab/fstab.conf index 0e710980b..74b1feb39 100644 --- a/src/modules/fstab/fstab.conf +++ b/src/modules/fstab/fstab.conf @@ -11,6 +11,12 @@ # Mount options to use for all filesystems. If a specific filesystem # is listed here, use those options, otherwise use the *default* # options from this mapping. +# +# With kernels 5.15 and newer be cautious of adding the option +# space_cache to the btrfs mount options. If the root volume is initially +# mounted with one version of space_cache and the mount option specifies +# a different version or implies v1 when v2 is in use, it may fail to +# remount properly. mountOptions: default: defaults,noatime btrfs: defaults,noatime,autodefrag,compress=zstd From daa5731acfecc1f7ba38ba6b2520daa28117e893 Mon Sep 17 00:00:00 2001 From: dalto Date: Fri, 12 Nov 2021 09:29:04 -0600 Subject: [PATCH 3/3] [fstab] Improve comment about space_cache --- src/modules/fstab/fstab.conf | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/modules/fstab/fstab.conf b/src/modules/fstab/fstab.conf index 74b1feb39..385161d2d 100644 --- a/src/modules/fstab/fstab.conf +++ b/src/modules/fstab/fstab.conf @@ -12,11 +12,9 @@ # is listed here, use those options, otherwise use the *default* # options from this mapping. # -# With kernels 5.15 and newer be cautious of adding the option -# space_cache to the btrfs mount options. If the root volume is initially -# mounted with one version of space_cache and the mount option specifies -# a different version or implies v1 when v2 is in use, it may fail to -# remount properly. +# With kernels 5.15 and newer be cautious of adding the option space_cache +# to the btrfs mount options. The default in 5.15 changed to space_cache=v2. +# If space_cache or space_cache=v1 are specified, it may fail to remount. mountOptions: default: defaults,noatime btrfs: defaults,noatime,autodefrag,compress=zstd