Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp840495imu; Tue, 11 Dec 2018 08:21:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/WuhDowFsR4LS6/IagLBgRSMy4vf6v+61igE05obvuacWROXh2jm8funLA8tI0ajmXs5/2Q X-Received: by 2002:a62:4c5:: with SMTP id 188mr17152125pfe.130.1544545282550; Tue, 11 Dec 2018 08:21:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544545282; cv=none; d=google.com; s=arc-20160816; b=w90FsF4HI9KaXeM/QOvqzzb4VpB/v7FMi6Cxkipr8Z8NBdRrppdWAuS3de5uDfIsnt OfsWe5JUDhY6S8szzGXv24lB5vDQv2Uw6/dvv4Ckhqb7e9m1inH3AVIeDoE2Bk4Uy9Kv 8wnLs8C5KyG+UtGTBhb6Fw00zEUvBfM3yOwQ1a45hwLKf5WyZiXesUo+Gz+myXsjLuir k9RXp3XGGRAwwhb8w3KO8pwDddA/RDaQmWNwE006sfew/I63una9zZiV4Hpsqvrg3wyQ XXNVFEaccwkkiIv33/+20C8xQcyXpKgydrlwZcASC35H4LExqqgcMuFnueFHeJqhxFzi RZWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qEpyTb7qqyQYWuT/pbJMKB5vc3TseViUMsBdr6dVwPM=; b=t/ZwEaGg9FQx0SETpy8ZF8hXLSGJw3VSB9ugY1c1nCUcmNmM/Pt8xOEttvZ1a5GTp4 jsn3CUYBYtrVvIeCPQOFQkGSuDX/E0N7iNwKguqFYfP89ToLDBRx8SnBx/CdrYEwKUuX Bp4419065Nox/9YEma4xkx+hHhRJIDoL6dw07KTQXISpm+YXT84DYs5kzcRvL2TOGpXS GR//wToAnlVORKkiZE0pnzxDMw1k8x4xdMUHWdF5D3QcWPJALHFGJWAfsS2NlTDCHWs+ Rz51PsybsB+IfhwIc78TdO71F1fGNADJLBvRMTBBQUQmdQn1GXZbRbx9TRIyELGSs4MY CR3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cRoQvwQL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a190si11797197pgc.423.2018.12.11.08.21.06; Tue, 11 Dec 2018 08:21:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cRoQvwQL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728724AbeLKQSO (ORCPT + 99 others); Tue, 11 Dec 2018 11:18:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:35066 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728371AbeLKPqj (ORCPT ); Tue, 11 Dec 2018 10:46:39 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF53320870; Tue, 11 Dec 2018 15:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543199; bh=nXIb51wCD0PLvnkwLgQjjxK/EeCGuYyikHc2EmuWBmE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cRoQvwQLXaOsMIAJEhjBSaRuBLMxwRQMZnAgJvg9PlryhIFq/F9N2/4/Todg3H8vF kxZ6xYw3KmAMvQU9zMiCyWOKHMcCOiS5Qiyc+7nYpPqhf9SqCISMu8vJ09LMEAern7 cI1iB367L8qad1HkCoDxTKRAtGrF4AZc42JzoOrI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Omar Sandoval , Liu Bo , Nikolay Borisov , Josef Bacik , David Sterba , Sasha Levin Subject: [PATCH 4.4 17/91] btrfs: release metadata before running delayed refs Date: Tue, 11 Dec 2018 16:40:36 +0100 Message-Id: <20181211151607.261293742@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151606.026852373@linuxfoundation.org> References: <20181211151606.026852373@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ We want to release the unused reservation we have since it refills the delayed refs reserve, which will make everything go smoother when running the delayed refs if we're short on our reservation. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Omar Sandoval Reviewed-by: Liu Bo Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba Signed-off-by: Sasha Levin --- fs/btrfs/transaction.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index be8eae80ff65..098016338f98 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1821,6 +1821,9 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, return ret; } + btrfs_trans_release_metadata(trans, root); + trans->block_rsv = NULL; + /* make a pass through all the delayed refs we have so far * any runnings procs may add more while we are here */ @@ -1830,9 +1833,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, return ret; } - btrfs_trans_release_metadata(trans, root); - trans->block_rsv = NULL; - cur_trans = trans->transaction; /* -- 2.17.1