summaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-03 20:10:33 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-03 20:10:33 +0200
commit20bec8ab1458c24bed0d5492ee15d87807fc415a (patch)
treee5f910947dbe314b96a591e41e2cfb2d3322caad /fs/buffer.c
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg... (diff)
parentext3: Add replace-on-rename hueristics for data=writeback mode (diff)
downloadlinux-20bec8ab1458c24bed0d5492ee15d87807fc415a.tar.xz
linux-20bec8ab1458c24bed0d5492ee15d87807fc415a.zip
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.c5
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,
struct buffer_head *bh, *head;
const unsigned blocksize = 1 << inode->i_blkbits;
int nr_underway = 0;
+ int write_op = (wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : WRITE);
BUG_ON(!PageLocked(page));
@@ -1686,7 +1687,7 @@ static int __block_write_full_page(struct inode *inode, struct page *page,
do {
struct buffer_head *next = bh->b_this_page;
if (buffer_async_write(bh)) {
- submit_bh(WRITE, bh);
+ submit_bh(write_op, bh);
nr_underway++;
}
bh = next;
@@ -1740,7 +1741,7 @@ recover:
struct buffer_head *next = bh->b_this_page;
if (buffer_async_write(bh)) {
clear_buffer_dirty(bh);
- submit_bh(WRITE, bh);
+ submit_bh(write_op, bh);
nr_underway++;
}
bh = next;