All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 1/2] btrfs-progs: unexport csum_tree_block()
Date: Tue, 13 Sep 2022 15:19:25 +0800	[thread overview]
Message-ID: <2e7fa0afb6a4788de55bb1c4067dbfb41a4d96b8.1663053391.git.wqu@suse.com> (raw)
In-Reply-To: <cover.1663053391.git.wqu@suse.com>

The function csum_tree_block() is not really utilized by anyone, all
current callers just use csum_tree_block_size().

Furthermore there is a stale definition in common/utils.h which is using
the old "struct btrfs_root" as the first argument, while we have already
migrated to "struct btrfs_fs_info".

So just unexport csum_tree_block() and remove the stale definition.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 common/utils.h          | 2 --
 kernel-shared/disk-io.c | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/common/utils.h b/common/utils.h
index ea05fe5b21fe..f6cdb7f4dc70 100644
--- a/common/utils.h
+++ b/common/utils.h
@@ -61,8 +61,6 @@ int set_label(const char *btrfs_dev, const char *label);
 int check_arg_type(const char *input);
 int get_label_mounted(const char *mount_path, char *labelp);
 int get_label_unmounted(const char *dev, char *label);
-int csum_tree_block(struct btrfs_fs_info *root, struct extent_buffer *buf,
-		    int verify);
 int ask_user(const char *question);
 int lookup_path_rootid(int fd, u64 *rootid);
 int find_mount_fsroot(const char *subvol, const char *subvolid, char **mount);
diff --git a/kernel-shared/disk-io.c b/kernel-shared/disk-io.c
index 2701c464cbfc..857280cc7cb7 100644
--- a/kernel-shared/disk-io.c
+++ b/kernel-shared/disk-io.c
@@ -208,8 +208,8 @@ int verify_tree_block_csum_silent(struct extent_buffer *buf, u16 csum_size,
 	return __csum_tree_block_size(buf, csum_size, 1, 1, csum_type);
 }
 
-int csum_tree_block(struct btrfs_fs_info *fs_info,
-		    struct extent_buffer *buf, int verify)
+static int csum_tree_block(struct btrfs_fs_info *fs_info,
+			   struct extent_buffer *buf, int verify)
 {
 	u16 csum_size = fs_info->csum_size;
 	u16 csum_type = fs_info->csum_type;
-- 
2.37.3


  reply	other threads:[~2022-09-13  7:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13  7:19 [PATCH 0/2] btrfs-progs: make corrupt-block metadata geneartion corruption work again Qu Wenruo
2022-09-13  7:19 ` Qu Wenruo [this message]
2022-09-13  7:19 ` [PATCH 2/2] btrfs-progs: corrupt-block: re-generate the checksum for generation corruption Qu Wenruo
2022-09-15 14:34 ` [PATCH 0/2] btrfs-progs: make corrupt-block metadata geneartion corruption work again 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=2e7fa0afb6a4788de55bb1c4067dbfb41a4d96b8.1663053391.git.wqu@suse.com \
    --to=wqu@suse.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.