]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: Ensure buffered writes write as much as they can
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 10 Sep 2023 21:29:39 +0000 (17:29 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 14 Jul 2024 23:00:16 +0000 (19:00 -0400)
commit7554a8bb6ddeeca87fa8abd1d9766111477a6643
tree289b73e37804d7d5ba45b338d774ae18f6d7558d
parent95924420b038a0d025c4d16c75be2a858e7c09df
bcachefs: Ensure buffered writes write as much as they can

This adds a new helper, bch2_folio_reservation_get_partial(), which
reserves as many blocks as possible and may return partial success.

__bch2_buffered_write() is switched to the new helper - this fixes
fstests generic/275, the write until -ENOSPC test.

generic/230 now fails: this appears to be a test bug, where xfs_io isn't
looping after a partial write to get the error code.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs-io-buffered.c
fs/bcachefs/fs-io-pagecache.c
fs/bcachefs/fs-io-pagecache.h