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: Jaegeuk Kim <jaegeuk@kernel.org>
pgoff_t index, end;
struct pagevec pvec;
int step = ino ? 2 : 0;
- int nwritten = 0, wrote = 0;
+ int nwritten = 0;
pagevec_init(&pvec, 0);
if (NODE_MAPPING(sbi)->a_ops->writepage(page, wbc))
unlock_page(page);
- else
- wrote++;
if (--wbc->nr_to_write == 0)
break;
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;
}