diff options
author | Gu Zheng <guz.fnst@cn.fujitsu.com> | 2014-04-27 02:21:21 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-05-06 21:21:56 -0400 |
commit | a688b9d9e5cbec76edab74e724297b5488c07829 (patch) | |
tree | 3f9f4542c5c13648c7d96721c0cd65a0e9e8ead7 /fs/f2fs/f2fs.h | |
parent | 6403eb1f646a49cc92f25c08f8716f8870a4a865 (diff) |
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 <guz.fnst@cn.fujitsu.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 97da71d96ce3..fa0ec8116f48 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
@@ -325,6 +325,15 @@ struct flush_cmd { | |||
325 | int ret; | 325 | int ret; |
326 | }; | 326 | }; |
327 | 327 | ||
328 | struct flush_cmd_control { | ||
329 | struct task_struct *f2fs_issue_flush; /* flush thread */ | ||
330 | wait_queue_head_t flush_wait_queue; /* waiting queue for wake-up */ | ||
331 | struct flush_cmd *issue_list; /* list for command issue */ | ||
332 | struct flush_cmd *dispatch_list; /* list for command dispatch */ | ||
333 | spinlock_t issue_lock; /* for issue list lock */ | ||
334 | struct flush_cmd *issue_tail; /* list tail of issue list */ | ||
335 | }; | ||
336 | |||
328 | struct f2fs_sm_info { | 337 | struct f2fs_sm_info { |
329 | struct sit_info *sit_info; /* whole segment information */ | 338 | struct sit_info *sit_info; /* whole segment information */ |
330 | struct free_segmap_info *free_info; /* free segment information */ | 339 | struct free_segmap_info *free_info; /* free segment information */ |
@@ -355,12 +364,8 @@ struct f2fs_sm_info { | |||
355 | unsigned int min_ipu_util; /* in-place-update threshold */ | 364 | unsigned int min_ipu_util; /* in-place-update threshold */ |
356 | 365 | ||
357 | /* for flush command control */ | 366 | /* for flush command control */ |
358 | struct task_struct *f2fs_issue_flush; /* flush thread */ | 367 | struct flush_cmd_control *cmd_control_info; |
359 | wait_queue_head_t flush_wait_queue; /* waiting queue for wake-up */ | 368 | |
360 | struct flush_cmd *issue_list; /* list for command issue */ | ||
361 | struct flush_cmd *dispatch_list; /* list for command dispatch */ | ||
362 | spinlock_t issue_lock; /* for issue list lock */ | ||
363 | struct flush_cmd *issue_tail; /* list tail of issue list */ | ||
364 | }; | 369 | }; |
365 | 370 | ||
366 | /* | 371 | /* |