Signed-off-by: Grzegorz Blach <grzegorz@blach.pl>
[Thomas: split from the initial patch from Grzegorz]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Leave at 0 to use the default overprovision ratio of
mkfs.f2fs.
+config BR2_TARGET_ROOTFS_F2FS_DISCARD
+ bool "discard policy"
+ default y
+ help
+ Enable or disable discard policy.
+
endif # BR2_TARGET_ROOTFS_F2FS
F2FS_OVERPROVISION = $(BR2_TARGET_ROOTFS_F2FS_OVERPROVISION)
endif
+ifeq ($(BR2_TARGET_ROOTFS_F2FS_DISCARD),y)
+F2FS_DISCARD = 1
+else
+F2FS_DISCARD = 0
+endif
+
F2FS_OPTS = \
-f \
-l "$(F2FS_LABEL)" \
+ -t $(F2FS_DISCARD) \
$(if $(F2FS_COLD_FILES),-e "$(F2FS_COLD_FILES)") \
$(if $(F2FS_OVERPROVISION),-o $(F2FS_OVERPROVISION))