From: Nikolay Borisov <nborisov@suse.com>
To: Josef Bacik <josef@toxicpanda.com>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH v4 5/6] btrfs: stop running all delayed refs during snapshot
Date: Fri, 18 Dec 2020 11:26:02 +0200 [thread overview]
Message-ID: <346befc5-e425-846f-27c7-ada577dc5a63@suse.com> (raw)
In-Reply-To: <8f91eea944203695995bd69512d7e0e37a39bd64.1608215738.git.josef@toxicpanda.com>
On 17.12.20 г. 16:36 ч., Josef Bacik wrote:
> This was added a very long time ago to work around issues with delayed
> refs and with qgroups. Both of these issues have since been properly
> fixed, so all this does is cause a lot of lock contention with anybody
> else who is running delayed refs.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Codewise it's ok, however I would have liked a better reference to the 2
problems being fixed, I'd assume same applies to David. SO it seems the
first delayed refs run was added due to :
361048f586f5 ("Btrfs: fix full backref problem when inserting shared
block reference") and the 2nd one by d67263354541 ("btrfs: qgroup: Make
snapshot accounting work with new extent-oriented qgroup.")
However there is no indication what code superseded the need for those 2
commits.
> ---
> fs/btrfs/transaction.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
> index 4776e055f7f9..6e3abe9b74c0 100644
> --- a/fs/btrfs/transaction.c
> +++ b/fs/btrfs/transaction.c
> @@ -1686,12 +1686,6 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
> goto fail;
> }
>
> - ret = btrfs_run_delayed_refs(trans, (unsigned long)-1);
> - if (ret) {
> - btrfs_abort_transaction(trans, ret);
> - goto fail;
> - }
> -
> /*
> * Do special qgroup accounting for snapshot, as we do some qgroup
> * snapshot hack to do fast snapshot.
> @@ -1739,12 +1733,6 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
> }
> }
>
> - ret = btrfs_run_delayed_refs(trans, (unsigned long)-1);
> - if (ret) {
> - btrfs_abort_transaction(trans, ret);
> - goto fail;
> - }
> -
> fail:
> pending->error = ret;
> dir_item_existed:
>
next prev parent reply other threads:[~2020-12-18 9:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1608215738.git.josef@toxicpanda.com>
2020-12-17 14:35 ` [PATCH v4 1/6] btrfs: do not block on deleted bgs mutex in the cleaner Josef Bacik
2020-12-17 14:35 ` [PATCH v4 2/6] btrfs: only let one thread pre-flush delayed refs in commit Josef Bacik
2020-12-17 14:35 ` [PATCH v4 3/6] btrfs: delayed refs pre-flushing should only run the heads we have Josef Bacik
2020-12-17 14:36 ` [PATCH v4 4/6] btrfs: only run delayed refs once before committing Josef Bacik
2020-12-17 14:36 ` [PATCH v4 5/6] btrfs: stop running all delayed refs during snapshot Josef Bacik
2020-12-18 9:26 ` Nikolay Borisov [this message]
2020-12-18 15:51 ` Josef Bacik
2020-12-17 14:36 ` [PATCH v4 6/6] btrfs: run delayed refs less often in commit_cowonly_roots Josef Bacik
2020-12-18 9:26 ` Nikolay Borisov
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=346befc5-e425-846f-27c7-ada577dc5a63@suse.com \
--to=nborisov@suse.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.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