Skip to contentSkip to conversation

fs/f2fs: clarify help messages

PATCH New Grzegorz Blach 2 participants 8 messages Nov 6, 2018 – Nov 8, 2018 F2FS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 fs/f2fs: clarify help messages

For BR2_TARGET_ROOTFS_F2FS_COLD_FILES clarify that extension list must be a coma separated.

For BR2_TARGET_ROOTFS_F2FS_OVERPROVISION clarify that the default overprovision ratio is autocalculated accoring to the partition size.

---
 fs/f2fs/Config.in | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
fs/f2fs/Config.in +6 -5
index 32d86d8ce3..a44fc0d8db 100644
@@ -21,9 +21,10 @@ config BR2_TARGET_ROOTFS_F2FS_SIZE
 config BR2_TARGET_ROOTFS_F2FS_COLD_FILES
 	string "extension list for cold files"
 	help
-	  Specify a file extension list in order f2fs to treat them as
-	  cold files. The default list includes most of multimedia
-	  file extensions such as jpg, gif, mpeg, mkv, and so on.
+	  Specify a comma separated file extension list in order f2fs
+	  to treat them as cold files. The default list includes most
+	  of multimedia file extensions such as jpg, gif, mpeg, mkv,
+	  and so on.
 
 config BR2_TARGET_ROOTFS_F2FS_OVERPROVISION
 	int "overprovision ratio"
@@ -33,8 +34,8 @@ config BR2_TARGET_ROOTFS_F2FS_OVERPROVISION
 	  area. This area is hidden to users, and utilized by F2FS
 	  cleaner.
 
-	  Leave at 0 to use the default overprovision ratio of
-	  mkfs.f2fs.
+	  Leave at 0 for autocalculation accoring to the partition
+	  size.
 
 config BR2_TARGET_ROOTFS_F2FS_DISCARD
 	bool "discard policy"
Signature · 1 line
2.19.1
#1 lore raw

PATCH 2/4 fs/f2fs: add option to define list of hot file extensions

---
 fs/f2fs/Config.in | 7 +++++++
 fs/f2fs/f2fs.mk   | 2 ++
 2 files changed, 9 insertions(+)
fs/f2fs/Config.in +7 -0
index a44fc0d8db..74712541a4 100644
@@ -26,6 +26,13 @@ config BR2_TARGET_ROOTFS_F2FS_COLD_FILES
 	  of multimedia file extensions such as jpg, gif, mpeg, mkv,
 	  and so on.
 
+config BR2_TARGET_ROOTFS_F2FS_HOT_FILES
+	string "extension list for hot files"
+	help
+	  Specify a comma separated file extension list in order f2fs
+	  to treat them as hot files. The default list includes only
+	  a db extension.
+
 config BR2_TARGET_ROOTFS_F2FS_OVERPROVISION
 	int "overprovision ratio"
 	default 0
fs/f2fs/f2fs.mk +2 -0
index 63e3cdae7b..d4b8310ba3 100644
@@ -14,6 +14,7 @@ endif
 F2FS_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_F2FS_LABEL))
 # ")
 F2FS_COLD_FILES = $(call qstrip,$(BR2_TARGET_ROOTFS_F2FS_COLD_FILES))
+F2FS_HOT_FILES = $(call qstrip,$(BR2_TARGET_ROOTFS_F2FS_HOT_FILES))
 
 ifneq ($(BR2_TARGET_ROOTFS_F2FS_OVERPROVISION),0)
 F2FS_OVERPROVISION = $(BR2_TARGET_ROOTFS_F2FS_OVERPROVISION)
@@ -32,6 +33,7 @@ F2FS_OPTS = \
 	-l "$(F2FS_LABEL)" \
 	-t $(F2FS_DISCARD) \
 	$(if $(F2FS_COLD_FILES),-e "$(F2FS_COLD_FILES)") \
+	$(if $(F2FS_HOT_FILES),-E "$(F2FS_HOT_FILES)") \
 	$(if $(F2FS_OVERPROVISION),-o $(F2FS_OVERPROVISION)) \
 	$(if $(F2FS_FEATURES),-O "$(F2FS_FEATURES)")
 
Signature · 1 line
2.19.1
#2 lore raw

PATCH 2/4 fs/f2fs: add option to define list of hot file extensions

Hello,

Quoted 5 lines · Grzegorz Blach
---
 fs/f2fs/Config.in | 7 +++++++
 fs/f2fs/f2fs.mk   | 2 ++
 2 files changed, 9 insertions(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 3/4 fs/f2fs: simplify overprovision option

In reply to Grzegorz Blach

Setting overprovision to 0 and omitting this option has exactly the same effect.

---
 fs/f2fs/f2fs.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
fs/f2fs/f2fs.mk +1 -5
index d4b8310ba3..f35bb60ad0 100644
@@ -16,10 +16,6 @@ F2FS_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_F2FS_LABEL))
 F2FS_COLD_FILES = $(call qstrip,$(BR2_TARGET_ROOTFS_F2FS_COLD_FILES))
 F2FS_HOT_FILES = $(call qstrip,$(BR2_TARGET_ROOTFS_F2FS_HOT_FILES))
 
