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
12361236 pgoff_t index, end;
12371237 struct pagevec pvec;
12381238 int step = ino ? 2 : 0;
1239− int nwritten = 0, wrote = 0;
1239+ int nwritten = 0;
12401240
12411241 pagevec_init(&pvec, 0);
12421242
@@ -1326,8 +1326,6 @@ continue_unlock: · 83 unmodified lines
13261326
13271327 if (NODE_MAPPING(sbi)->a_ops->writepage(page, wbc))
13281328 unlock_page(page);
1329− else
1330− wrote++;
13311329
13321330 if (--wbc->nr_to_write == 0)
13331331 break;
@@ -1345,14 +1343,6 @@ continue_unlock: · 11 unmodified lines
13451343 step++;
13461344 goto next_step;
13471345 }
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− }
13561346 return nwritten;
13571347 }
13581348

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