From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f65.google.com ([209.85.214.65]:38858 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729249AbeIGBCU (ORCPT ); Thu, 6 Sep 2018 21:02:20 -0400 Received: by mail-it0-f65.google.com with SMTP id p129-v6so16823335ite.3 for ; Thu, 06 Sep 2018 13:25:13 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1536110090-100798-1-git-send-email-bo.liu@linux.alibaba.com> From: Liu Bo Date: Thu, 6 Sep 2018 13:25:12 -0700 Message-ID: Subject: Re: [PATCH] Btrfs: remove redundant btrfs_trans_release_metadata" To: Nikolay Borisov Cc: Liu Bo , linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-btrfs-owner@vger.kernel.org List-ID: On Thu, Sep 6, 2018 at 11:50 AM, Nikolay Borisov wrote: > > > On 6.09.2018 09:47, Liu Bo wrote: >> On Wed, Sep 5, 2018 at 10:45 PM, Liu Bo wrote: >>> Somehow this ends up with crash in btrfs/124, I'm trying to figure out >>> what went wrong. >>> >> >> It revealed the problem addressed in Josef's patch[1], so with it, >> this patch works just fine. > > What exactly was the crash ? > assertion failed: list_empty(&block_group->bg_list), file: fs/btrfs/extent-tree.c, kernel BUG at fs/btrfs/ctree.h:3427! ... close_ctree+0x142/0x310 [btrfs] thanks, liubo >> >> [1] btrfs: make sure we create all new bgs >> >> thanks, >> liubo >> >>> >>> On Tue, Sep 4, 2018 at 6:14 PM, Liu Bo wrote: >>>> __btrfs_end_transaction() has done the metadata release twice, >>>> probably because it used to process delayed refs in between, but now >>>> that we don't process delayed refs any more, the 2nd release is always >>>> a noop. >>>> >>>> Signed-off-by: Liu Bo >>>> --- >>>> fs/btrfs/transaction.c | 6 ------ >>>> 1 file changed, 6 deletions(-) >>>> >>>> diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c >>>> index bb1b9f526e98..94b036a74d11 100644 >>>> --- a/fs/btrfs/transaction.c >>>> +++ b/fs/btrfs/transaction.c >>>> @@ -826,12 +826,6 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, >>>> return 0; >>>> } >>>> >>>> - btrfs_trans_release_metadata(trans); >>>> - trans->block_rsv = NULL; >>>> - >>>> - if (!list_empty(&trans->new_bgs)) >>>> - btrfs_create_pending_block_groups(trans); >>>> - >>>> trans->delayed_ref_updates = 0; >>>> if (!trans->sync) { >>>> must_run_delayed_refs = >>>> -- >>>> 1.8.3.1 >>>> >>