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:
@@ -375,6 +375,7 @@ struct afs_cell {
|
||||
enum dns_record_source dns_source:8; /* Latest source of data from lookup */
|
||||
enum dns_lookup_status dns_status:8; /* Latest status of data from lookup */
|
||||
unsigned int dns_lookup_count; /* Counter of DNS lookups */
|
||||
unsigned int debug_id;
|
||||
|
||||
/* The volumes belonging to this cell */
|
||||
struct rb_root volumes; /* Tree of volumes on this server */
|
||||
@@ -919,14 +920,16 @@ static inline bool afs_cb_is_broken(unsigned int cb_break,
|
||||
* cell.c
|
||||
*/
|
||||
extern int afs_cell_init(struct afs_net *, const char *);
|
||||
extern struct afs_cell *afs_find_cell(struct afs_net *, const char *, unsigned);
|
||||
extern struct afs_cell *afs_find_cell(struct afs_net *, const char *, unsigned,
|
||||
enum afs_cell_trace);
|
||||
extern struct afs_cell *afs_lookup_cell(struct afs_net *, const char *, unsigned,
|
||||
const char *, bool);
|
||||
extern struct afs_cell *afs_use_cell(struct afs_cell *);
|
||||
extern void afs_unuse_cell(struct afs_net *, struct afs_cell *);
|
||||
extern struct afs_cell *afs_get_cell(struct afs_cell *);
|
||||
extern void afs_put_cell(struct afs_cell *);
|
||||
extern void afs_queue_cell(struct afs_cell *);
|
||||
extern struct afs_cell *afs_use_cell(struct afs_cell *, enum afs_cell_trace);
|
||||
extern void afs_unuse_cell(struct afs_net *, struct afs_cell *, enum afs_cell_trace);
|
||||
extern struct afs_cell *afs_get_cell(struct afs_cell *, enum afs_cell_trace);
|
||||
extern void afs_see_cell(struct afs_cell *, enum afs_cell_trace);
|
||||
extern void afs_put_cell(struct afs_cell *, enum afs_cell_trace);
|
||||
extern void afs_queue_cell(struct afs_cell *, enum afs_cell_trace);
|
||||
extern void afs_manage_cells(struct work_struct *);
|
||||
extern void afs_cells_timer(struct timer_list *);
|
||||
extern void __net_exit afs_cell_purge(struct afs_net *);
|
||||
|
Reference in New Issue
Block a user