From patchwork Fri Sep 28 11:18:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 10619751 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2362C15A7 for ; Fri, 28 Sep 2018 11:19:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AE002B061 for ; Fri, 28 Sep 2018 11:19:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F38D2B0F4; Fri, 28 Sep 2018 11:19:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4B5A2B061 for ; Fri, 28 Sep 2018 11:19:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729563AbeI1RnA (ORCPT ); Fri, 28 Sep 2018 13:43:00 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:43667 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729363AbeI1RnA (ORCPT ); Fri, 28 Sep 2018 13:43:00 -0400 Received: by mail-qt1-f194.google.com with SMTP id q41-v6so1331531qtq.10 for ; Fri, 28 Sep 2018 04:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=sV09l7dO3avmvRHRl1FabUbd/mHTvojy+8waApybFR4=; b=JnIsHloaL5IVXTRWMo8NpVnqf60amNdc8hSjSwEEHS75ri0QIkp+rkyqexWBAe/RfJ kvSVLN/Zrl36FSoxpy1K3SqIzzuWwqyAeRvvb6hLFrPKbFrl7zob9iSNuzkSZkEX+z4X GSfuCbs579Q1z5qtq8dhKrHy2YFOBXKDphYH9238aTKboF5qdGwCnBvJnOJuGYPwTsWt 5JudYLeujPloD+12ysWqnC/NKqLsm5+YQKLt2dA5W6MyoBYk0prDI10AUYb5X5vL7neU vkITs0jJH3M/Ki/5zoYaz9DYLDPrT42P27MLWsnchOX6IGNBih6mzNfgD1pTNzYAzerF RC0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=sV09l7dO3avmvRHRl1FabUbd/mHTvojy+8waApybFR4=; b=pSOJFCVXVkCrS3+OmVQ7LP3t8VumLPPms8PEerz0b9zkcXUR6s17B7SgOL22/NQ9a6 kivUs4pOM0OV3aMeu82TgTjvIdciypwjhyFUMJevtv2jVdwFvq+nPPgmQkpTWw2fQ0fz tFuJat3JxaVjboV70GFDhXdhAv2r9AcDqtDaCuf+suBD6KLAAWkDruqrWLUvuxzPwE7s d2hFHM0aJX00oJgfXk3r+MFzbu+kDJid84Rtn3GWH+dNRHCe9nsMWikCB8C+IqigRgO5 eORqJy2xQBZ6YcIJuVm5K6jGmm/IVmWQg91NzrC9+sFYC5MRt+lDY2vkkb46cnyIQILY HoDw== X-Gm-Message-State: ABuFfojDQB6wdCps3jTosxwpv65eDjJhBqi9efGKtit74oY5i1iqMk3W JRa7MPAcyULVvf6UcIbXGtO6WnSVVas= X-Google-Smtp-Source: ACcGV61uS6FjiEU0OB+t1/dqEqENK7Jrfm2U+6hY+wq6XzolYGZ78qWgUo3R25EKZV4V0xGYMYuGPA== X-Received: by 2002:ad4:404a:: with SMTP id r10-v6mr11556258qvp.246.1538133582592; Fri, 28 Sep 2018 04:19:42 -0700 (PDT) Received: from localhost ([107.15.81.208]) by smtp.gmail.com with ESMTPSA id v18-v6sm3180056qtj.94.2018.09.28.04.19.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Sep 2018 04:19:41 -0700 (PDT) From: Josef Bacik To: kernel-team@fb.com, linux-btrfs@vger.kernel.org Subject: [PATCH 42/42] btrfs: don't run delayed_iputs in commit Date: Fri, 28 Sep 2018 07:18:21 -0400 Message-Id: <20180928111821.24376-43-josef@toxicpanda.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180928111821.24376-1-josef@toxicpanda.com> References: <20180928111821.24376-1-josef@toxicpanda.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This could result in a really bad case where we do something like evict evict_refill_and_join btrfs_commit_transaction btrfs_run_delayed_iputs evict evict_refill_and_join btrfs_commit_transaction ... forever We have plenty of other places where we run delayed iputs that are much safer, let those do the work. Signed-off-by: Josef Bacik --- fs/btrfs/transaction.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 9168efaca37e..c91dc36fccae 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -2265,15 +2265,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans) kmem_cache_free(btrfs_trans_handle_cachep, trans); - /* - * If fs has been frozen, we can not handle delayed iputs, otherwise - * it'll result in deadlock about SB_FREEZE_FS. - */ - if (current != fs_info->transaction_kthread && - current != fs_info->cleaner_kthread && - !test_bit(BTRFS_FS_FROZEN, &fs_info->flags)) - btrfs_run_delayed_iputs(fs_info); - return ret; scrub_continue: