From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Josef Bacik <josef@toxicpanda.com>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] btrfs-progs: remove data extents from the free space tree
Date: Wed, 6 Oct 2021 06:59:47 +0800 [thread overview]
Message-ID: <93c1c300-125a-1436-2a87-94b78a5374e8@gmx.com> (raw)
In-Reply-To: <0394a30e2d64f3a418c7f502a967b9add5632577.1633458057.git.josef@toxicpanda.com>
On 2021/10/6 02:21, Josef Bacik wrote:
> Dave reported a failure of mkfs-test 009 with the free space tree
> enabled by default. This is because 009 pre-populates the file system
> with a given directory, and for some reason our data allocation path
> isn't the same as in the kernel.
Mind to share the exact difference between btrfs-progs and kernel?
Just hope we don't miss anything.
Thanks,
Qu
> Fix this by making sure when we
> allocate a data extent we remove the space from the free space tree, and
> with this our mkfs tests now pass.
>
> Issue: #410
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
> kernel-shared/extent-tree.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/kernel-shared/extent-tree.c b/kernel-shared/extent-tree.c
> index 4b79874d..90733d55 100644
> --- a/kernel-shared/extent-tree.c
> +++ b/kernel-shared/extent-tree.c
> @@ -3483,6 +3483,12 @@ static int __btrfs_record_file_extent(struct btrfs_trans_handle *trans,
> } else if (ret != -EEXIST) {
> goto fail;
> }
> +
> + ret = remove_from_free_space_tree(trans, disk_bytenr,
> + num_bytes);
> + if (ret)
> + goto fail;
> +
> btrfs_run_delayed_refs(trans, -1);
> extent_bytenr = disk_bytenr;
> extent_num_bytes = num_bytes;
>
next prev parent reply other threads:[~2021-10-05 22:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-05 18:21 [PATCH] btrfs-progs: remove data extents from the free space tree Josef Bacik
2021-10-05 22:59 ` Qu Wenruo [this message]
2021-10-06 14:37 ` David Sterba
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=93c1c300-125a-1436-2a87-94b78a5374e8@gmx.com \
--to=quwenruo.btrfs@gmx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.