-ifneq ($(BR2_TARGET_ROOTFS_F2FS_OVERPROVISION),0)
-F2FS_OVERPROVISION = $(BR2_TARGET_ROOTFS_F2FS_OVERPROVISION)
-endif
-
 ifeq ($(BR2_TARGET_ROOTFS_F2FS_DISCARD),y)
 F2FS_DISCARD = 1
 else
@@ -32,9 +28,9 @@ F2FS_OPTS = \
 	-f \
 	-l "$(F2FS_LABEL)" \
 	-t $(F2FS_DISCARD) \
+	-o $(BR2_TARGET_ROOTFS_F2FS_OVERPROVISION) \
 	$(if $(F2FS_COLD_FILES),-e "$(F2FS_COLD_FILES)") \
 	$(if $(F2FS_HOT_FILES),-E "$(F2FS_HOT_FILES)") \
-	$(if $(F2FS_OVERPROVISION),-o $(F2FS_OVERPROVISION)) \
 	$(if $(F2FS_FEATURES),-O "$(F2FS_FEATURES)")
 
 ROOTFS_F2FS_DEPENDENCIES = host-f2fs-tools
Signature · 1 line
2.19.1
#4 lore raw

PATCH 3/4 fs/f2fs: simplify overprovision option

Hello,

Quoted 7 lines · Grzegorz Blach

Setting overprovision to 0 and omitting this option has exactly the same effect.

---
 fs/f2fs/f2fs.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 4/4 support/testing: add test for a f2fs filesystem

In reply to Grzegorz Blach
---
 .../testing/conf/f2fs-kernel-fragment.config  |  5 ++
 support/testing/tests/fs/test_f2fs.py         | 49 +++++++++++++++++++
 2 files changed, 54 insertions(+)
 create mode 100644 support/testing/conf/f2fs-kernel-fragment.config
 create mode 100644 support/testing/tests/fs/test_f2fs.py
support/testing/conf/f2fs-kernel-fragment.config new file +5 -0
new file mode 100644
index 0000000000..0fca7e784b
@@ -0,0 +1,5 @@
+CONFIG_F2FS_FS=y
+CONFIG_F2FS_STAT_FS=y
+CONFIG_F2FS_FS_XATTR=y
+CONFIG_F2FS_FS_POSIX_ACL=y
+CONFIG_F2FS_FS_SECURITY=y
support/testing/tests/fs/test_f2fs.py new file +49 -0

49 lines not on this page · raw message

Signature · 1 line
2.19.1
#6 lore raw

PATCH 4/4 support/testing: add test for a f2fs filesystem

Hello,

Quoted 27 lines · Grzegorz Blach
---
 .../testing/conf/f2fs-kernel-fragment.config  |  5 ++
 support/testing/tests/fs/test_f2fs.py         | 49 +++++++++++++++++++
 2 files changed, 54 insertions(+)
 create mode 100644 support/testing/conf/f2fs-kernel-fragment.config
 create mode 100644 support/testing/tests/fs/test_f2fs.py
support/testing/conf/f2fs-kernel-fragment.config new file +5 -0
new file mode 100644
index 0000000000..0fca7e784b
@@ -0,0 +1,5 @@
+CONFIG_F2FS_FS=y
+CONFIG_F2FS_STAT_FS=y
+CONFIG_F2FS_FS_XATTR=y
+CONFIG_F2FS_FS_POSIX_ACL=y
+CONFIG_F2FS_FS_SECURITY=y
support/testing/tests/fs/test_f2fs.py new file +2 -0
new file mode 100644
index 0000000000..f95d6dae07
@@ -0,0 +1,49 @@
+import os
+import subprocess

support/testing/tests/fs/test_f2fs.py line 12

Quoted 10 lines
support/testing/tests/fs/test_f2fs.py new file +10 -0
+
+import infra.basetest
+
+def dumpf2fs_getprop(out, prop):
+    for line in out:
+        fields = line.split(" = ")
+        if fields[0] == prop:
+            return fields[1].strip()
+
+class TestF4FS(infra.basetest.BRTest):

TestF4FS ? :-)

I've fixed this typo, and applied. Thanks!

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

PATCH 1/4 fs/f2fs: clarify help messages

In reply to Grzegorz Blach

Hello,

Thanks for following up on this f2fs support!

fs/f2fs/Config.in config BR2_TARGET_ROOTFS_F2FS_OVERPROVISION · line 37

Quoted 1 line · Grzegorz Blach
fs/f2fs/Config.in +1 -0
+	  Leave at 0 for autocalculation accoring to the partition
					 ^^^^^ according

I've fixed this typo, both in the patch and in the commit log, and I've applied. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com