public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] fix buffered write path on -ENOSPC
@ 2024-10-18  4:40 Kent Overstreet
  2024-10-18  4:40 ` [PATCH 1/3] bcachefs: fix disk reservation accounting in bch2_folio_reservation_get() Kent Overstreet
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kent Overstreet @ 2024-10-18  4:40 UTC (permalink / raw)
  To: linux-bcachefs; +Cc: Kent Overstreet

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(-)

-- 
2.45.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-18 11:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18  4:40 [PATCH 0/3] fix buffered write path on -ENOSPC Kent Overstreet
2024-10-18  4:40 ` [PATCH 1/3] bcachefs: fix disk reservation accounting in bch2_folio_reservation_get() Kent Overstreet
2024-10-18 11:49   ` wangjianjian (C)
2024-10-18  4:40 ` [PATCH 2/3] bcachefs: bch2_folio_reservation_get_partial() is now better behaved Kent Overstreet
2024-10-18  4:40 ` [PATCH 3/3] bcachefs: Fix data corruption on -ENOSPC in buffered write path Kent Overstreet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox