From: Liu Bo <obuil.liubo@gmail.com>
To: Liu Bo <bo.liu@linux.alibaba.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: remove redundant btrfs_trans_release_metadata"
Date: Wed, 5 Sep 2018 23:47:02 -0700 [thread overview]
Message-ID: <CANQeFDArmtTq567jR8zr4D7jTfzaPHfcrobpANt9v3YjEc7gQA@mail.gmail.com> (raw)
In-Reply-To: <CANQeFDBck+Yaqcv=ETS=YTmcWOZ5UAPDdMYUoV2Fb_WDKw2MNg@mail.gmail.com>
On Wed, Sep 5, 2018 at 10:45 PM, Liu Bo <obuil.liubo@gmail.com> 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.
[1] btrfs: make sure we create all new bgs
thanks,
liubo
>
> On Tue, Sep 4, 2018 at 6:14 PM, Liu Bo <bo.liu@linux.alibaba.com> 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 <bo.liu@linux.alibaba.com>
>> ---
>> 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
>>
next prev parent reply other threads:[~2018-09-06 11:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 1:14 [PATCH] Btrfs: remove redundant btrfs_trans_release_metadata" Liu Bo
2018-09-05 5:58 ` Nikolay Borisov
2018-09-06 5:45 ` Liu Bo
2018-09-06 6:47 ` Liu Bo [this message]
2018-09-06 18:50 ` Nikolay Borisov
2018-09-06 20:25 ` Liu Bo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANQeFDArmtTq567jR8zr4D7jTfzaPHfcrobpANt9v3YjEc7gQA@mail.gmail.com \
--to=obuil.liubo@gmail.com \
--cc=bo.liu@linux.alibaba.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).