← Back to team overview

curtin-dev team mailing list archive

[Merge] ~nexusprism/curtin:f2fs-support into curtin:master

 

Alexander Koskovich has proposed merging ~nexusprism/curtin:f2fs-support into curtin:master.

Requested reviews:
  curtin developers (curtin-dev)

For more details, see:
https://code.launchpad.net/~nexusprism/curtin/+git/curtin/+merge/440194
-- 
Your team curtin developers is requested to review the proposed merge of ~nexusprism/curtin:f2fs-support into curtin:master.
diff --git a/curtin/block/mkfs.py b/curtin/block/mkfs.py
index 20ee7b8..bfd97cf 100644
--- a/curtin/block/mkfs.py
+++ b/curtin/block/mkfs.py
@@ -186,6 +186,11 @@ def mkfs(path, fstype, strict=False, label=None, uuid=None, force=False,
             # lp:1569576 , d-i uses the same setting.
             cmd.extend(["-s", "1"])
 
+    if fs_family == "f2fs":
+        # Enable the extended node bitmap, this means that we can create more
+        # files and directories without running out of inodes, even if the
+        # available space for metadata is limited.
+        cmd.extend(["-i"])
     if force:
         cmd.extend(get_flag_mapping("force", fs_family, strict=strict))
     if label is not None:
diff --git a/tests/unittests/test_block_mkfs.py b/tests/unittests/test_block_mkfs.py
index 63c0acf..2647a0a 100644
--- a/tests/unittests/test_block_mkfs.py
+++ b/tests/unittests/test_block_mkfs.py
@@ -74,7 +74,7 @@ class TestBlockMkfs(CiTestCase):
 
     def test_mkfs_f2fs(self):
         conf = self._get_config("f2fs")
-        expected_flags = [["-l", "format1"], "-f",
+        expected_flags = [["-l", "format1"], "-i", "-f",
                           ["-U", self.test_uuid]]
         self._run_mkfs_with_config(conf, "mkfs.f2fs", expected_flags)
 

Follow ups