diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-11-29 20:10:31 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-12-22 20:18:05 -0500 |
commit | 187b5b8b3dfcfc73126f2743c89cc47df3bf07be (patch) | |
tree | 0be0b06f1c04b8d87037250317e09048643d0d12 /fs/f2fs/segment.h | |
parent | 8f99a946f360c4083d6e323e10a5928e1ce385a4 (diff) |
f2fs: remove the own bi_private allocation
Previously f2fs allocates its own bi_private data structure all the time even
though we don't use it. But, can we remove this bi_private allocation?
This patch removes such the additional bi_private allocation.
1. Retrieve f2fs_sb_info from its page->mapping->host->i_sb.
- This removes the usecases of bi_private in end_io.
2. Use bi_private only when we really need it.
- The bi_private is used only when the checkpoint procedure is conducted.
- When conducting the checkpoint, f2fs submits a META_FLUSH bio to wait its bio
completion.
- Since we have no dependancies to remove bi_private now, let's just use
bi_private pointer as the completion pointer.
Reviewed-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r-- | fs/f2fs/segment.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 7fea2ee8a5da..26812fc0fa12 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h | |||
@@ -92,13 +92,6 @@ | |||
92 | #define MAX_BIO_BLOCKS(max_hw_blocks) \ | 92 | #define MAX_BIO_BLOCKS(max_hw_blocks) \ |
93 | (min((int)max_hw_blocks, BIO_MAX_PAGES)) | 93 | (min((int)max_hw_blocks, BIO_MAX_PAGES)) |
94 | 94 | ||
95 | /* during checkpoint, bio_private is used to synchronize the last bio */ | ||
96 | struct bio_private { | ||
97 | struct f2fs_sb_info *sbi; | ||
98 | bool is_sync; | ||
99 | struct completion *wait; | ||
100 | }; | ||
101 | |||
102 | /* | 95 | /* |
103 | * indicate a block allocation direction: RIGHT and LEFT. | 96 | * indicate a block allocation direction: RIGHT and LEFT. |
104 | * RIGHT means allocating new sections towards the end of volume. | 97 | * RIGHT means allocating new sections towards the end of volume. |