diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 16:21:54 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-31 12:18:38 -0400 |
commit | 96a363a7e68832054f2a93249335fd3efd870aa3 (patch) | |
tree | c644d5037e979d78f9f5b9cb4f5fe138540244b7 /fs/bcachefs/trace.h | |
parent | d5eade93452bd1a892e2155e9bb723f04992bdac (diff) | |
download | linux-stable-96a363a7e68832054f2a93249335fd3efd870aa3.tar.gz linux-stable-96a363a7e68832054f2a93249335fd3efd870aa3.tar.bz2 linux-stable-96a363a7e68832054f2a93249335fd3efd870aa3.zip |
bcachefs: move: move_stats refactoring
data_progress_list is gone - it was redundant with moving_context_list
The upcoming rebalance rewrite is going to have it using two different
move_stats objects with the same moving_context, depending on whether
it's scanning or using the rebalance_work btree - this patch plumbs
stats around a bit differently so that will work.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/trace.h')
-rw-r--r-- | fs/bcachefs/trace.h | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h index 2308f49f3b2e..81f72b2add09 100644 --- a/fs/bcachefs/trace.h +++ b/fs/bcachefs/trace.h @@ -767,25 +767,36 @@ DEFINE_EVENT(bkey, move_extent_alloc_mem_fail, ); TRACE_EVENT(move_data, - TP_PROTO(struct bch_fs *c, u64 sectors_moved, - u64 keys_moved), - TP_ARGS(c, sectors_moved, keys_moved), + TP_PROTO(struct bch_fs *c, + struct bch_move_stats *stats), + TP_ARGS(c, stats), TP_STRUCT__entry( - __field(dev_t, dev ) - __field(u64, sectors_moved ) + __field(dev_t, dev ) __field(u64, keys_moved ) + __field(u64, keys_raced ) + __field(u64, sectors_seen ) + __field(u64, sectors_moved ) + __field(u64, sectors_raced ) ), TP_fast_assign( - __entry->dev = c->dev; - __entry->sectors_moved = sectors_moved; - __entry->keys_moved = keys_moved; + __entry->dev = c->dev; + __entry->keys_moved = atomic64_read(&stats->keys_moved); + __entry->keys_raced = atomic64_read(&stats->keys_raced); + __entry->sectors_seen = atomic64_read(&stats->sectors_seen); + __entry->sectors_moved = atomic64_read(&stats->sectors_moved); + __entry->sectors_raced = atomic64_read(&stats->sectors_raced); ), - TP_printk("%d,%d sectors_moved %llu keys_moved %llu", + TP_printk("%d,%d keys moved %llu raced %llu" + "sectors seen %llu moved %llu raced %llu", MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->sectors_moved, __entry->keys_moved) + __entry->keys_moved, + __entry->keys_raced, + __entry->sectors_seen, + __entry->sectors_moved, + __entry->sectors_raced) ); TRACE_EVENT(evacuate_bucket, |