diff options
| author | Kent Overstreet <[email protected]> | 2025-02-10 22:46:36 +0000 |
|---|---|---|
| committer | Kent Overstreet <[email protected]> | 2025-02-11 15:10:32 +0000 |
| commit | 9f734cd076931fa4d7feb5728e5cd95cde0af114 (patch) | |
| tree | e7cea71d497a61b9af408bdd9cdce189145682ba /scripts/mod/empty.c | |
| parent | bcachefs: Split out journal pins by btree level (diff) | |
| download | kernel-9f734cd076931fa4d7feb5728e5cd95cde0af114.tar.gz kernel-9f734cd076931fa4d7feb5728e5cd95cde0af114.zip | |
bcachefs: Fix want_new_bset() so we write until the end of the btree node
want_new_bset() returns the address of a new bset to initialize if we
wish to do so in a btree node - either because the previous one is too
big, or because it's been written.
The case for 'previous bset was written' was wrong: it's only supposed
to check for if we have space in the node for one more block, but
because it subtracted the header from the space available it would never
initialize a new bset if we were down to the last block in a node.
Fixing this results in fewer btree node splits/compactions, which fixes
a bug with flushing the journal to go read-only sometimes not
terminating or taking excessively long.
Signed-off-by: Kent Overstreet <[email protected]>
Diffstat (limited to 'scripts/mod/empty.c')
0 files changed, 0 insertions, 0 deletions
