[f2fs-dev] [PATCH 1/2] f2fs: introduce struct flush_cmd_control to wrap the flush_merge fields

2014-04-26 Thread Gu Zheng
Split the flush_merge fields from sm_i, and use the new struct flush_cmd_control to wrap it, so that we can igonre these fileds if flush_merge is disable, and it alse can the structs more neat. Signed-off-by: Gu Zheng --- fs/f2fs/f2fs.h| 17 fs/f2fs/segment.c | 69 ++

[f2fs-dev] [PATCH 2/2] f2fs: introduce help function {create, destroy}_flush_cmd_control

2014-04-26 Thread Gu Zheng
Introduce help function {create,destroy}_flush_cmd_control to clean up the create/destory flush merge operation. Signed-off-by: Gu Zheng --- fs/f2fs/f2fs.h|3 +- fs/f2fs/segment.c | 60 +--- fs/f2fs/super.c | 27 ++

[f2fs-dev] [PATCH] f2fs: introduce help macro ADDRS_PER_PAGE()

2014-04-26 Thread Chao Yu
Introduce help macro ADDRS_PER_PAGE() to get the number of address pointers in direct node or inode. Signed-off-by: Chao Yu --- fs/f2fs/data.c |6 ++ fs/f2fs/file.c |5 + fs/f2fs/recovery.c |5 + include/linux/f2fs_fs.h |3 +++ 4 files changed,