diff options
author | Brian Foster <bfoster@redhat.com> | 2023-11-03 09:09:36 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-04 22:19:13 -0400 |
commit | 2a4e7497604b20b19b6d9dbd109c42900892d7c9 (patch) | |
tree | ae47393656f2e99a2b4c7cf309a7432de142f7a2 /fs/fat | |
parent | 0e91d3a6d59ed3c6630c7c50f17534f2b02d2abf (diff) |
bcachefs: allow writeback to fill bio completely
The bcachefs folio writeback code includes a bio full check as well
as a fixed size check to determine when to split off and submit
writeback I/O. The inclusive check of the latter against the limit
means that writeback can submit slightly prematurely. This is not a
functional problem, but results in unnecessarily split I/Os and
extent merging.
This can be observed with a buffered write sized exactly to the
current maximum value (1MB) and with key_merging_disabled=1. The
latter prevents the merge from the second write such that a
subsequent check of the extent list shows a 1020k extent followed by
a contiguous 4k extent.
The purpose for the fixed size check is also undocumented and
somewhat obscure. Lift this check into a new helper that wraps the
bio check, fix the comparison logic, and add a comment to document
the purpose and how we might improve on this in the future.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/fat')
0 files changed, 0 insertions, 0 deletions