From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: linux@treblig.org, clm@fb.com, josef@toxicpanda.com,
dsterba@suse.com, hch@lst.de
Cc: rostedt@goodmis.org, mhiramat@kernel.org,
mathieu.desnoyers@efficios.com, linux-btrfs@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] btrfs: Remove unused btrfs_is_parity_mirror
Date: Fri, 4 Oct 2024 06:41:02 +0930 [thread overview]
Message-ID: <aa56f811-4b80-4df6-92c5-c4f44f73f0f4@gmx.com> (raw)
In-Reply-To: <20241003142727.203981-1-linux@treblig.org>
在 2024/10/3 23:57, linux@treblig.org 写道:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> btrfs_is_parity_mirror() has been unused since commit
> 4886ff7b50f6 ("btrfs: introduce a new helper to submit write bio for repair")
>
> Remove it.
>
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
> ---
> fs/btrfs/volumes.c | 18 ------------------
> fs/btrfs/volumes.h | 2 --
> 2 files changed, 20 deletions(-)
>
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index 8f340ad1d938..7453b4999263 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -5841,24 +5841,6 @@ unsigned long btrfs_full_stripe_len(struct btrfs_fs_info *fs_info,
> return len;
> }
>
> -int btrfs_is_parity_mirror(struct btrfs_fs_info *fs_info, u64 logical, u64 len)
> -{
> - struct btrfs_chunk_map *map;
> - int ret = 0;
> -
> - if (!btrfs_fs_incompat(fs_info, RAID56))
> - return 0;
> -
> - map = btrfs_get_chunk_map(fs_info, logical, len);
> -
> - if (!WARN_ON(IS_ERR(map))) {
> - if (map->type & BTRFS_BLOCK_GROUP_RAID56_MASK)
> - ret = 1;
> - btrfs_free_chunk_map(map);
> - }
> - return ret;
> -}
> -
> static int find_live_mirror(struct btrfs_fs_info *fs_info,
> struct btrfs_chunk_map *map, int first,
> int dev_replace_is_ongoing)
> diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
> index 03d2d60afe0c..715af107ea5d 100644
> --- a/fs/btrfs/volumes.h
> +++ b/fs/btrfs/volumes.h
> @@ -735,8 +735,6 @@ int btrfs_run_dev_stats(struct btrfs_trans_handle *trans);
> void btrfs_rm_dev_replace_remove_srcdev(struct btrfs_device *srcdev);
> void btrfs_rm_dev_replace_free_srcdev(struct btrfs_device *srcdev);
> void btrfs_destroy_dev_replace_tgtdev(struct btrfs_device *tgtdev);
> -int btrfs_is_parity_mirror(struct btrfs_fs_info *fs_info,
> - u64 logical, u64 len);
> unsigned long btrfs_full_stripe_len(struct btrfs_fs_info *fs_info,
> u64 logical);
> u64 btrfs_calc_stripe_length(const struct btrfs_chunk_map *map);
prev parent reply other threads:[~2024-10-03 21:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 14:27 [PATCH] btrfs: Remove unused btrfs_is_parity_mirror linux
2024-10-03 14:27 ` [PATCH] btrfs: Remove unused btrfs_try_tree_write_lock linux
2024-10-03 14:36 ` Christoph Hellwig
2024-10-03 21:11 ` Qu Wenruo
2024-10-03 21:11 ` Qu Wenruo [this message]
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=aa56f811-4b80-4df6-92c5-c4f44f73f0f4@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=hch@lst.de \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@treblig.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.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).