Skip to contentSkip to conversation

f2fs: introduce struct flush_cmd_control to wrap the, flush_merge fields

PATCH In review Gu Zheng 1 participant 1 message Apr 11, 2014

Subsystems (2)
lore
Share & tools
lore

Gu Zheng

author
#0 lore raw

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.

---
 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
index 1130f9c..780d7e2 100644
@@ -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