mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-07 12:35:28 +00:00
scoutfs: add counters for radix enospc
Add counters for the various sources of ENOSPC from the radix block allocator. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -85,6 +85,9 @@
|
||||
EXPAND_COUNTER(quorum_write_block) \
|
||||
EXPAND_COUNTER(quorum_write_block_error) \
|
||||
EXPAND_COUNTER(quorum_fenced) \
|
||||
EXPAND_COUNTER(radix_enospc_data) \
|
||||
EXPAND_COUNTER(radix_enospc_paths) \
|
||||
EXPAND_COUNTER(radix_enospc_synth) \
|
||||
EXPAND_COUNTER(trans_commit_data_alloc_low) \
|
||||
EXPAND_COUNTER(trans_commit_fsync) \
|
||||
EXPAND_COUNTER(trans_commit_full) \
|
||||
|
||||
@@ -834,6 +834,7 @@ static int get_path(struct super_block *sb, struct scoutfs_radix_root *root,
|
||||
synth = chg->next_synth++;
|
||||
/* careful not to go too high or wrap */
|
||||
if (synth == U64_MAX || synth < RADIX_SYNTH_BLKNO) {
|
||||
scoutfs_inc_counter(sb, radix_enospc_synth);
|
||||
ret = -ENOSPC;
|
||||
goto out;
|
||||
}
|
||||
@@ -992,6 +993,7 @@ static int get_all_paths(struct super_block *sb,
|
||||
|
||||
/* we're not modifying as we go, check for wrapping */
|
||||
if (next_meta >= start_meta && meta_wrapped) {
|
||||
scoutfs_inc_counter(sb, radix_enospc_paths);
|
||||
ret = -ENOSPC;
|
||||
break;
|
||||
}
|
||||
@@ -1276,6 +1278,7 @@ find_next:
|
||||
root->next_find_bit = 0;
|
||||
goto find_next;
|
||||
}
|
||||
scoutfs_inc_counter(sb, radix_enospc_data);
|
||||
ret = -ENOSPC;
|
||||
}
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user