All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH v2 16/18] btrfs-progs: don't use btrfs_header_csum helper
Date: Tue, 15 Nov 2022 10:31:25 -0500	[thread overview]
Message-ID: <20f12498a1c9d97585235c336205dcf74b414d8f.1668526161.git.josef@toxicpanda.com> (raw)
In-Reply-To: <cover.1668526161.git.josef@toxicpanda.com>

This is a useless helper, the csum is always the first thing in the
header, simply read from offset 0.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 cmds/rescue-chunk-recover.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cmds/rescue-chunk-recover.c b/cmds/rescue-chunk-recover.c
index 460a7f2f..e6f2b80e 100644
--- a/cmds/rescue-chunk-recover.c
+++ b/cmds/rescue-chunk-recover.c
@@ -94,8 +94,7 @@ static struct extent_record *btrfs_new_extent_record(struct extent_buffer *eb)
 	rec->cache.start = btrfs_header_bytenr(eb);
 	rec->cache.size = eb->len;
 	rec->generation = btrfs_header_generation(eb);
-	read_extent_buffer(eb, rec->csum, (unsigned long)btrfs_header_csum(eb),
-			   BTRFS_CSUM_SIZE);
+	read_extent_buffer(eb, rec->csum, 0, BTRFS_CSUM_SIZE);
 	return rec;
 }
 
-- 
2.26.3


  parent reply	other threads:[~2022-11-15 15:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-15 15:31 [PATCH v2 00/18] btrfs-progs: prep and initial sync of kernel code Josef Bacik
2022-11-15 15:31 ` [PATCH v2 01/18] btrfs-progs: turn on more compiler warnings and use -Wall Josef Bacik
2022-11-15 15:31 ` [PATCH v2 02/18] btrfs-progs: properly test for send_stream_version Josef Bacik
2022-11-15 15:31 ` [PATCH v2 03/18] btrfs-progs: use -std=gnu11 Josef Bacik
2022-11-15 15:31 ` [PATCH v2 04/18] btrfs-progs: move btrfs_err_str into common/utils.h Josef Bacik
2022-11-15 15:31 ` [PATCH v2 05/18] btrfs-progs: rename qgroup items to match the kernel naming scheme Josef Bacik
2022-11-15 15:31 ` [PATCH v2 06/18] btrfs-progs: make btrfs_qgroup_level helper match the kernel Josef Bacik
2022-11-15 15:31 ` [PATCH v2 07/18] btrfs-progs: move NO_RESULT definition into replace.c Josef Bacik
2022-11-15 15:31 ` [PATCH v2 08/18] btrfs-progs: rename BLOCK_* to IMAGE_BLOCK_* for metadump Josef Bacik
2022-11-15 15:31 ` [PATCH v2 09/18] btrfs-progs: rename btrfs_item_end to btrfs_item_data_end Josef Bacik
2022-11-15 15:31 ` [PATCH v2 10/18] btrfs-progs: sync uapi/btrfs.h into btrfs-progs Josef Bacik
2022-11-15 15:31 ` [PATCH v2 11/18] btrfs: stop using btrfs_root_item_v0 Josef Bacik
2022-11-15 15:31 ` [PATCH v2 12/18] btrfs-progs: sync ondisk definitions from the kernel Josef Bacik
2022-11-15 15:31 ` [PATCH v2 13/18] btrfs-progs: sync compression.h " Josef Bacik
2022-11-15 15:31 ` [PATCH v2 14/18] btrfs-progs: sync messages.* " Josef Bacik
2022-11-15 15:31 ` [PATCH v2 15/18] btrfs-progs: replace btrfs_leaf_data with btrfs_item_nr_offset Josef Bacik
2022-11-15 15:31 ` Josef Bacik [this message]
2022-11-15 15:31 ` [PATCH v2 17/18] btrfs-progs: make write_extent_buffer take a const eb Josef Bacik
2022-11-15 15:31 ` [PATCH v2 18/18] btrfs-progs: sync accessors.[ch] from the kernel Josef Bacik

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=20f12498a1c9d97585235c336205dcf74b414d8f.1668526161.git.josef@toxicpanda.com \
    --to=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.