scoutfs: add commit written counter

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2020-05-07 13:30:10 -07:00
committed by Zach Brown
parent ca8abeebb1
commit 26ccaca80b
2 changed files with 5 additions and 2 deletions

View File

@@ -95,10 +95,11 @@
EXPAND_COUNTER(trans_commit_fsync) \
EXPAND_COUNTER(trans_commit_full) \
EXPAND_COUNTER(trans_commit_sync_fs) \
EXPAND_COUNTER(trans_commit_timer)
EXPAND_COUNTER(trans_commit_timer) \
EXPAND_COUNTER(trans_commit_written)
#define FIRST_COUNTER block_cache_access
#define LAST_COUNTER trans_commit_timer
#define LAST_COUNTER trans_commit_written
#undef EXPAND_COUNTER
#define EXPAND_COUNTER(which) struct percpu_counter which;

View File

@@ -169,6 +169,8 @@ void scoutfs_trans_write_func(struct work_struct *work)
if (sbi->trans_deadline_expired)
scoutfs_inc_counter(sb, trans_commit_timer);
scoutfs_inc_counter(sb, trans_commit_written);
ret = scoutfs_inode_walk_writeback(sb, true) ?:
scoutfs_block_writer_write(sb, &tri->wri) ?:
scoutfs_inode_walk_writeback(sb, false) ?: