Skip to content

Commit 1a1e3ac

Browse files
jtlaytondhowells
authored andcommitted
fscache: add tracepoint when failing cookie
Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: David Howells <[email protected]>
1 parent fb24771 commit 1a1e3ac

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

fs/fscache/cookie.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ void fscache_caching_failed(struct fscache_cookie *cookie)
263263
{
264264
clear_bit(FSCACHE_COOKIE_IS_CACHING, &cookie->flags);
265265
fscache_set_cookie_state(cookie, FSCACHE_COOKIE_STATE_FAILED);
266+
trace_fscache_cookie(cookie->debug_id, refcount_read(&cookie->ref),
267+
fscache_cookie_failed);
266268
}
267269
EXPORT_SYMBOL(fscache_caching_failed);
268270

include/trace/events/fscache.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ enum fscache_volume_trace {
4949
enum fscache_cookie_trace {
5050
fscache_cookie_collision,
5151
fscache_cookie_discard,
52+
fscache_cookie_failed,
5253
fscache_cookie_get_attach_object,
5354
fscache_cookie_get_end_access,
5455
fscache_cookie_get_hash_collision,
@@ -131,6 +132,7 @@ enum fscache_access_trace {
131132
#define fscache_cookie_traces \
132133
EM(fscache_cookie_collision, "*COLLIDE*") \
133134
EM(fscache_cookie_discard, "DISCARD ") \
135+
EM(fscache_cookie_failed, "FAILED ") \
134136
EM(fscache_cookie_get_attach_object, "GET attch") \
135137
EM(fscache_cookie_get_hash_collision, "GET hcoll") \
136138
EM(fscache_cookie_get_end_access, "GQ endac") \

0 commit comments

Comments
 (0)