afs: Add tracing for cell refcount and active user count

Add a tracepoint to log the cell refcount and active user count and pass in
a reason code through various functions that manipulate these counters.

Additionally, a helper function, afs_see_cell(), is provided to log
interesting places that deal with a cell without actually doing any
accounting directly.

Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
David Howells
2020-10-13 20:51:59 +01:00
parent 1d0e850a49
commit dca54a7bbb
10 changed files with 208 additions and 55 deletions

View File

@@ -123,9 +123,9 @@ static int afs_probe_cell_name(struct dentry *dentry)
len--;
}
cell = afs_find_cell(net, name, len);
cell = afs_find_cell(net, name, len, afs_cell_trace_use_probe);
if (!IS_ERR(cell)) {
afs_unuse_cell(net, cell);
afs_unuse_cell(net, cell, afs_cell_trace_unuse_probe);
return 0;
}