diff options
author | 2025-02-10 17:46:36 -0500 | |
---|---|---|
committer | 2025-02-11 10:10:32 -0500 | |
commit | 9f734cd076931fa4d7feb5728e5cd95cde0af114 (patch) | |
tree | e7cea71d497a61b9af408bdd9cdce189145682ba /net/lapb/lapb_timer.c | |
parent | bcachefs: Split out journal pins by btree level (diff) | |
download | wireguard-linux-9f734cd076931fa4d7feb5728e5cd95cde0af114.tar.xz wireguard-linux-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 <kent.overstreet@linux.dev>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions