From: Liu Bo <bo.li.liu@oracle.com>
To: Adam Borowski <kilobyte@angband.pl>
Cc: 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 11:41:56 -0700 [thread overview]
Message-ID: <20170410184155.GC15214@lim.localdomain> (raw)
In-Reply-To: <20170408210737.5456-1-kilobyte@angband.pl>
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@oracle.com>
Thanks,
-liubo
> 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) {
> --
> 2.11.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2017-04-10 18:44 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
2017-04-10 18:41 ` Liu Bo [this message]
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=20170410184155.GC15214@lim.localdomain \
--to=bo.li.liu@oracle.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).