[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d8b529f2-fce3-829a-c157-77d574619daf@knorrie.org>
Date: Wed, 20 Nov 2019 16:56:28 +0100
From: Hans van Kranenburg <hans@...rrie.org>
To: Ben Hutchings <ben@...adent.org.uk>, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Cc: akpm@...ux-foundation.org, Denis Kirjanov <kda@...ux-powerpc.org>
Subject: Re: [PATCH 3.16 81/83] btrfs: partially apply b8b93addde
On 11/20/19 4:38 PM, Ben Hutchings wrote:
> 3.16.78-rc1 review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Hans van Kranenburg <hans@...rrie.org>
Thanks for picking this up!
Can you please use my work email, lowercase
hans.van.kranenburg@...dix.com
for this one and for the Cc: line in the second one from Qu?
Thanks,
Hans
>
> Extracted from commit b8b93addde "btrfs: cleanup 64bit/32bit divs,
> provably bounded values", to allow commits 793ff2c88c6 "btrfs:
> volumes: Cleanup stripe size calculation" and baf92114c7 "btrfs:
> alloc_chunk: fix more DUP stripe size handling" to apply cleanly.
>
> [bwh: Add patch description]
> Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
> ---
> fs/btrfs/volumes.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index 4aa1a20fc5d7..b4b98a75ca8b 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -4274,8 +4274,8 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
> */
> if (stripe_size * data_stripes > max_chunk_size) {
> u64 mask = (1ULL << 24) - 1;
> - stripe_size = max_chunk_size;
> - do_div(stripe_size, data_stripes);
> +
> + stripe_size = div_u64(max_chunk_size, data_stripes);
>
> /* bump the answer up to a 16MB boundary */
> stripe_size = (stripe_size + mask) & ~mask;
>
Powered by blists - more mailing lists