From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Nikolay Borisov <nborisov@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/3] btrfs-progs: Remove type argument from btrfs_alloc_data_chunk
Date: Wed, 30 Oct 2019 20:42:40 +0800 [thread overview]
Message-ID: <3f7170f4-ee07-f77c-bc15-2c3f611fab65@gmx.com> (raw)
In-Reply-To: <20191030122227.28496-3-nborisov@suse.com>
On 2019/10/30 下午8:22, Nikolay Borisov wrote:
> It's always set to BTRFS_BLOCK_GROUP_DATA so sink it into the function.
>
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
> ---
> convert/main.c | 3 +--
> volumes.c | 6 +++---
> volumes.h | 2 +-
> 3 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/convert/main.c b/convert/main.c
> index bb689be9f3e4..9904deafba45 100644
> --- a/convert/main.c
> +++ b/convert/main.c
> @@ -943,8 +943,7 @@ static int make_convert_data_block_groups(struct btrfs_trans_handle *trans,
> len = min(max_chunk_size,
> cache->start + cache->size - cur);
> ret = btrfs_alloc_data_chunk(trans, fs_info,
> - &cur_backup, len,
> - BTRFS_BLOCK_GROUP_DATA, 1);
> + &cur_backup, len, 1);
> if (ret < 0)
> break;
> ret = btrfs_make_block_group(trans, fs_info, 0,
> diff --git a/volumes.c b/volumes.c
> index 1d088d93e788..87315a884b49 100644
> --- a/volumes.c
> +++ b/volumes.c
> @@ -1245,7 +1245,7 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
> */
> int btrfs_alloc_data_chunk(struct btrfs_trans_handle *trans,
> struct btrfs_fs_info *info, u64 *start,
> - u64 num_bytes, u64 type, int convert)
> + u64 num_bytes, int convert)
> {
> u64 dev_offset;
> struct btrfs_root *extent_root = info->extent_root;
> @@ -1328,7 +1328,7 @@ int btrfs_alloc_data_chunk(struct btrfs_trans_handle *trans,
> btrfs_set_stack_chunk_length(chunk, num_bytes);
> btrfs_set_stack_chunk_owner(chunk, extent_root->root_key.objectid);
> btrfs_set_stack_chunk_stripe_len(chunk, stripe_len);
> - btrfs_set_stack_chunk_type(chunk, type);
> + btrfs_set_stack_chunk_type(chunk, BTRFS_BLOCK_GROUP_DATA);
> btrfs_set_stack_chunk_num_stripes(chunk, num_stripes);
> btrfs_set_stack_chunk_io_align(chunk, stripe_len);
> btrfs_set_stack_chunk_io_width(chunk, stripe_len);
> @@ -1338,7 +1338,7 @@ int btrfs_alloc_data_chunk(struct btrfs_trans_handle *trans,
> map->stripe_len = stripe_len;
> map->io_align = stripe_len;
> map->io_width = stripe_len;
> - map->type = type;
> + map->type = BTRFS_BLOCK_GROUP_DATA;
> map->num_stripes = num_stripes;
> map->sub_stripes = sub_stripes;
>
> diff --git a/volumes.h b/volumes.h
> index 586588c871ab..83ba827e422b 100644
> --- a/volumes.h
> +++ b/volumes.h
> @@ -272,7 +272,7 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
> u64 *num_bytes, u64 type);
> int btrfs_alloc_data_chunk(struct btrfs_trans_handle *trans,
> struct btrfs_fs_info *fs_info, u64 *start,
> - u64 num_bytes, u64 type, int convert);
> + u64 num_bytes, int convert);
> int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
> int flags);
> int btrfs_close_devices(struct btrfs_fs_devices *fs_devices);
>
next prev parent reply other threads:[~2019-10-30 12:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 12:22 [PATCH 0/3] Misc btrfs-progs fixes Nikolay Borisov
2019-10-30 12:22 ` [PATCH 1/3] btrfs-progs: Initialize sub_stripes to 1 in btrfs_alloc_data_chunk Nikolay Borisov
2019-10-30 12:42 ` Qu Wenruo
2019-10-30 12:22 ` [PATCH 2/3] btrfs-progs: Remove type argument from btrfs_alloc_data_chunk Nikolay Borisov
2019-10-30 12:42 ` Qu Wenruo [this message]
2019-10-30 12:22 ` [PATCH 3/3] btrfs-progs: Remove convert param " Nikolay Borisov
2019-10-30 12:45 ` Qu Wenruo
2019-11-15 12:22 ` [PATCH 0/3] Misc btrfs-progs fixes 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=3f7170f4-ee07-f77c-bc15-2c3f611fab65@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
/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