mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-07 11:10:44 +00:00
scoutfs: add counters for items written in level 0
Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -115,11 +115,12 @@
|
||||
EXPAND_COUNTER(trans_commit_sync_fs) \
|
||||
EXPAND_COUNTER(trans_commit_timer) \
|
||||
EXPAND_COUNTER(trans_level0_seg_write_bytes) \
|
||||
EXPAND_COUNTER(trans_level0_seg_writes)
|
||||
|
||||
EXPAND_COUNTER(trans_level0_seg_writes) \
|
||||
EXPAND_COUNTER(trans_write_item) \
|
||||
EXPAND_COUNTER(trans_write_deletion_item)
|
||||
|
||||
#define FIRST_COUNTER btree_read_error
|
||||
#define LAST_COUNTER trans_level0_seg_writes
|
||||
#define LAST_COUNTER trans_write_deletion_item
|
||||
|
||||
#undef EXPAND_COUNTER
|
||||
#define EXPAND_COUNTER(which) struct percpu_counter which;
|
||||
|
||||
@@ -1734,6 +1734,11 @@ int scoutfs_item_dirty_seg(struct super_block *sb, struct scoutfs_segment *seg)
|
||||
/* trans reservation should have limited dirty */
|
||||
BUG_ON(!appended);
|
||||
|
||||
if (item->deletion)
|
||||
scoutfs_inc_counter(sb, trans_write_deletion_item);
|
||||
else
|
||||
scoutfs_inc_counter(sb, trans_write_item);
|
||||
|
||||
clear_item_dirty(sb, cac, item);
|
||||
|
||||
del = item;
|
||||
|
||||
Reference in New Issue
Block a user