From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
To: Josef Bacik <josef@toxicpanda.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: fix balance convert to single on 32-bit host CPUs
Date: Sat, 14 Sep 2019 00:59:43 -0400 [thread overview]
Message-ID: <20190914045943.GO22121@hungrycats.org> (raw)
In-Reply-To: <20190913161408.fs3i4apgrcmajmev@macbook-pro-91.dhcp.thefacebook.com>
[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]
On Fri, Sep 13, 2019 at 09:14:08AM -0700, Josef Bacik wrote:
> On Thu, Sep 12, 2019 at 07:55:01PM -0400, Zygo Blaxell wrote:
> > Currently, the command:
> >
> > btrfs balance start -dconvert=single,soft .
> >
> > on a Raspberry Pi produces the following kernel message:
> >
> > BTRFS error (device mmcblk0p2): balance: invalid convert data profile single
> >
> > This fails because we use is_power_of_2(unsigned long) to validate
> > the new data profile, the constant for 'single' profile uses bit 48,
> > and there are only 32 bits in a long on ARM.
> >
> > Fix by open-coding the check using u64 variables.
> >
> > Tested by completing the original balance command on several Raspberry
> > Pis.
> >
> > Signed-off-by: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
>
> Honestly I'd rather we fixed is_power_of_2 to work on 32bit, that way any other
> users don't get bitten by the same problem. Thanks,
is_power_of_2 doesn't live in the btrfs tree. I considered modifying it,
but worried about side-effects elsewhere (i.e. breaking some other 32-bit
device I've never heard of).
What do you think about using the IS_ALIGNED macro?
> Josef
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2019-09-14 4:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-12 23:55 [PATCH] btrfs: fix balance convert to single on 32-bit host CPUs Zygo Blaxell
2019-09-13 8:24 ` Johannes Thumshirn
2019-09-14 4:59 ` Zygo Blaxell
2019-09-16 7:44 ` Johannes Thumshirn
2019-09-13 16:14 ` Josef Bacik
2019-09-14 4:59 ` Zygo Blaxell [this message]
2019-09-14 9:20 ` Nikolay Borisov
2019-09-23 15:14 ` David Sterba
2019-10-01 17:36 ` David Sterba
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=20190914045943.GO22121@hungrycats.org \
--to=ce3g8jdj@umail.furryterror.org \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@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