btrfs: do not commit transaction to avoid deadly ENOSPC trap
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs: do not commit transaction after adding one devicefs/ | +2 | 0 replies | |
| 2/2 | btrfs: do not commit transaction canceling a suspended replacefs/ | +0 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] btrfs: do not commit transaction to avoid deadly ENOSPC trap
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(-)
Signature · 1 line
2.41.0