From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Adam Borowski <kilobyte@angband.pl>, Chris Mason <clm@fb.com>,
Josef Bacik <jbacik@fb.com>, David Sterba <dsterba@suse.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org,
Icenowy Zheng <icenowy@aosc.io>,
Fabio Estevam <festevam@gmail.com>
Subject: Re: [PATCH] btrfs: scrub: use do_div() for 64-by-32 division
Date: Mon, 10 Apr 2017 08:50:37 -0400 [thread overview]
Message-ID: <7179b0c7-0951-b5f3-6835-2f005ea743e1@gmail.com> (raw)
In-Reply-To: <20170408210737.5456-1-kilobyte@angband.pl>
On 2017-04-08 17:07, Adam Borowski wrote:
> Unbreaks ARM and possibly other 32-bit architectures.
>
> Fixes: 7d0ef8b4d: Btrfs: update scrub_parity to use u64 stripe_len
> Reported-by: Icenowy Zheng <icenowy@aosc.io>
> Signed-off-by: Adam Borowski <kilobyte@angband.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) {
>
Also fixes things on:
32-bit MIPS (eb and el variants)
32-bit SPARC
32-bit PPC
You can add my Tested-by if you want.
next prev parent reply other threads:[~2017-04-10 12:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-08 16:02 Linux next-20170407 failed to build on ARM due to usage of mod in btrfs code Icenowy Zheng
2017-04-08 17:45 ` Fabio Estevam
2017-04-08 18:38 ` Adam Borowski
2017-04-08 21:07 ` [PATCH] btrfs: scrub: use do_div() for 64-by-32 division Adam Borowski
2017-04-09 3:58 ` Adam Borowski
2017-04-10 1:13 ` Adam Borowski
2017-04-10 11:13 ` David Sterba
2017-04-10 12:50 ` Austin S. Hemmelgarn [this message]
2017-04-10 18:41 ` Liu Bo
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=7179b0c7-0951-b5f3-6835-2f005ea743e1@gmail.com \
--to=ahferroin7@gmail.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=festevam@gmail.com \
--cc=icenowy@aosc.io \
--cc=jbacik@fb.com \
--cc=kilobyte@angband.pl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).