summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@sgi.com>2006-01-11 20:49:42 +1100
committerNathan Scott <nathans@sgi.com>2006-01-11 20:49:42 +1100
commitf5e596bbef3b0fa583c66c5a83dc9737c0fe2610 (patch)
tree5e6e318574c86865eb87b3eb897c199823b85467 /fs
parent6c4fe19f66a839bce68fcb7b99cdcb0f31c7a59e (diff)
downloadblackbird-op-linux-f5e596bbef3b0fa583c66c5a83dc9737c0fe2610.tar.gz
blackbird-op-linux-f5e596bbef3b0fa583c66c5a83dc9737c0fe2610.zip
[XFS] fix writeback control handling fix a reversed condition on where to
trylock and deal with block layer congestion properly. Patch from David Chinner and Christoph Hellwig. SGI-PV: 947118 SGI-Modid: xfs-linux-melb:xfs-kern:203830a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index 9ea33ea6a225..52707b5ddcb8 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -722,8 +722,17 @@ xfs_convert_page(
SetPageUptodate(page);
if (startio) {
- if (count)
- wbc->nr_to_write--;
+ if (count) {
+ struct backing_dev_info *bdi;
+
+ bdi = inode->i_mapping->backing_dev_info;
+ if (bdi_write_congested(bdi)) {
+ wbc->encountered_congestion = 1;
+ done = 1;
+ } else if (--wbc->nr_to_write <= 0) {
+ done = 1;
+ }
+ }
xfs_start_page_writeback(page, wbc, !page_dirty, count);
}
@@ -812,7 +821,7 @@ xfs_page_state_convert(
int all_bh = unmapped;
/* wait for other IO threads? */
- if (startio && wbc->sync_mode != WB_SYNC_NONE)
+ if (startio && (wbc->sync_mode == WB_SYNC_NONE && wbc->nonblocking))
trylock_flag |= BMAPI_TRYLOCK;
/* Is this page beyond the end of the file? */
OpenPOWER on IntegriCloud