tree: e926af2d595515b3c504c155fd515fb7ef1d6be7 [path history] [tgz]
  1. service/
  2. test/
  3. third_party/
  4. bcache.cc
  5. bcache.h
  6. BUILD.gn
  7. checkpoint.cc
  8. component_runner.cc
  9. component_runner.h
  10. data.cc
  11. dir.cc
  12. dir.h
  13. dir_entry_cache.cc
  14. dir_entry_cache.h
  15. dir_hash.cc
  16. dirty_page_list.cc
  17. dirty_page_list.h
  18. f2fs.cc
  19. f2fs.h
  20. f2fs_internal.h
  21. f2fs_layout.h
  22. f2fs_lib.h
  23. f2fs_types.h
  24. file.cc
  25. file.h
  26. file_cache.cc
  27. file_cache.h
  28. fsck.cc
  29. fsck.h
  30. gc.cc
  31. gc.h
  32. inline.cc
  33. inspect.cc
  34. inspect.h
  35. memory_watcher.cc
  36. memory_watcher.h
  37. mkfs.cc
  38. mkfs.h
  39. mount.cc
  40. mount.h
  41. namei.cc
  42. namestring.h
  43. node.cc
  44. node.h
  45. node_page.cc
  46. node_page.h
  47. README.md
  48. recovery.cc
  49. runner.cc
  50. runner.h
  51. segment.cc
  52. segment.h
  53. storage_buffer.cc
  54. storage_buffer.h
  55. super.cc
  56. sync_host.cc
  57. sync_host.h
  58. vmo_manager.cc
  59. vmo_manager.h
  60. vnode.cc
  61. vnode.h
  62. vnode_cache.cc
  63. vnode_cache.h
  64. writeback.cc
  65. writeback.h
src/storage/f2fs/README.md

What is F2FS?

F2FS is the most commonly used log-structured file system in Linux. It supports flash-friendly features such as adaptive logging, multi-head logging, fsync acceleration, and node address translation. For more information see: https://www.usenix.org/conference/fast15/technical-sessions/presentation/lee

Limitations

  • Features under development: mmap(shared), xattr, fallocate

How to test

Fuchsia filesystem tests

  • Build configuration for fs-tests (femu runs with f2fs data partition if you add --args=‘data_filesystem_format=“f2fs”’)

$ fx set core.x64 --with-base //src/storage/f2fs:tests

  • Run Fuchsia filesystem test suite with f2fs (slow-fs-tests can take more than 5 minutes.)

$ fx test f2fs-fs-tests f2fs-slow-fs-tests

  • Only run f2fs unit tests

$ fx test f2fs-unittest

Linux compatibility tests (EXPERIMENTAL)

  • Prerequisite

Linux kernel built with f2fs $ apt install f2fs-tools (on Debian/Ubuntu)

  • Build configuration for fs-tests

$ fx set core.x64 --with-base //src/storage/f2fs/test/compatibility:f2fs-compatibility-tests

  • Run Linux compatibility tests

$ fx test f2fs-compatibility-test

Debian guest based Linux compatibility tests (EXPERIMENTAL)

  • Prerequisite

Generate Linux image

$ ./src/virtualization/packages/debian_guest/build-image.sh
prebuilt/virtualization/packages/debian_guest/images/x64 x64

  • Build configuration

$ fx set core.x64 --with //src/storage/f2fs:tests
--with //src/storage/f2fs/test/compatibility:tests

  • Run the test

$ fx test f2fs-compatibility-test-v2