btrfs-progs: receive: fix a silent data loss bug with encoded writes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | btrfs-progs: receive: add debug messages when processing encoded writescmds/ | +11 | 1 reply | |
| 2/3 | btrfs-progs: receive: add debug messages when processing fallocatecmds/ | +5 | 1 reply | |
| 3/3 | btrfs-progs: receive: fix silent data loss after fall back from encoded writecmds/ | +8 | 1 reply |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Boris Burkov |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] btrfs-progs: receive: fix a silent data loss bug with encoded writes
From: Filipe Manana <[email protected]>
When using a v2 stream, with encoded writes, if the receiver fails to perform an encoded write, it fallbacks to decompressing the data and then write it using regular buffered IO. However that logic is currenty buggy, and it can result in writing less data than expected or no data at all. This results in a silent data loss.
Patch 3/3 fixes that bug and has all the details about how/why it happens, while previous patches just added debug messages to the callbacks for encoded writes and fallocate, which are currently missing and are very useful for debugging.
Filipe Manana (3):
btrfs-progs: receive: add debug messages when processing encoded writes
btrfs-progs: receive: add debug messages when processing fallocate
btrfs-progs: receive: fix silent data loss after fall back from encoded write
cmds/receive.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-)
Signature · 1 line
2.35.1