f2fs: introduce struct flush_cmd_control to wrap the, flush_merge fields
Subsystems (2)
PATCH 6/7 f2fs: introduce struct flush_cmd_control to wrap the, flush_merge fields
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 <[email protected]>
--- fs/f2fs/f2fs.h | 14 +++++++---- fs/f2fs/segment.c | 68 ++++++++++++++++++++++++++++++++-------------------- fs/f2fs/super.c | 44 +++++++++++++++++++-------------- 3 files changed, 76 insertions(+), 50 deletions(-)
fs/f2fs/f2fs.h +9 -5
@@ -323,6 +323,14 @@ struct flush_cmd {int ret; }; +struct flush_cmd_control { +struct task_struct *f2fs_issue_flush;/* flush thread */ +wait_queue_head_t flush_wait_queue;/* waiting queue for wake-up */ +struct flush_cmd *issue_list;/* list for command issue */ +struct flush_cmd *dispatch_list;/* list for command dispatch */ +spinlock_t issue_lock;/* for issue list lock */ +}; +struct f2fs_sm_info {struct sit_info *sit_info;/* whole segment information */ struct free_segmap_info *free_info;/* free segment information */
@@ -353,11 +361,7 @@ struct f2fs_sm_info {unsigned int min_ipu_util;/* in-place-update threshold */ /* for flush command control */ -struct task_struct *f2fs_issue_flush;/* flush thread */ -wait_queue_head_t flush_wait_queue;/* waiting queue for wake-up */ -struct flush_cmd *issue_list;/* list for command issue */ -struct flush_cmd *dispatch_list;/* list for command dispatch */ -spinlock_t issue_lock;/* for issue list lock */ +struct flush_cmd_control *cmd_control_info; };/*
fs/f2fs/segment.c +42 -26
121 lines not on this page · raw message
fs/f2fs/super.c +25 -19
54 lines not on this page · raw message
Signature · 9 lines
1.7.7 ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees