2
#define TRACE_SYSTEM vfs
4
#if !defined(_TRACE_VFS_H) || defined(TRACE_HEADER_MULTI_READ)
8
* Tracepoint for dirtying an inode:
10
TRACE_EVENT(dirty_inode,
12
TP_PROTO(struct inode *inode, struct task_struct *task),
17
__array( char, comm, TASK_COMM_LEN )
19
__array( char, dev, 16 )
20
__array( char, file, 32 )
24
if (inode->i_ino || strcmp(inode->i_sb->s_id, "bdev")) {
25
struct dentry *dentry;
26
const char *name = "?";
28
dentry = d_find_alias(inode);
30
spin_lock(&dentry->d_lock);
31
name = (const char *) dentry->d_name.name;
34
memcpy(__entry->comm, task->comm, TASK_COMM_LEN);
35
__entry->pid = task->pid;
36
strlcpy(__entry->file, name, 32);
37
strlcpy(__entry->dev, inode->i_sb->s_id, 16);
40
spin_unlock(&dentry->d_lock);
46
TP_printk("task=%i (%s) file=%s dev=%s",
47
__entry->pid, __entry->comm, __entry->file, __entry->dev)
50
#endif /* _TRACE_VFS_H */
52
/* This part must be outside protection */
53
#include <trace/define_trace.h>