btrfs: raid56: minor fixes to rmw_rbio()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs: fix racy bio_list changes for failed RMW rbiofs/ | +20 | 0 replies | |
| 2/2 | btrfs: don't cache rbio if an error is hitfs/ | +3 | 0 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Filipe Manana |
|---|---|
| Series | R-b |
| 1/2 | |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] btrfs: raid56: minor fixes to rmw_rbio()
I was checking the bio_list_lock usage as some call sites doesn't look sane, e.g. spin_lock(); set_bit(); spin_unlock();.
But during the cleanup and reviewing, LLM exposed two new bugs:
- rbio_orig_end_io() can race with lock_stripe_add()
And rbio_orig_end_io() didn't hold the bio_list_lock, under certain race condition, a bio can even be missing.
Fixed by the first patch.
- Failed rbio can still be cached
Fixed by the second patch.
Qu Wenruo (2):
btrfs: fix racy bio_list changes for failed RMW rbio
btrfs: don't cache rbio if an error is hit
fs/btrfs/raid56.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-)
Signature · 1 line
2.56.0