Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2023-09-26 09:56:34 +0200
committerGitHub <noreply@github.com>2023-09-26 09:56:34 +0200
commitc427391543d464856c8153d17ddeef2c693fcf95 (patch)
tree37bf89820ec084620278903faa15e9c6d8af2f1a
parentb141609990fa4f7305443ee6ea6fe8796604c539 (diff)
Disabled fstrim on BTRFS by default (#2109)
* Disabled fstrim on BTRFS by default * Changed variable name to conform with suggestion in #2109
-rw-r--r--archinstall/lib/installer.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index a238bb8f..8a0acf64 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -587,6 +587,7 @@ class Installer:
hostname: str = 'archinstall',
locale_config: LocaleConfiguration = LocaleConfiguration.default()
):
+ _disable_fstrim = False
for mod in self._disk_config.device_modifications:
for part in mod.partitions:
if part.fs_type is not None:
@@ -597,6 +598,10 @@ class Installer:
if (binary := part.fs_type.installation_binary) is not None:
self._binaries.append(binary)
+ # https://github.com/archlinux/archinstall/issues/1837
+ if part.fs_type.fs_type_mount == 'btrfs':
+ _disable_fstrim = True
+
# There is not yet an fsck tool for NTFS. If it's being used for the root filesystem, the hook should be removed.
if part.fs_type.fs_type_mount == 'ntfs3' and part.mountpoint == self.target:
if 'fsck' in self._hooks:
@@ -651,7 +656,10 @@ class Installer:
# periodic TRIM by default.
#
# https://github.com/archlinux/archinstall/issues/880
- self.enable_periodic_trim()
+ # https://github.com/archlinux/archinstall/issues/1837
+ # https://github.com/archlinux/archinstall/issues/1841
+ if not _disable_fstrim:
+ self.enable_periodic_trim()
# TODO: Support locale and timezone
# os.remove(f'{self.target}/etc/localtime')