aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cachefiles/io.c
diff options
context:
space:
mode:
authorDavid Howells <[email protected]>2024-12-16 20:41:05 +0000
committerChristian Brauner <[email protected]>2024-12-20 21:34:05 +0000
commitbcb33f79e15d0e4dc4b86106ceb01d64bfab9e35 (patch)
tree256b60269efce77e4e22098be88b3fe022970c3c /fs/cachefiles/io.c
parentnetfs: Remove some extraneous directory invalidations (diff)
downloadkernel-bcb33f79e15d0e4dc4b86106ceb01d64bfab9e35.tar.gz
kernel-bcb33f79e15d0e4dc4b86106ceb01d64bfab9e35.zip
cachefiles: Add some subrequest tracepoints
Add some tracepoints into the cachefiles write paths. Signed-off-by: David Howells <[email protected]> Link: https://lore.kernel.org/r/[email protected] cc: [email protected] Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'fs/cachefiles/io.c')
-rw-r--r--fs/cachefiles/io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cachefiles/io.c b/fs/cachefiles/io.c
index 6a821a959b59..92058ae43488 100644
--- a/fs/cachefiles/io.c
+++ b/fs/cachefiles/io.c
@@ -13,6 +13,7 @@
#include <linux/falloc.h>
#include <linux/sched/mm.h>
#include <trace/events/fscache.h>
+#include <trace/events/netfs.h>
#include "internal.h"
struct cachefiles_kiocb {
@@ -366,6 +367,7 @@ static int cachefiles_write(struct netfs_cache_resources *cres,
if (!fscache_wait_for_operation(cres, FSCACHE_WANT_WRITE)) {
if (term_func)
term_func(term_func_priv, -ENOBUFS, false);
+ trace_netfs_sreq(term_func_priv, netfs_sreq_trace_cache_nowrite);
return -ENOBUFS;
}
@@ -695,6 +697,7 @@ static void cachefiles_issue_write(struct netfs_io_subrequest *subreq)
iov_iter_truncate(&subreq->io_iter, len);
}
+ trace_netfs_sreq(subreq, netfs_sreq_trace_cache_prepare);
cachefiles_begin_secure(cache, &saved_cred);
ret = __cachefiles_prepare_write(object, cachefiles_cres_file(cres),
&start, &len, len, true);
@@ -704,6 +707,7 @@ static void cachefiles_issue_write(struct netfs_io_subrequest *subreq)
return;
}
+ trace_netfs_sreq(subreq, netfs_sreq_trace_cache_write);
cachefiles_write(&subreq->rreq->cache_resources,
subreq->start, &subreq->io_iter,
netfs_write_subrequest_terminated, subreq);