Skip to content

Commit

Permalink
fscache: add tracepoint when failing cookie
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
Jeff Layton authored and David Howells committed Aug 9, 2022
1 parent fb24771 commit 1a1e3ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/fscache/cookie.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ void fscache_caching_failed(struct fscache_cookie *cookie)
{
clear_bit(FSCACHE_COOKIE_IS_CACHING, &cookie->flags);
fscache_set_cookie_state(cookie, FSCACHE_COOKIE_STATE_FAILED);
trace_fscache_cookie(cookie->debug_id, refcount_read(&cookie->ref),
fscache_cookie_failed);
}
EXPORT_SYMBOL(fscache_caching_failed);

Expand Down
2 changes: 2 additions & 0 deletions include/trace/events/fscache.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ enum fscache_volume_trace {
enum fscache_cookie_trace {
fscache_cookie_collision,
fscache_cookie_discard,
fscache_cookie_failed,
fscache_cookie_get_attach_object,
fscache_cookie_get_end_access,
fscache_cookie_get_hash_collision,
Expand Down Expand Up @@ -131,6 +132,7 @@ enum fscache_access_trace {
#define fscache_cookie_traces \
EM(fscache_cookie_collision, "*COLLIDE*") \
EM(fscache_cookie_discard, "DISCARD ") \
EM(fscache_cookie_failed, "FAILED ") \
EM(fscache_cookie_get_attach_object, "GET attch") \
EM(fscache_cookie_get_hash_collision, "GET hcoll") \
EM(fscache_cookie_get_end_access, "GQ endac") \
Expand Down

0 comments on commit 1a1e3ac

Please sign in to comment.