Commit 8304ad4d authored by Kent Overstreet's avatar Kent Overstreet

bcache: Remove unnecessary check in should_split()

Checking i->seq was redundant, because since ages ago we always
initialize the new bset when advancing b->written
Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
parent 2d679fc7
...@@ -363,8 +363,7 @@ static inline bool should_split(struct btree *b) ...@@ -363,8 +363,7 @@ static inline bool should_split(struct btree *b)
{ {
struct bset *i = write_block(b); struct bset *i = write_block(b);
return b->written >= btree_blocks(b) || return b->written >= btree_blocks(b) ||
(i->seq == b->sets[0].data->seq && (b->written + __set_blocks(i, i->keys + 15, b->c)
b->written + __set_blocks(i, i->keys + 15, b->c)
> btree_blocks(b)); > btree_blocks(b));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment