History

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.

Jaegeuk Kim committed 10 years ago

Commit 12bb0a81 parent fff4c551 file · +1 −11Browse files

Unified · Split

fs/f2fs/node.c+1−11
@@ -1236,7 +1236,7 @@ int sync_node_pages(struct f2fs_sb_info *sbi, nid_t ino, · 1235 unmodified lines
1236 pgoff_t index, end;1236 pgoff_t index, end;
1237 struct pagevec pvec;1237 struct pagevec pvec;
1238 int step = ino ? 2 : 0;1238 int step = ino ? 2 : 0;
1239 int nwritten = 0, wrote = 0;1239 int nwritten = 0;
1240 1240
1241 pagevec_init(&pvec, 0);1241 pagevec_init(&pvec, 0);
1242 1242
@@ -1326,8 +1326,6 @@ continue_unlock: · 83 unmodified lines
1326 1326
1327 if (NODE_MAPPING(sbi)->a_ops->writepage(page, wbc))1327 if (NODE_MAPPING(sbi)->a_ops->writepage(page, wbc))
1328 unlock_page(page);1328 unlock_page(page);
1329 else
1330 wrote++;
1331 1329
1332 if (--wbc->nr_to_write == 0)1330 if (--wbc->nr_to_write == 0)
1333 break;1331 break;
@@ -1345,14 +1343,6 @@ continue_unlock: · 11 unmodified lines
1345 step++;1343 step++;
1346 goto next_step;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 return nwritten;1346 return nwritten;
1357}1347}
1358 1348

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t