mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-11 00:00:12 +03:00
Update bcachefs sources to 69b80f5793ed bcachefs: Add time_stats for btree write buffer flush
This commit is contained in:
parent
e919b852b4
commit
95a7909891
@ -1 +1 @@
|
|||||||
5be664992e214b32a77f85c74b43bf83f02c9aae
|
69b80f5793ed25306a0725d891161f74d5adc650
|
||||||
|
|||||||
@ -463,6 +463,7 @@ BCH_DEBUG_PARAMS_ALL()
|
|||||||
x(btree_node_write) \
|
x(btree_node_write) \
|
||||||
x(btree_interior_update_foreground) \
|
x(btree_interior_update_foreground) \
|
||||||
x(btree_interior_update_total) \
|
x(btree_interior_update_total) \
|
||||||
|
x(btree_write_buffer_flush) \
|
||||||
x(btree_gc) \
|
x(btree_gc) \
|
||||||
x(data_write) \
|
x(data_write) \
|
||||||
x(data_read) \
|
x(data_read) \
|
||||||
|
|||||||
@ -296,6 +296,11 @@ static int bch2_btree_write_buffer_flush_locked(struct btree_trans *trans)
|
|||||||
scoped_guard(mutex, &wb->inc.lock)
|
scoped_guard(mutex, &wb->inc.lock)
|
||||||
move_keys_from_inc_to_flushing(wb);
|
move_keys_from_inc_to_flushing(wb);
|
||||||
|
|
||||||
|
if (!wb->flushing.keys.nr)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
u64 start_time = local_clock();
|
||||||
|
|
||||||
for (size_t i = 0; i < wb->flushing.keys.nr; i++) {
|
for (size_t i = 0; i < wb->flushing.keys.nr; i++) {
|
||||||
wb->sorted.data[i].idx = i;
|
wb->sorted.data[i].idx = i;
|
||||||
wb->sorted.data[i].btree = wb->flushing.keys.data[i].btree;
|
wb->sorted.data[i].btree = wb->flushing.keys.data[i].btree;
|
||||||
@ -488,6 +493,7 @@ err:
|
|||||||
wb->flushing.keys.nr = 0;
|
wb->flushing.keys.nr = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bch2_time_stats_update(&c->times[BCH_TIME_btree_write_buffer_flush], start_time);
|
||||||
bch2_fs_fatal_err_on(ret, c, "%s", bch2_err_str(ret));
|
bch2_fs_fatal_err_on(ret, c, "%s", bch2_err_str(ret));
|
||||||
trace_write_buffer_flush(trans, wb->flushing.keys.nr, overwritten, fast, 0);
|
trace_write_buffer_flush(trans, wb->flushing.keys.nr, overwritten, fast, 0);
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user