You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
ext4: Enable DISCARD by default
It improves the performance and lifespan of some storages by enabling the operating system to inform the drive when data blocks are no longer in use, allowing for more efficient garbage collection and wear leveling. To disable it, use the nodiscard mount option. Change-Id: I215ca87c00f32908c1ae233bc9304e7b647f60ea Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
@@ -4331,7 +4331,9 @@ static void ext4_set_def_opts(struct super_block *sb,
|
||||
set_opt(sb, ERRORS_RO);
|
||||
/* block_validity enabled by default; disable with noblock_validity */
|
||||
set_opt(sb, BLOCK_VALIDITY);
|
||||
if (def_mount_opts & EXT4_DEFM_DISCARD)
|
||||
/* discard enabled by default for Rockchip; disable with nodiscard */
|
||||
if (IS_ENABLED(CONFIG_ARCH_ROCKCHIP) ||
|
||||
(def_mount_opts & EXT4_DEFM_DISCARD))
|
||||
set_opt(sb, DISCARD);
|
||||
|
||||
if ((def_mount_opts & EXT4_DEFM_NOBARRIER) == 0)
|
||||
|
||||
Reference in New Issue
Block a user