linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs: shrink_delalloc check bdi write congested
@ 2012-09-29 13:20 Itaru Kitayama
  2012-09-29 16:21 ` David Sterba
  0 siblings, 1 reply; 7+ messages in thread
From: Itaru Kitayama @ 2012-09-29 13:20 UTC (permalink / raw)
  To: linux-btrfs

In srhink_delalloc(), writeback starts if idle, also check the bdi is
not write congested.
The patch is against the head of the btrfs-next.

Signed-off-by: Itaru Kitayama <kitayama@cl.bb4u.ne.jp>

 fs/btrfs/extent-tree.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index efb044e..caa74d3 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3712,7 +3712,7 @@ static void shrink_delalloc(struct btrfs_root *root, u64 t
        while (delalloc_bytes && loops < 3) {
                max_reclaim = min(delalloc_bytes, to_reclaim);
                nr_pages = max_reclaim >> PAGE_CACHE_SHIFT;
-               writeback_inodes_sb_nr_if_idle(root->fs_info->sb, nr_pages,
+               if (!bdi_write_congested(root->fs_info->sb->s_bdi)) writeback_in
                                               WB_REASON_FS_FREE_SPACE);

                /*

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-10-01  0:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-29 13:20 [PATCH] Btrfs: shrink_delalloc check bdi write congested Itaru Kitayama
2012-09-29 16:21 ` David Sterba
2012-09-30  1:28   ` Itaru Kitayama
2012-09-30  2:11     ` Itaru Kitayama
2012-09-30 22:29       ` David Sterba
2012-09-30 23:55         ` Itaru Kitayama
2012-10-01  0:10           ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).