From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/2] btrfs: do not commit transaction to avoid deadly ENOSPC trap
Date: Thu, 27 Jul 2023 14:07:52 +0800 [thread overview]
Message-ID: <cover.1690437675.git.wqu@suse.com> (raw)
There is a report that a user hits a deadly ENOSPC trap, where the fs
would immediately falls read-only when commit any transaction.
To make the case worse, the fs is using RAID1C4 (later converted to
RAID1C3), this makes it impossible to add any extra disks.
As the kernel would commit the current transaction after just adding the
first device, while RAID1C4 needs 4 new disks, this would still trigger
ENOSPC during transaction committing.
The first patch would address the problem by not committing the
transaction adding a new device.
This would cause a behavior change, would need to co-operate with
btrfs-progs to allow end users to determine if they want to sync the fs
after adding all devices.
The second patch is to address a rare corner case hit by the same
reporter, that canceling a suspended replace would also trigger the
deadly ENOSPC trap.
Qu Wenruo (2):
btrfs: do not commit transaction after adding one device
btrfs: do not commit transaction canceling a suspended replace
fs/btrfs/dev-replace.c | 10 ----------
fs/btrfs/volumes.c | 12 ++----------
2 files changed, 2 insertions(+), 20 deletions(-)
--
2.41.0
next reply other threads:[~2023-07-27 6:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 6:07 Qu Wenruo [this message]
2023-07-27 6:07 ` [PATCH 1/2] btrfs: do not commit transaction after adding one device Qu Wenruo
2023-07-27 6:07 ` [PATCH 2/2] btrfs: do not commit transaction canceling a suspended replace Qu Wenruo
2023-07-27 12:09 ` David Sterba
2023-07-27 22:26 ` 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=cover.1690437675.git.wqu@suse.com \
--to=wqu@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.