[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170410184155.GC15214@lim.localdomain>
Date: Mon, 10 Apr 2017 11:41:56 -0700
From: Liu Bo <bo.li.liu@...cle.com>
To: Adam Borowski <kilobyte@...band.pl>
Cc: Chris Mason <clm@...com>, Josef Bacik <jbacik@...com>,
David Sterba <dsterba@...e.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-btrfs@...r.kernel.org, Icenowy Zheng <icenowy@...c.io>,
Fabio Estevam <festevam@...il.com>
Subject: Re: [PATCH] btrfs: scrub: use do_div() for 64-by-32 division
On Sat, Apr 08, 2017 at 11:07:37PM +0200, Adam Borowski wrote:
> Unbreaks ARM and possibly other 32-bit architectures.
>
Thanks a lot for the fix.
Reviewed-by: Liu Bo <bo.li.liu@...cle.com>
Thanks,
-liubo
> Fixes: 7d0ef8b4d: Btrfs: update scrub_parity to use u64 stripe_len
> Reported-by: Icenowy Zheng <icenowy@...c.io>
> Signed-off-by: Adam Borowski <kilobyte@...band.pl>
> ---
> You'd probably want to squash this with Liu's commit, to be nice to future
> bisects.
>
> Tested on amd64 where all is fine, and on arm (Odroid-U2) where scrub
> sometimes works, but, like most operations, randomly dies with some badness
> that doesn't look related: io_schedule, kunmap_high. That badness wasn't
> there in 4.11-rc5, needs investigating, but since it's not connected to our
> issue at hand, I consider this patch sort-of tested.
>
> fs/btrfs/scrub.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
> index b6fe1cd08048..95372e3679f3 100644
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -2407,7 +2407,7 @@ static inline void __scrub_mark_bitmap(struct scrub_parity *sparity,
>
> start -= sparity->logic_start;
> start = div64_u64_rem(start, sparity->stripe_len, &offset);
> - offset /= sectorsize;
> + do_div(offset, sectorsize);
> nsectors = (int)len / sectorsize;
>
> if (offset + nsectors <= sparity->nsectors) {
> --
> 2.11.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists