mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-02 20:29:20 +00:00
FS-Cache: Annotate slow-work runqueue proc lines for FS-Cache work items
Annotate slow-work runqueue proc lines for FS-Cache work items. Objects include the object ID and the state. Operations include the object ID, the operation ID and the operation type and state. Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
parent
3bde31a4ac
commit
440f0affe2
4 changed files with 103 additions and 6 deletions
|
@ -102,6 +102,16 @@ struct fscache_operation {
|
|||
|
||||
/* operation releaser */
|
||||
fscache_operation_release_t release;
|
||||
|
||||
#ifdef CONFIG_SLOW_WORK_PROC
|
||||
const char *name; /* operation name */
|
||||
const char *state; /* operation state */
|
||||
#define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0)
|
||||
#define fscache_set_op_state(OP, S) do { (OP)->state = (S); } while(0)
|
||||
#else
|
||||
#define fscache_set_op_name(OP, N) do { } while(0)
|
||||
#define fscache_set_op_state(OP, S) do { } while(0)
|
||||
#endif
|
||||
};
|
||||
|
||||
extern atomic_t fscache_op_debug_id;
|
||||
|
@ -125,6 +135,7 @@ static inline void fscache_operation_init(struct fscache_operation *op,
|
|||
op->debug_id = atomic_inc_return(&fscache_op_debug_id);
|
||||
op->release = release;
|
||||
INIT_LIST_HEAD(&op->pend_link);
|
||||
fscache_set_op_state(op, "Init");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -337,6 +348,7 @@ struct fscache_object {
|
|||
FSCACHE_OBJECT_RECYCLING, /* retiring object */
|
||||
FSCACHE_OBJECT_WITHDRAWING, /* withdrawing object */
|
||||
FSCACHE_OBJECT_DEAD, /* object is now dead */
|
||||
FSCACHE_OBJECT__NSTATES
|
||||
} state;
|
||||
|
||||
int debug_id; /* debugging ID */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue