bcache: Move spinlock into struct time_stats
Minor cleanup. Signed-off-by: Kent Overstreet <kmo@daterainc.com>
This commit is contained in:
@@ -1077,11 +1077,8 @@ static void __btree_sort(struct btree *b, struct btree_iter *iter,
|
||||
if (b->written)
|
||||
bset_build_written_tree(b);
|
||||
|
||||
if (!start) {
|
||||
spin_lock(&b->c->sort_time_lock);
|
||||
if (!start)
|
||||
bch_time_stats_update(&b->c->sort_time, start_time);
|
||||
spin_unlock(&b->c->sort_time_lock);
|
||||
}
|
||||
}
|
||||
|
||||
void bch_btree_sort_partial(struct btree *b, unsigned start)
|
||||
@@ -1128,9 +1125,7 @@ void bch_btree_sort_into(struct btree *b, struct btree *new)
|
||||
|
||||
btree_mergesort(b, new->sets->data, &iter, false, true);
|
||||
|
||||
spin_lock(&b->c->sort_time_lock);
|
||||
bch_time_stats_update(&b->c->sort_time, start_time);
|
||||
spin_unlock(&b->c->sort_time_lock);
|
||||
|
||||
bkey_copy_key(&new->key, &b->key);
|
||||
new->sets->size = 0;
|
||||
|
Reference in New Issue
Block a user