mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
netfs: Trace refcounting on the netfs_io_subrequest struct
Add refcount tracing for the netfs_io_subrequest structure. Changes ======= ver #3) - Switch 'W=' to 'R=' in the traceline to match other request debug IDs. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> cc: linux-cachefs@redhat.com Link: https://lore.kernel.org/r/164622998584.3564931.5052255990645723639.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/164678202603.1200972.14726007419792315578.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/164692901860.2099075.4845820886851239935.stgit@warthog.procyon.org.uk/ # v3
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
#include <linux/fs.h>
|
||||
#include <linux/pagemap.h>
|
||||
|
||||
enum netfs_sreq_ref_trace;
|
||||
|
||||
/*
|
||||
* Overload PG_private_2 to give us PG_fscache - this is used to indicate that
|
||||
* a page is currently backed by a local disk cache
|
||||
@@ -136,7 +138,7 @@ struct netfs_io_subrequest {
|
||||
loff_t start; /* Where to start the I/O */
|
||||
size_t len; /* Size of the I/O */
|
||||
size_t transferred; /* Amount of data transferred */
|
||||
refcount_t usage;
|
||||
refcount_t ref;
|
||||
short error; /* 0 or error that occurred */
|
||||
unsigned short debug_index; /* Index in list (for debugging output) */
|
||||
enum netfs_io_source source; /* Where to read from/write to */
|
||||
@@ -268,6 +270,10 @@ extern int netfs_write_begin(struct file *, struct address_space *,
|
||||
void *);
|
||||
|
||||
extern void netfs_subreq_terminated(struct netfs_io_subrequest *, ssize_t, bool);
|
||||
extern void netfs_get_subrequest(struct netfs_io_subrequest *subreq,
|
||||
enum netfs_sreq_ref_trace what);
|
||||
extern void netfs_put_subrequest(struct netfs_io_subrequest *subreq,
|
||||
bool was_async, enum netfs_sreq_ref_trace what);
|
||||
extern void netfs_stats_show(struct seq_file *);
|
||||
|
||||
#endif /* _LINUX_NETFS_H */
|
||||
|
Reference in New Issue
Block a user