[f2fs-dev] [PATCH 1/2] f2fs: introduce help macro on_build_free_nids()

2014-02-21 Thread Gu Zheng
Introduce help macro on_build_free_nids() which just uses build_lock to judge whether the building free nid is going, so that we can remove the on_build_free_nids field from f2fs_sb_info. Signed-off-by: Gu Zheng --- fs/f2fs/f2fs.h |2 -- fs/f2fs/node.c |6 +++--- 2 files changed, 3 inser

[f2fs-dev] [RFC PATCH 2/2] f2fs: simplify free nid management

2014-02-21 Thread Gu Zheng
Previously, in the free nid management, we use two states to describe the state of a free nid entry: NID_NEW /* newly added to free nid list */ NID_ALLOC /* it is allocated, but not really used*/ When we alloc a new nid from free nid list, we just change the state from *NID_NEW* to *N