Skip to content

btrfs: do not commit transaction to avoid deadly ENOSPC trap

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: do not commit transaction after adding one devicefs/btrfs/volumes.c+2 -100 replies
2/2btrfs: do not commit transaction canceling a suspended replacefs/btrfs/dev-replace.c+0 -102 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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