Skip to content

fix buffered write path on -ENOSPC

Kent Overstreet linux-bcachefs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3bcachefs: fix disk reservation accounting in bch2_folio_reservation_get()fs/bcachefs/fs-io-pagecache.c+1 -11 reply
2/3bcachefs: bch2_folio_reservation_get_partial() is now better behavedfs/bcachefs/buckets.c fs/bcachefs/buckets.h fs/bcachefs/fs-io-pagecache.c+57 -320 replies
3/3bcachefs: Fix data corruption on -ENOSPC in buffered write pathfs/bcachefs/fs-io-buffered.c+6 -00 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/3] fix buffered write path on -ENOSPC

xfstests generic/299 turned up a data corruption when we do a short write because of -ENOSPC - when we truncate the write we might no longer be doing a full write to a !uptodate folio, which then needs to be read in.

Amusingly, fixing this turned up a bug in fio where verify mode behaves badly in the presence of short writes, which took longer to figure out than the original bug...

Kent Overstreet (3):
bcachefs: fix disk reservation accounting in bch2_folio_reservation_get()
bcachefs: bch2_folio_reservation_get_partial() is now better behaved
bcachefs: Fix data corruption on -ENOSPC in buffered write path

 fs/bcachefs/buckets.c         |  7 +++-
 fs/bcachefs/buckets.h         | 12 +++---
 fs/bcachefs/fs-io-buffered.c  |  6 +++
 fs/bcachefs/fs-io-pagecache.c | 70 ++++++++++++++++++++++-------------
 4 files changed, 63 insertions(+), 32 deletions(-)
Signature · 1 line
2.45.2