commit | a4139cd1bfd46d768f76b34b4ce13cb411401ade | [log] [tgz] |
---|---|---|
author | Seokhwan Kim <sukka.kim@samsung.com> | Tue Aug 10 15:23:45 2021 +0900 |
committer | Brett Wilson <brettw@google.com> | Fri Aug 13 20:45:02 2021 +0000 |
tree | 1892c33f1a549b2850066bce8d93c6c77762f448 | |
parent | 4247d74aa307c918e619289ea2bfff222b79dd2d [diff] |
[f2fs] Add vnode flag and Clean up vnode locking It adds new members to InodeInfoFlag emum class to track vnode state in vnode_cache. kInit means that vnode is being initiailzed and not ready for use. kDirty indicates that vnode needs to be written to disk and kept in dirty_list. kActive means that vnode has valid open_count, and it prevents from making unnecessary RefPtr from vnode_cache when the vnode is being recycled. kBad means that vnode should be dropped without purging. kBad can be set if one makes new RefPtr for a vnode that someone already created. When one tries to access a unstable vnode in unstable state, it is put into VnodeF2fs::flag_cvar_ waiting for regarding flags to be clear. Also, this change removes unnecessary VnodeF2fs::i_mutex that protects the same region as fs_lock. BUG: 78148 Test: fx test f2fs-unittest f2fs-fs-tests f2fs-slow-fs-tests Change-Id: Id009e18bdb4f68ef0777feb9488c394fb4b4e3da Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/f2fs/+/567021 Reviewed-by: Brett Wilson <brettw@google.com>
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
$ fx set core.x64 --with-base //bundles:tools --with-base //bundles:tests --with-base third_party/f2fs
(see third_party/f2fs/test_files/README.md for test)