From: Boris Burkov <boris@bur.io>
To: Josef Bacik <josef@toxicpanda.com>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 03/10] btrfs: add a comment for new_bytenr in bacref_cache_node
Date: Thu, 3 Oct 2024 14:34:01 -0700 [thread overview]
Message-ID: <20241003213401.GC435178@zen.localdomain> (raw)
In-Reply-To: <822af146718551c3f2ba248ba9df9092ba022160.1727970063.git.josef@toxicpanda.com>
On Thu, Oct 03, 2024 at 11:43:05AM -0400, Josef Bacik wrote:
s/bacref/backref/
in the commit title
> Add a comment for this field so we know what it is used for. Previously
> we used it to update the backref cache, so people may mistakenly think
> it is useless, but in fact exists to make sure the backref cache makes
> sense.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
> fs/btrfs/backref.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/fs/btrfs/backref.h b/fs/btrfs/backref.h
> index a810253d7b8a..754c71bdc9ce 100644
> --- a/fs/btrfs/backref.h
> +++ b/fs/btrfs/backref.h
> @@ -318,6 +318,12 @@ struct btrfs_backref_node {
> u64 bytenr;
> }; /* Use rb_simple_node for search/insert */
>
> + /*
> + * This is a sanity check, whenever we cow a block we will update
> + * new_bytenr with it's current location, and we will check this in
> + * various places to validate that the cache makes sense, it shouldn't
> + * be used for anything else.
> + */
> u64 new_bytenr;
> /* Objectid of tree block owner, can be not uptodate */
> u64 owner;
> --
> 2.43.0
>
next prev parent reply other threads:[~2024-10-03 21:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 15:43 [PATCH 00/10] btrfs: backref cache cleanups Josef Bacik
2024-10-03 15:43 ` [PATCH 01/10] btrfs: convert BUG_ON in btrfs_reloc_cow_block to proper error handling Josef Bacik
2024-10-08 17:29 ` David Sterba
2024-10-03 15:43 ` [PATCH 02/10] btrfs: remove the changed list for backref cache Josef Bacik
2024-10-03 15:43 ` [PATCH 03/10] btrfs: add a comment for new_bytenr in bacref_cache_node Josef Bacik
2024-10-03 21:34 ` Boris Burkov [this message]
2024-10-03 15:43 ` [PATCH 04/10] btrfs: cleanup select_reloc_root Josef Bacik
2024-10-03 21:27 ` Boris Burkov
2024-10-03 15:43 ` [PATCH 05/10] btrfs: remove clone_backref_node Josef Bacik
2024-10-03 15:43 ` [PATCH 06/10] btrfs: don't build backref tree for cowonly blocks Josef Bacik
2024-10-03 21:36 ` Boris Burkov
2024-10-03 15:43 ` [PATCH 07/10] btrfs: do not handle non-shareable roots in backref cache Josef Bacik
2024-10-03 15:43 ` [PATCH 08/10] btrfs: simplify btrfs_backref_release_cache Josef Bacik
2024-10-03 15:43 ` [PATCH 09/10] btrfs: remove the ->lowest and ->leaves members from backref cache Josef Bacik
2024-10-03 15:43 ` [PATCH 10/10] btrfs: remove detached list from btrfs_backref_cache Josef Bacik
2024-10-03 21:39 ` [PATCH 00/10] btrfs: backref cache cleanups Boris Burkov
2024-12-06 19:38 ` David Sterba
2024-12-09 14:01 ` Josef Bacik
2024-12-10 23:24 ` 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=20241003213401.GC435178@zen.localdomain \
--to=boris@bur.io \
--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;
as well as URLs for NNTP newsgroup(s).