From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Hans van Kranenburg <hans@knorrie.org>, linux-btrfs@vger.kernel.org
Subject: Re: Balance + Ctrl-C = forced readonly
Date: Sun, 5 Jul 2020 21:13:34 +0800 [thread overview]
Message-ID: <131421c2-1c2a-4b1b-8885-a8700992a77d@gmx.com> (raw)
In-Reply-To: <42c9515d-7913-e768-84b1-d5222a0ca17d@knorrie.org>
[-- Attachment #1.1: Type: text/plain, Size: 2032 bytes --]
On 2020/7/5 下午8:49, Hans van Kranenburg wrote:
> Hi,
>
> This is Linux kernel 5.7.6 (the Debian package, 5.7.6-1).
>
> So, I wanted to try out this new quicker balance interrupt thing, and
> the result was that I could crash the fs at my very first try using it,
> which was simply doing balance, and then pressing Ctrl-C.
>
> Recipe to reproduce: Start balance, wait a few seconds, then press
> Ctrl-C. For me here, ~ 5 out of 10 times, it ends up exploding:
>
> -# btrfs balance start --full /btrfs/
> ^C
>
> [41190.572977] BTRFS info (device xvdb): balance: start -d -m -s
> [41190.573035] BTRFS info (device xvdb): relocating block group
> 73001861120 flags metadata
> [41205.409600] BTRFS info (device xvdb): found 12236 extents, stage:
> move data extents
> [41205.509316] BTRFS info (device xvdb): relocating block group
> 71928119296 flags data
> [41205.695319] BTRFS info (device xvdb): found 3 extents, stage: move
> data extents
> [41205.723009] BTRFS info (device xvdb): found 3 extents, stage: update
> data pointers
> [41205.750590] BTRFS info (device xvdb): relocating block group
> 60922265600 flags metadata
> [41208.183424] BTRFS: error (device xvdb) in btrfs_drop_snapshot:5505:
> errno=-4 unknown
-4 means -EINTR.
It means during btrfs balance, signal could interrupt code running in
kernel space??!!
I thought when we fall into the balance ioctl, we're unable to
receive/handle signal, as we are in the kernel space, while signal
handling are all handled in user space.
Or is there some config or out-of-tree patches make it possible? Is this
specific to Debian kernels?
At least I tried several times with upstream kernel, unable to reproduce
it yet (maybe my fs is too small?)
If it's config related, then we must re-consider a lot of error handling.
Thanks,
Qu
> [41208.183450] BTRFS info (device xvdb): forced readonly
> [41208.183469] BTRFS info (device xvdb): balance: ended with status: -4
>
> Boom, readonly FS.
>
> Hans
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-07-05 13:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-05 12:49 Balance + Ctrl-C = forced readonly Hans van Kranenburg
2020-07-05 13:13 ` Qu Wenruo [this message]
2020-07-05 14:53 ` Hans van Kranenburg
2020-07-06 6:15 ` Qu Wenruo
2020-07-06 7:48 ` Qu Wenruo
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=131421c2-1c2a-4b1b-8885-a8700992a77d@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=hans@knorrie.org \
--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