]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
netfs: Reserve netfs_sreq_source 0 as unset/unknown
authorDavid Howells <dhowells@redhat.com>
Tue, 9 Jul 2024 08:45:46 +0000 (09:45 +0100)
committerChristian Brauner <brauner@kernel.org>
Thu, 5 Sep 2024 09:00:41 +0000 (11:00 +0200)
Reserve the 0-valued netfs_sreq_source to mean unset or unknown so that it
can be seen in the trace as such rather than appearing as
download-from-server when it's going to get switched to something else.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Link: https://lore.kernel.org/r/20240814203850.2240469-9-dhowells@redhat.com/
Signed-off-by: Christian Brauner <brauner@kernel.org>
include/linux/netfs.h
include/trace/events/netfs.h

index eea5ea2842f60fdadd149cdd5302285c6c8fd04d..37f8ce9c028417926f85171bc91f87f2ce1a0404 100644 (file)
@@ -43,6 +43,7 @@ static inline void folio_start_private_2(struct folio *folio)
 #define NETFS_BUF_PAGECACHE_MARK XA_MARK_1     /* - Page needs wb/dirty flag wrangling */
 
 enum netfs_io_source {
+       NETFS_SOURCE_UNKNOWN,
        NETFS_FILL_WITH_ZEROES,
        NETFS_DOWNLOAD_FROM_SERVER,
        NETFS_READ_FROM_CACHE,
index a4fd5dea52f443b064f4c8431425dfaa67d9d604..f4105b8e5894f200aec7ef016d6c0dfee728ff3b 100644 (file)
@@ -60,6 +60,7 @@
        E_(netfs_rreq_trace_write_done,         "WR-DONE")
 
 #define netfs_sreq_sources                                     \
+       EM(NETFS_SOURCE_UNKNOWN,                "----")         \
        EM(NETFS_FILL_WITH_ZEROES,              "ZERO")         \
        EM(NETFS_DOWNLOAD_FROM_SERVER,          "DOWN")         \
        EM(NETFS_READ_FROM_CACHE,               "READ")         \