tree: e2865fd24d3db40cf8f7906c361e0d9c483af548 [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. mkfs.cc
  36. mkfs.h
  37. mount.cc
  38. mount.h
  39. namei.cc
  40. namestring.h
  41. node.cc
  42. node.h
  43. node_page.cc
  44. node_page.h
  45. README.md
  46. recovery.cc
  47. runner.cc
  48. runner.h
  49. segment.cc
  50. segment.h
  51. storage_buffer.cc
  52. storage_buffer.h
  53. super.cc
  54. sync_host.cc
  55. sync_host.h
  56. vmo_manager.cc
  57. vmo_manager.h
  58. vnode.cc
  59. vnode.h
  60. vnode_cache.cc
  61. vnode_cache.h
  62. writeback.cc
  63. 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