Btrfs: don't return congestion in write_cache_pages as often

On fast devices that go from congested to uncongested very quickly, pdflush
is waiting too often in congestion_wait, and the FS is backing off to
easily in write_cache_pages.

For now, fix this on the btrfs side by only checking congestion after
some bios have already gone down. Longer term a real fix is needed
for pdflush, but that is a larger project.

Signed-off-by: Chris Mason <chris.mason@oracle.com>

-5
-5
fs/btrfs/extent_io.c
··· 2377 int scanned = 0; 2378 int range_whole = 0; 2379 2380 - if (wbc->nonblocking && bdi_write_congested(bdi)) { 2381 - wbc->encountered_congestion = 1; 2382 - return 0; 2383 - } 2384 - 2385 pagevec_init(&pvec, 0); 2386 if (wbc->range_cyclic) { 2387 index = mapping->writeback_index; /* Start from prev offset */
··· 2377 int scanned = 0; 2378 int range_whole = 0; 2379 2380 pagevec_init(&pvec, 0); 2381 if (wbc->range_cyclic) { 2382 index = mapping->writeback_index; /* Start from prev offset */