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>
This commit is contained in:
@@ -92,13 +92,6 @@
|
||||
#define MAX_BIO_BLOCKS(max_hw_blocks) \
|
||||
(min((int)max_hw_blocks, BIO_MAX_PAGES))
|
||||
|
||||
/* during checkpoint, bio_private is used to synchronize the last bio */
|
||||
struct bio_private {
|
||||
struct f2fs_sb_info *sbi;
|
||||
bool is_sync;
|
||||
struct completion *wait;
|
||||
};
|
||||
|
||||
/*
|
||||
* indicate a block allocation direction: RIGHT and LEFT.
|
||||
* RIGHT means allocating new sections towards the end of volume.
|
||||
|
Reference in New Issue
Block a user