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.
Unified · Split
| @@ -1236,7 +1236,7 @@ int sync_node_pages(struct f2fs_sb_info *sbi, nid_t ino, · 1235 unmodified lines | ||
| 1236 | 1236 | pgoff_t index, end; |
| 1237 | 1237 | struct pagevec pvec; |
| 1238 | 1238 | int step = ino ? 2 : 0; |
| 1239 | − int nwritten = 0, wrote = 0; | |
| 1239 | + int nwritten = 0; | |
| 1240 | 1240 | |
| 1241 | 1241 | pagevec_init(&pvec, 0); |
| 1242 | 1242 | |
| @@ -1326,8 +1326,6 @@ continue_unlock: · 83 unmodified lines | ||
| 1326 | 1326 | |
| 1327 | 1327 | if (NODE_MAPPING(sbi)->a_ops->writepage(page, wbc)) |
| 1328 | 1328 | unlock_page(page); |
| 1329 | − else | |
| 1330 | − wrote++; | |
| 1331 | 1329 | |
| 1332 | 1330 | if (--wbc->nr_to_write == 0) |
| 1333 | 1331 | break; |
| @@ -1345,14 +1343,6 @@ continue_unlock: · 11 unmodified lines | ||
| 1345 | 1343 | step++; |
| 1346 | 1344 | goto next_step; |
| 1347 | 1345 | } |
| 1348 | − | |
| 1349 | − if (wrote) { | |
| 1350 | − if (ino) | |
| 1351 | − f2fs_submit_merged_bio_cond(sbi, NULL, NULL, | |
| 1352 | − ino, NODE, WRITE); | |
| 1353 | − else | |
| 1354 | − f2fs_submit_merged_bio(sbi, NODE, WRITE); | |
| 1355 | − } | |
| 1356 | 1346 | return nwritten; |
| 1357 | 1347 | } |
| 1358 | 1348 | |