From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Askar Safin <safinaskar@gmail.com>
Cc: linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: Long running ioctl and pm, which should have higher priority?
Date: Fri, 17 Oct 2025 21:13:21 +1030 [thread overview]
Message-ID: <0d2eb0c9-9885-417f-bb0a-d78e5e0d1c23@gmx.com> (raw)
In-Reply-To: <20251017103932.1176085-1-safinaskar@gmail.com>
在 2025/10/17 21:09, Askar Safin 写道:
> Qu Wenruo <quwenruo.btrfs@gmx.com>:
>> But there is a question concerning me, which should have the higher
>> priority? The long running ioctl or pm?
>
> Of course, pm.
>
> I have a huge btrfs fs on a laptop.
>
> I don't want scrub to prevent suspend, even if that suspend is happening
> automatically.
>
>> Furthermore the interruption may be indistinguishable between pm and
>> real user signals (SIGINT etc).
>
> If we interrupted because of signal, ioctl should return EINTR. This is
> what all other syscalls do.
>
> If we were cancelled, we should return ECANCELED.
>
> If we interrupted because of process freeze or fs freeze, then... I
> don't know what we should do in this case, but definitely not ECANCELED
> (because we are not cancelled). EINTR will go, or maybe something else
> (EAGAIN?).
>
> Then, userspace program "btrfs scrub" can resume process if it
> got EINTR. (But this is totally unimportant for me.)
The problem is, dev-replace can not be resumed, but start again from the
very beginning.
As the interrupted dev-replace will remove the to-be-added device.
Scrub it self is more or less fine, just need some extra parameters to
tell scrub to start from certain bytenr.
Thanks,
Qu
>
> Also, please CC me when sending any emails about this scrub/trim bug.
>
next prev parent reply other threads:[~2025-10-17 10:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 21:31 Long running ioctl and pm, which should have higher priority? Qu Wenruo
2025-10-17 10:39 ` Askar Safin
2025-10-17 10:43 ` Qu Wenruo [this message]
2025-10-17 10:46 ` Andrei Borzenkov
2025-10-17 20:51 ` 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=0d2eb0c9-9885-417f-bb0a-d78e5e0d1c23@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=safinaskar@gmail.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