From: Qu Wenruo <wqu@suse.com>
To: Boris Burkov <boris@bur.io>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 3/7] btrfs: record delayed inode root in transaction
Date: Wed, 27 Mar 2024 08:38:53 +1030 [thread overview]
Message-ID: <b88f00db-117e-43b6-ada6-4790c5030417@suse.com> (raw)
In-Reply-To: <cadc31b0278e4e362f71f7c57ebccb0c94af693b.1711488980.git.boris@bur.io>
在 2024/3/27 08:09, Boris Burkov 写道:
> When running delayed inode updates, we do not record the inode's root in
> the transaction, but we do allocate PREALLOC and thus converted PERTRANS
> space for it. To be sure we free that PERTRANS meta rsv, we must ensure
> that we record the root in the transaction.
>
> Fixes: 4f5427ccce5d ("btrfs: delayed-inode: Use new qgroup meta rsv for delayed inode and item")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Just curious, do you have a case that hits this particular bug only?
Thanks,
Qu
> Signed-off-by: Boris Burkov <boris@bur.io>
> ---
> fs/btrfs/delayed-inode.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
> index dd6f566a383f..121ab890bd05 100644
> --- a/fs/btrfs/delayed-inode.c
> +++ b/fs/btrfs/delayed-inode.c
> @@ -1133,6 +1133,9 @@ __btrfs_commit_inode_delayed_items(struct btrfs_trans_handle *trans,
> if (ret)
> return ret;
>
> + ret = btrfs_record_root_in_trans(trans, node->root);
> + if (ret)
> + return ret;
> ret = btrfs_update_delayed_inode(trans, node->root, path, node);
> return ret;
> }
next prev parent reply other threads:[~2024-03-26 22:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 21:39 [PATCH 0/7] btrfs: various qg meta rsv leak fixes Boris Burkov
2024-03-26 21:39 ` [PATCH 1/7] btrfs: correctly model root qgroup rsv in convert Boris Burkov
2024-03-26 22:00 ` Qu Wenruo
2024-03-27 17:20 ` Boris Burkov
2024-03-27 19:35 ` Qu Wenruo
2024-03-26 21:39 ` [PATCH 2/7] btrfs: fix qgroup prealloc rsv leak in subvolume operations Boris Burkov
2024-03-26 22:07 ` Qu Wenruo
2024-03-26 21:39 ` [PATCH 3/7] btrfs: record delayed inode root in transaction Boris Burkov
2024-03-26 22:08 ` Qu Wenruo [this message]
2024-03-27 17:21 ` Boris Burkov
2024-03-26 21:39 ` [PATCH 4/7] btrfs: convert PREALLOC to PERTRANS after record_root_in_trans Boris Burkov
2024-03-26 22:12 ` Qu Wenruo
2024-03-26 21:39 ` [PATCH 5/7] btrfs: free pertrans at end of cleanup_transaction Boris Burkov
2024-03-26 22:16 ` Qu Wenruo
2024-03-27 17:22 ` Boris Burkov
2024-03-27 19:51 ` Qu Wenruo
2024-03-26 21:39 ` [PATCH 6/7] btrfs: btrfs_clear_delalloc_extent frees rsv Boris Burkov
2024-03-26 22:26 ` Qu Wenruo
2024-03-27 17:26 ` Boris Burkov
2024-03-27 19:39 ` Qu Wenruo
2024-03-26 21:39 ` [PATCH 7/7] btrfs: always clear meta pertrans during commit Boris Burkov
2024-03-26 22:20 ` Qu Wenruo
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=b88f00db-117e-43b6-ada6-4790c5030417@suse.com \
--to=wqu@suse.com \
--cc=boris@bur.io \
--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