diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 14:10:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 14:10:33 -0400 |
commit | 20bec8ab1458c24bed0d5492ee15d87807fc415a (patch) | |
tree | e5f910947dbe314b96a591e41e2cfb2d3322caad /fs/buffer.c | |
parent | 18b34b9546dc192d978dda940673f40928d2e36e (diff) | |
parent | e7c8f5079ed9ec9e6eb1abe3defc5fb4ebfdf1cb (diff) |
Merge branch 'ext3-latency-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'ext3-latency-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext3: Add replace-on-rename hueristics for data=writeback mode
ext3: Add replace-on-truncate hueristics for data=writeback mode
ext3: Use WRITE_SYNC for commits which are caused by fsync()
block_write_full_page: Use synchronous writes for WBC_SYNC_ALL writebacks
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index c2fa1be4923d..5d55a896ff78 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -1595,6 +1595,7 @@ static int __block_write_full_page(struct inode *inode, struct page *page, | |||
1595 | struct buffer_head *bh, *head; | 1595 | struct buffer_head *bh, *head; |
1596 | const unsigned blocksize = 1 << inode->i_blkbits; | 1596 | const unsigned blocksize = 1 << inode->i_blkbits; |
1597 | int nr_underway = 0; | 1597 | int nr_underway = 0; |
1598 | int write_op = (wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : WRITE); | ||
1598 | 1599 | ||
1599 | BUG_ON(!PageLocked(page)); | 1600 | BUG_ON(!PageLocked(page)); |
1600 | 1601 | ||
@@ -1686,7 +1687,7 @@ static int __block_write_full_page(struct inode *inode, struct page *page, | |||
1686 | do { | 1687 | do { |
1687 | struct buffer_head *next = bh->b_this_page; | 1688 | struct buffer_head *next = bh->b_this_page; |
1688 | if (buffer_async_write(bh)) { | 1689 | if (buffer_async_write(bh)) { |
1689 | submit_bh(WRITE, bh); | 1690 | submit_bh(write_op, bh); |
1690 | nr_underway++; | 1691 | nr_underway++; |
1691 | } | 1692 | } |
1692 | bh = next; | 1693 | bh = next; |
@@ -1740,7 +1741,7 @@ recover: | |||
1740 | struct buffer_head *next = bh->b_this_page; | 1741 | struct buffer_head *next = bh->b_this_page; |
1741 | if (buffer_async_write(bh)) { | 1742 | if (buffer_async_write(bh)) { |
1742 | clear_buffer_dirty(bh); | 1743 | clear_buffer_dirty(bh); |
1743 | submit_bh(WRITE, bh); | 1744 | submit_bh(write_op, bh); |
1744 | nr_underway++; | 1745 | nr_underway++; |
1745 | } | 1746 | } |
1746 | bh = next; | 1747 | bh = next; |