summaryrefslogtreecommitdiff
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 5a825502b0b0..a0aa0446a237 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -89,10 +89,13 @@ static void ra_nat_pages(struct f2fs_sb_info *sbi, int nid)
{
struct address_space *mapping = sbi->meta_inode->i_mapping;
struct f2fs_nm_info *nm_i = NM_I(sbi);
+ struct blk_plug plug;
struct page *page;
pgoff_t index;
int i;
+ blk_start_plug(&plug);
+
for (i = 0; i < FREE_NID_PAGES; i++, nid += NAT_ENTRY_PER_BLOCK) {
if (nid >= nm_i->max_nid)
nid = 0;
@@ -110,6 +113,7 @@ static void ra_nat_pages(struct f2fs_sb_info *sbi, int nid)
f2fs_put_page(page, 0);
}
+ blk_finish_plug(&plug);
}
static struct nat_entry *__lookup_nat_cache(struct f2fs_nm_info *nm_i, nid_t n)
@@ -942,6 +946,7 @@ struct page *get_node_page_ra(struct page *parent, int start)
{
struct f2fs_sb_info *sbi = F2FS_SB(parent->mapping->host->i_sb);
struct address_space *mapping = sbi->node_inode->i_mapping;
+ struct blk_plug plug;
struct page *page;
int err, i, end;
nid_t nid;
@@ -961,6 +966,8 @@ struct page *get_node_page_ra(struct page *parent, int start)
else if (err == LOCKED_PAGE)
goto page_hit;
+ blk_start_plug(&plug);
+
/* Then, try readahead for siblings of the desired node */
end = start + MAX_RA_NODE;
end = min(end, NIDS_PER_BLOCK);
@@ -971,6 +978,8 @@ struct page *get_node_page_ra(struct page *parent, int start)
ra_node_page(sbi, nid);
}
+ blk_finish_plug(&plug);
+
lock_page(page);
page_hit: