From: Qu Wenruo <wqu@suse.com>
To: Chris Murphy <lists@colorremedies.com>,
Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: 6.17rc5: btrfs scrub, Freezing user space processes failed
Date: Tue, 16 Sep 2025 09:07:30 +0930 [thread overview]
Message-ID: <3e4242b6-7348-44d6-9346-e95095a3a070@suse.com> (raw)
In-Reply-To: <dcb5d446-adaa-4a6c-b212-619d286d01ad@app.fastmail.com>
在 2025/9/16 08:46, Chris Murphy 写道:
> The storage stack may be relevant: USB flash drive -> dm-crypt -> Btrfs
And for your original report of no response, the problem is since btrfs
is blocking the suspension, there should be no extra reason why the
system hangs.
Unless there are other corner cases like the USB device is powered off.
If you can reproduce the bug, please catch the dying message using
something like netconsole.
>
> Darrick Wong notes that in https://elixir.bootlin.com/linux/v6.15/source/fs/btrfs/ioctl.c#L3159
>
> btrfs_ioctl_scrub calls mnt_want_write_file for the duration of the scrub, and mnt_want_write_file takes SB_FREEZE_WRITE and holds that all the way to the end, which means you can't fsfreeze the filesystem
Yes, that's already a known problem and both David and I were working on
this in the past:
https://lore.kernel.org/linux-btrfs/9606fae20bff6c1fbe14dc7b067f3b333c2a955b.1751847905.git.wqu@suse.com/
https://lore.kernel.org/linux-btrfs/20250708132540.28285-1-dsterba@suse.com/
My solution is to cancel scrub which is the simplest solution.
David's solution is pause scrub/balance using extra callbacks and a more
complex mechanism.
Thanks,
Qu
>
> So how did this ever work? Folks do use btrfsmaintenance with scrub and trim timers, and a laptop can sleep at any time. We can't inhibit this indefinitely.
>
> Perhaps scrub and balance can be paused if pm suspend/hibernate is requested? Just make it a non-factor.
>
> Chris Murphy
>
next prev parent reply other threads:[~2025-09-15 23:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-13 21:57 6.17rc5: btrfs scrub, Freezing user space processes failed Chris Murphy
2025-09-15 23:16 ` Chris Murphy
2025-09-15 23:37 ` Qu Wenruo [this message]
2025-09-15 23:51 ` Chris Murphy
2025-10-12 8:52 ` Askar Safin
2025-10-12 22:10 ` Chris Murphy
2025-10-16 22:15 ` Chris Murphy
2025-10-17 11:01 ` Askar Safin
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=3e4242b6-7348-44d6-9346-e95095a3a070@suse.com \
--to=wqu@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
/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