Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12bb0a8f authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

f2fs: submit node page write bios when really required



If many threads calls fsync with data writes, we don't need to flush every
bios having node page writes.
The f2fs_wait_on_page_writeback will flush its bios when the page is really
needed.

Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent fff4c55d
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -1236,7 +1236,7 @@ int sync_node_pages(struct f2fs_sb_info *sbi, nid_t ino,
	pgoff_t index, end;
	struct pagevec pvec;
	int step = ino ? 2 : 0;
	int nwritten = 0, wrote = 0;
	int nwritten = 0;

	pagevec_init(&pvec, 0);

@@ -1326,8 +1326,6 @@ int sync_node_pages(struct f2fs_sb_info *sbi, nid_t ino,

			if (NODE_MAPPING(sbi)->a_ops->writepage(page, wbc))
				unlock_page(page);
			else
				wrote++;

			if (--wbc->nr_to_write == 0)
				break;
@@ -1345,14 +1343,6 @@ int sync_node_pages(struct f2fs_sb_info *sbi, nid_t ino,
		step++;
		goto next_step;
	}

	if (wrote) {
		if (ino)
			f2fs_submit_merged_bio_cond(sbi, NULL, NULL,
							ino, NODE, WRITE);
		else
			f2fs_submit_merged_bio(sbi, NODE, WRITE);
	}
	return nwritten;
}