From 9c15130252828c7b2ecf3c18b9c3a5dec8494bf9 Mon Sep 17 00:00:00 2001 From: 5kft <5kft@users.noreply.github.com> Date: Sat, 15 Sep 2018 22:10:44 +0000 Subject: [PATCH] add "discard" option to armbian-ramlog zram mount When using a zram device mounted and formatted as ext4 it should be mounted using the "discard" option so that the actual allocated memory is freed and returned to the system when files are deleted. --- packages/bsp/common/usr/lib/armbian/armbian-ramlog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bsp/common/usr/lib/armbian/armbian-ramlog b/packages/bsp/common/usr/lib/armbian/armbian-ramlog index 45c07786e2..868758f443 100755 --- a/packages/bsp/common/usr/lib/armbian/armbian-ramlog +++ b/packages/bsp/common/usr/lib/armbian/armbian-ramlog @@ -93,7 +93,7 @@ case "$1" in case $LOG_TYPE in zram) echo -e "Mounting /dev/zram0 as $RAM_LOG \c" | $LOG_OUTPUT - mount /dev/zram0 $RAM_LOG 2>&1 | $LOG_OUTPUT + mount -o discard /dev/zram0 $RAM_LOG 2>&1 | $LOG_OUTPUT ;; tmpfs) echo -e "Setting up $RAM_LOG as tmpfs \c" | $LOG_OUTPUT