From: Anand Jain <anand.jain@oracle.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org, dsterba@suse.cz
Subject: Re: [PATCH 3/3] btrfs: Refactor parameter of BTRFS_MAX_DEVS() from root to fs_info
Date: Tue, 30 Jan 2018 16:18:33 +0800 [thread overview]
Message-ID: <3eea6611-ebf2-1175-7f1e-e992aeb567ba@oracle.com> (raw)
In-Reply-To: <20180130074039.24987-3-wqu@suse.com>
On 01/30/2018 03:40 PM, Qu Wenruo wrote:
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Thanks, Anand
> ---
> fs/btrfs/volumes.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index d818b1f9c625..215e85e22c8e 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -4581,7 +4581,7 @@ static void check_raid56_incompat_flag(struct btrfs_fs_info *info, u64 type)
> btrfs_set_fs_incompat(info, RAID56);
> }
>
> -#define BTRFS_MAX_DEVS(r) ((BTRFS_MAX_ITEM_SIZE(r->fs_info) \
> +#define BTRFS_MAX_DEVS(info) ((BTRFS_MAX_ITEM_SIZE(info) \
> - sizeof(struct btrfs_chunk)) \
> / sizeof(struct btrfs_stripe) + 1)
>
> @@ -4638,7 +4638,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
> max_stripe_size = SZ_1G;
> max_chunk_size = 10 * max_stripe_size;
> if (!devs_max)
> - devs_max = BTRFS_MAX_DEVS(info->chunk_root);
> + devs_max = BTRFS_MAX_DEVS(info);
> } else if (type & BTRFS_BLOCK_GROUP_METADATA) {
> /* for larger filesystems, use larger metadata chunks */
> if (fs_devices->total_rw_bytes > 50ULL * SZ_1G)
> @@ -4647,7 +4647,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
> max_stripe_size = SZ_256M;
> max_chunk_size = max_stripe_size;
> if (!devs_max)
> - devs_max = BTRFS_MAX_DEVS(info->chunk_root);
> + devs_max = BTRFS_MAX_DEVS(info);
> } else if (type & BTRFS_BLOCK_GROUP_SYSTEM) {
> max_stripe_size = SZ_32M;
> max_chunk_size = 2 * max_stripe_size;
>
next prev parent reply other threads:[~2018-01-30 8:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-30 7:40 [PATCH 1/3] btrfs: Refactor __get_raid_index() to btrfs_bg_flags_to_raid_index() Qu Wenruo
2018-01-30 7:40 ` [PATCH 2/3] btrfs: Unexport get_block_group_index() Qu Wenruo
2018-01-30 8:14 ` Anand Jain
2018-01-30 8:18 ` Nikolay Borisov
2018-01-30 9:59 ` Qu Wenruo
2018-01-30 7:40 ` [PATCH 3/3] btrfs: Refactor parameter of BTRFS_MAX_DEVS() from root to fs_info Qu Wenruo
2018-01-30 8:18 ` Anand Jain [this message]
2018-01-30 8:22 ` Nikolay Borisov
2018-01-30 8:14 ` [PATCH 1/3] btrfs: Refactor __get_raid_index() to btrfs_bg_flags_to_raid_index() Anand Jain
2018-01-30 8:16 ` Nikolay Borisov
2018-01-30 10:05 ` Qu Wenruo
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=3eea6611-ebf2-1175-7f1e-e992aeb567ba@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@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;
as well as URLs for NNTP newsgroup(s).