summaryrefslogtreecommitdiffstats
path: root/fs/afs/volume.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-10-13 20:51:59 +0100
committerDavid Howells <dhowells@redhat.com>2020-10-16 14:39:21 +0100
commitdca54a7bbb8ca9148ae10d60c66c926e222a9c4b (patch)
tree7a963929b4c3ef79910ef1c56ea1ea45248fcfb7 /fs/afs/volume.c
parent1d0e850a49a5b56f8f3cb51e74a11e2fedb96be6 (diff)
downloadlinux-stable-dca54a7bbb8ca9148ae10d60c66c926e222a9c4b.tar.gz
linux-stable-dca54a7bbb8ca9148ae10d60c66c926e222a9c4b.tar.bz2
linux-stable-dca54a7bbb8ca9148ae10d60c66c926e222a9c4b.zip
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>
Diffstat (limited to 'fs/afs/volume.c')
-rw-r--r--fs/afs/volume.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/afs/volume.c b/fs/afs/volume.c
index a838030e9563..f84194b791d3 100644
--- a/fs/afs/volume.c
+++ b/fs/afs/volume.c
@@ -83,7 +83,7 @@ static struct afs_volume *afs_alloc_volume(struct afs_fs_context *params,
volume->vid = vldb->vid[params->type];
volume->update_at = ktime_get_real_seconds() + afs_volume_record_life;
- volume->cell = afs_get_cell(params->cell);
+ volume->cell = afs_get_cell(params->cell, afs_cell_trace_get_vol);
volume->type = params->type;
volume->type_force = params->force;
volume->name_len = vldb->name_len;
@@ -106,7 +106,7 @@ static struct afs_volume *afs_alloc_volume(struct afs_fs_context *params,
return volume;
error_1:
- afs_put_cell(volume->cell);
+ afs_put_cell(volume->cell, afs_cell_trace_put_vol);
kfree(volume);
error_0:
return ERR_PTR(ret);
@@ -228,7 +228,7 @@ static void afs_destroy_volume(struct afs_net *net, struct afs_volume *volume)
afs_remove_volume_from_cell(volume);
afs_put_serverlist(net, rcu_access_pointer(volume->servers));
- afs_put_cell(volume->cell);
+ afs_put_cell(volume->cell, afs_cell_trace_put_vol);
trace_afs_volume(volume->vid, atomic_read(&volume->usage),
afs_volume_trace_free);
kfree_rcu(volume, rcu);