From bfbbaa053121bd047cdcb7bef3b9dd04803c3f44 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 11 Jan 2006 20:49:42 +1100 Subject: [PATCH] --- yaml --- r: 18179 b: refs/heads/master c: f5e596bbef3b0fa583c66c5a83dc9737c0fe2610 h: refs/heads/master i: 18177: aaaeaf49365ace6ecb63528516c65e8921e5562e 18175: 5b44cf722515367546f2b431b245c669df0830e5 v: v3 --- [refs] | 2 +- trunk/fs/xfs/linux-2.6/xfs_aops.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 565403c9d0b8..fadedf780102 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6c4fe19f66a839bce68fcb7b99cdcb0f31c7a59e +refs/heads/master: f5e596bbef3b0fa583c66c5a83dc9737c0fe2610 diff --git a/trunk/fs/xfs/linux-2.6/xfs_aops.c b/trunk/fs/xfs/linux-2.6/xfs_aops.c index 9ea33ea6a225..52707b5ddcb8 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_aops.c +++ b/trunk/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? */