Skip to content

Commit

Permalink
enable discard option for dom0 filesystems by default
Browse files Browse the repository at this point in the history
This may have performance impact on some older SSD, but on the other
hand, without this option it's pretty easy to fill the whole LVM thin
pool even if there is plenty free space in dom0.
Note that this doesn't enable it on LUKS layer, this is still disabled
by default.

Fixes QubesOS/qubes-issues#3226
  • Loading branch information
marmarek authored and fepitre committed Jan 4, 2023
1 parent 5f12246 commit 382300e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyanaconda/modules/storage/devicetree/fsset.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,8 @@ def fstab(self):
break
if device.encrypted:
options += ",x-systemd.device-timeout=0"
if fstype in ('ext4', 'btrfs', 'xfs', 'vfat'):
options += ",discard"
devspec = device.fstab_spec
dump = device.format.dump
if device.format.check and mountpoint == "/":
Expand Down

0 comments on commit 382300e

Please sign in to comment.