From patchwork Sat Sep 29 13:20:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Itaru Kitayama X-Patchwork-Id: 1528371 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 44C103FE4F for ; Sat, 29 Sep 2012 13:20:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753855Ab2I2NUM (ORCPT ); Sat, 29 Sep 2012 09:20:12 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]:36190 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752854Ab2I2NUL (ORCPT ); Sat, 29 Sep 2012 09:20:11 -0400 Received: by lagh6 with SMTP id h6so1390858lag.19 for ; Sat, 29 Sep 2012 06:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=cr1Bcu7SJTid01lTTZP/vcv+ommL3/Ob7joC8i0C2Co=; b=y/1t+7HrtoWvDpdiC/Fpf3DFZbyhqUtK4EvJRud2Cht5XQ3ae0QP8z+9+O3mWQh61X k0Iqry1QpMkt55AcmhDWqLm/V2RjHscmCeSMQnmlN6lV2AazKHpAl9rcanFoo9MUgREX ZwZwmclmbsg/v/tB4ORHMJQH3iPYgUX5pLl2pSEn8w0eMu+jTtgrPYqOrb9mHjVOuHAM vMOLyC5PZdSdsCGpwqvVpEAORI1nTPINnuiQ3bfxlzs7EXLHT1K7sEwjDHuqJhH0Sn3w DaDHT9OEz/RTPDZU/guruY+c5/2OLaThTxHetN7YdNwNtCywPYYTB0NWUuO2oP+dA31T 3fAQ== MIME-Version: 1.0 Received: by 10.152.110.229 with SMTP id id5mr1579201lab.36.1348924809300; Sat, 29 Sep 2012 06:20:09 -0700 (PDT) Received: by 10.114.60.74 with HTTP; Sat, 29 Sep 2012 06:20:09 -0700 (PDT) Date: Sat, 29 Sep 2012 22:20:09 +0900 X-Google-Sender-Auth: ZdmD4GIgPZCfOkfAiwwFYk7pojc Message-ID: Subject: [PATCH] Btrfs: shrink_delalloc check bdi write congested From: Itaru Kitayama To: linux-btrfs@vger.kernel.org Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org 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 fs/btrfs/extent-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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); /*