diff options
author | David Howells <dhowells@redhat.com> | 2019-06-20 19:12:17 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-06-20 19:12:17 +0200 |
commit | 452181936931f0f08923aba5e04e1e9ef58c389f (patch) | |
tree | 9516d468bae57461e495be640fbc7af86521cfa8 /fs/afs/internal.h | |
parent | afs: Add some callback management tracepoints (diff) | |
download | linux-452181936931f0f08923aba5e04e1e9ef58c389f.tar.xz linux-452181936931f0f08923aba5e04e1e9ef58c389f.zip |
afs: Trace afs_server usage
Add a tracepoint (afs_server) to track the afs_server object usage count.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/internal.h')
-rw-r--r-- | fs/afs/internal.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 4d9b3e9a422a..b03f32137a20 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -518,6 +518,7 @@ struct afs_server { atomic_t usage; u32 addr_version; /* Address list version */ u32 cm_epoch; /* Server RxRPC epoch */ + unsigned int debug_id; /* Debugging ID for traces */ /* file service access */ rwlock_t fs_lock; /* access lock */ @@ -1244,17 +1245,12 @@ extern void __exit afs_clean_up_permit_cache(void); */ extern spinlock_t afs_server_peer_lock; -static inline struct afs_server *afs_get_server(struct afs_server *server) -{ - atomic_inc(&server->usage); - return server; -} - extern struct afs_server *afs_find_server(struct afs_net *, const struct sockaddr_rxrpc *); extern struct afs_server *afs_find_server_by_uuid(struct afs_net *, const uuid_t *); extern struct afs_server *afs_lookup_server(struct afs_cell *, struct key *, const uuid_t *); -extern void afs_put_server(struct afs_net *, struct afs_server *); +extern struct afs_server *afs_get_server(struct afs_server *, enum afs_server_trace); +extern void afs_put_server(struct afs_net *, struct afs_server *, enum afs_server_trace); extern void afs_manage_servers(struct work_struct *); extern void afs_servers_timer(struct timer_list *); extern void __net_exit afs_purge_servers(struct afs_net *); |