+2006-12-29 Li Guanglei <guanglei@cn.ibm.com>
+
+ From Gui Jian <guij@cn.ibm.com>
+ * ioscheduler.stp, nfsd.stp, nfs.stp, nfs_proc.stp,
+ rpc.stp, vfs.stp: patch for 2.6.19 kernel
+
2006-12-18 Frank Ch. Eigler <fche@elastic.org>
* vfs.stp (ppos_pos): Protect contents with deref(), though
+2006-12-29 Li Guanglei <guanglei@cn.ibm.com>
+
+ From Gui Jian <guij@cn.ibm.com>
+ * nfs.stp: patch for 2.6.19 kernel
+
2006-12-23 Li Guanglei <guanglei@cn.ibm.com>
From Gui Jian <guij@cn.ibm.com>
+/* Helper functions */
+function __file_fsname:string (file:long) %{ /* pure */
+ struct file *file = (struct file *)(long)THIS->file;
+ if ((file == NULL)
+ || (file->f_dentry == NULL)
+ || (file->f_dentry->d_inode == NULL))
+ strlcpy(THIS->__retvalue, "NULL", MAXSTRINGLEN);
+ else {
+ strlcpy(THIS->__retvalue, file->f_dentry->d_inode->i_sb->s_type->name, MAXSTRINGLEN);
+ }
+%}
+
probe never
{
printf("%d",GROUP_NFS)
probe _addevent.nfs.fop.read.entry
= nfs.fop.read
{
- filesystem = kernel_string($filp->f_dentry->d_inode->i_sb->s_type->name)
+ filesystem = __file_fsname($filp)
if(filesystem == "nfs")
log_fop_rw(HOOKID_NFS_FOP_READ_ENTRY,s_id,fileid,buf,len,pos)
probe _addevent.nfs.fop.write.entry
= nfs.fop.write
{
- filesystem = kernel_string($filp->f_dentry->d_inode->i_sb->s_type->name)
+ filesystem = __file_fsname($filp)
if(filesystem == "nfs")
log_fop_rw(HOOKID_NFS_FOP_WRITE_ENTRY,s_id,fileid,buf,len,pos)
disk_minor = -1
} else {
req = $return
+%( kernel_v >= "2.6.19" %?
+ req_flags = $return->cmd_flags
+%:
req_flags = $return->flags
+%)
if($return->rq_disk == 0) {
disk_major = -1
disk_minor = -1
}
req = $rq
+%( kernel_v >= "2.6.19" %?
+ req_flags = $rq->cmd_flags
+%:
req_flags = $rq->flags
+%)
}
/* when a request is completed */
}
req = $rq
+%( kernel_v >= "2.6.19" %?
+ req_flags = $rq->cmd_flags
+%:
req_flags = $rq->flags
+%)
}
function disk_major_from_request:long(var_q:long)
THIS->__retvalue = *ppos;
%}
+function __file_inode:long (file:long) %{ /* pure */
+ struct file *file = (struct file *)(long)THIS->file;
+ if ((file == NULL) || (file->f_dentry == NULL)) {
+ THIS->__retvalue = 0;
+ return;
+ }
+ THIS->__retvalue = deref(sizeof(file->f_dentry->d_inode),
+ &(file->f_dentry->d_inode));
+ if (0) {
+deref_fault:
+ CONTEXT->last_error = "pointer dereference fault";
+ }
+%}
+
+function __file_id:long (file:long) %{ /* pure */
+ struct file *file = (struct file *)(long)THIS->file;
+ if ((file == NULL) || (file->f_dentry == NULL)) {
+ THIS->__retvalue = 0;
+ return;
+ }
+ THIS->__retvalue = (long)&(file->f_dentry->d_inode->i_sb->s_id);
+%}
+
+function __file_mode:long (file:long) %{ /* pure */
+ struct file *file = (struct file *)(long)THIS->file;
+ if ((file == NULL) || (file->f_dentry == NULL)) {
+ THIS->__retvalue = 0;
+ return;
+ }
+ THIS->__retvalue = deref(sizeof(file->f_dentry->d_inode->i_mode),
+ &(file->f_dentry->d_inode->i_mode));
+ if (0) {
+deref_fault:
+ CONTEXT->last_error = "pointer dereference fault";
+ }
+%}
+
+function __file_parentname:string (file:long) %{ /* pure */
+ struct file *file = (struct file *)(long)THIS->file;
+ if ((file == NULL)
+ || (file->f_dentry == NULL)
+ || (file->f_dentry->d_parent == NULL))
+ strlcpy(THIS->__retvalue, "NULL", MAXSTRINGLEN);
+ else {
+ strlcpy(THIS->__retvalue, file->f_dentry->d_parent->d_name->name, MAXSTRINGLEN);
+ }
+%}
+
probe nfs.fop.entries = nfs.fop.llseek,
nfs.fop.read,
nfs.fop.write,
probe nfs.fop.llseek = kernel.function ("nfs_file_llseek") ?,
module("nfs").function("nfs_file_llseek") ?
{
- dev = $filp->f_dentry->d_inode->i_sb->s_dev
- ino = $filp->f_dentry->d_inode->i_ino
- s_id = $filp->f_dentry->d_inode->i_sb->s_id
+ dev = __file_dev($filp)
+ ino = __file_ino($filp)
+ s_id = __file_id($filp)
devname = kernel_string(s_id)
- maxbyte = $filp->f_dentry->d_inode->i_sb->s_maxbytes
+ maxbyte = __file_maxbytes($filp)
offset = $offset
origin = $origin
*/
probe nfs.fop.read = vfs.do_sync_read
{
- s_id = $filp->f_dentry->d_inode->i_sb->s_id
+ s_id = __file_id($filp)
devname = kernel_string(s_id)
name = "nfs.fop.read"
}
probe nfs.fop.write = vfs.do_sync_write
{
- s_id = $filp->f_dentry->d_inode->i_sb->s_id
+ s_id = __file_id($filp)
devname = kernel_string(s_id)
name = "nfs.fop.write"
}
probe nfs.fop.aio_read = kernel.function ("nfs_file_read") ?,
module("nfs").function("nfs_file_read") ?
{
- dev = $iocb->ki_filp->f_dentry->d_inode->i_sb->s_dev
- ino = $iocb->ki_filp->f_dentry->d_inode->i_ino
- s_id = $iocb->ki_filp->f_dentry->d_inode->i_sb->s_id
+ dev = __file_dev($iocb->ki_filp)
+ ino = __file_ino($iocb->ki_filp)
+ s_id = __file_id($iocb->ki_filp)
devname = kernel_string(s_id)
count = $count
pos = $pos
+
+%( kernel_v >= "2.6.19" %?
+ buf = $iov->iov_base
+%:
buf = $buf
+%)
- parent_name = kernel_string($iocb->ki_filp->f_dentry->d_parent->d_name->name)
- file_name = kernel_string($iocb->ki_filp->f_dentry->d_name->name)
+ parent_name = __file_parentname($iocb->ki_filp)
+ file_name = __file_filename($iocb->ki_filp)
- cache_valid = __nfsi_cache_valid($iocb->ki_filp->f_dentry->d_inode)
- cache_time = __nfsi_rcache_time($iocb->ki_filp->f_dentry->d_inode)
- attr_time = __nfsi_attr_time($iocb->ki_filp->f_dentry->d_inode)
+ cache_valid = __nfsi_cache_valid(__file_inode($iocb->ki_filp))
+ cache_time = __nfsi_rcache_time(__file_inode($iocb->ki_filp))
+ attr_time = __nfsi_attr_time(__file_inode($iocb->ki_filp))
name = "nfs.fop.aio_read"
probe nfs.fop.aio_write = kernel.function("nfs_file_write") ?,
module("nfs").function("nfs_file_write") ?
{
- dev = $iocb->ki_filp->f_dentry->d_inode->i_sb->s_dev
- ino = $iocb->ki_filp->f_dentry->d_inode->i_ino
- s_id = $iocb->ki_filp->f_dentry->d_inode->i_sb->s_id
+ dev = __file_dev($iocb->ki_filp)
+ ino = __file_ino($iocb->ki_filp)
+ s_id = __file_id($iocb->ki_filp)
devname = kernel_string(s_id)
count = $count
pos = $pos
+%( kernel_v >= "2.6.19" %?
+ buf = $iov->iov_base
+%:
buf = $buf
+%)
- parent_name = kernel_string($iocb->ki_filp->f_dentry->d_parent->d_name->name)
- file_name = kernel_string($iocb->ki_filp->f_dentry->d_name->name)
+ parent_name = __file_parentname($iocb->ki_filp)
+ file_name = __file_filename($iocb->ki_filp)
name = "nfs.fop.aio.write"
argstr = sprintf("%p, %d, %d", buf, count, pos)
probe nfs.fop.mmap = kernel.function("nfs_file_mmap") ?,
module("nfs").function("nfs_file_mmap") ?
{
- dev = $file->f_dentry->d_inode->i_sb->s_dev
- ino = $file->f_dentry->d_inode->i_ino
- s_id = $file->f_dentry->d_inode->i_sb->s_id
+ dev = __file_dev($file)
+ ino = __file_ino($file)
+ s_id = __file_id($file)
devname = kernel_string(s_id)
vm_start = $vma->vm_start
vm_end = $vma->vm_end
vm_flags = $vma->vm_flags
- parent_name = kernel_string($file->f_dentry->d_parent->d_name->name)
- file_name = kernel_string($file->f_dentry->d_name->name)
+ parent_name = __file_parentname($file)
+ file_name = __file_filename($file)
- cache_valid = __nfsi_cache_valid($file->f_dentry->d_inode)
- cache_time = __nfsi_rcache_time($file->f_dentry->d_inode)
- attr_time = __nfsi_attr_time($file->f_dentry->d_inode)
+ cache_valid = __nfsi_cache_valid(__file_inode($file))
+ cache_time = __nfsi_rcache_time(__file_inode($file))
+ attr_time = __nfsi_attr_time(__file_inode($file))
name = "nfs.fop.mmap"
argstr = sprintf("0x%x, 0x%x, 0x%x", vm_start, vm_end, vm_flags)
probe nfs.fop.open = kernel.function("nfs_file_open") ?,
module("nfs").function("nfs_file_open") ?
{
- dev = $filp->f_dentry->d_inode->i_sb->s_dev
+ dev = __file_dev($filp)
ino = $inode->i_ino
s_id = $inode->i_sb->s_id
devname = kernel_string(s_id)
- filename = kernel_string($filp->f_dentry->d_name->name)
+ filename = __file_filename($filp)
flag = $filp->f_flags
i_size = $inode->i_size
probe nfs.fop.flush = kernel.function("nfs_file_flush") ?,
module("nfs").function("nfs_file_flush") ?
{
- dev = $file->f_dentry->d_inode->i_sb->s_dev
- ino = $file->f_dentry->d_inode->i_ino;
- s_id = $file->f_dentry->d_inode->i_sb->s_id
+ dev = __file_dev($file)
+ ino = __file_ino($file)
+ s_id = __file_id($file)
devname = kernel_string(s_id)
mode = $file->f_mode
- ndirty = __nfsi_ndirty($file->f_dentry->d_inode)
+ ndirty = __nfsi_ndirty(__file_inode($file))
name = "nfs.fop.flush"
argstr = sprintf("%d",ino)
probe nfs.fop.release = kernel.function("nfs_file_release") ?,
module("nfs").function("nfs_file_release") ?
{
- dev = $filp->f_dentry->d_inode->i_sb->s_dev
+ dev = __file_dev($filp)
ino = $inode->i_ino
s_id = $inode->i_sb->s_id
devname = kernel_string(s_id)
probe nfs.fop.fsync = kernel.function("nfs_fsync") ?,
module("nfs").function("nfs_fsync") ?
{
- dev = $file->f_dentry->d_inode->i_sb->s_dev
- ino = $file->f_dentry->d_inode->i_ino
- s_id = $file->f_dentry->d_inode->i_sb->s_id
+ dev = __file_dev($file)
+ ino = __file_ino($file)
+ s_id = __file_id($file)
devname = kernel_string(s_id)
- ndirty = __nfsi_ndirty($file->f_dentry->d_inode)
+ ndirty = __nfsi_ndirty(__file_inode($file))
name = "nfs.fop.fsync"
argstr = sprintf("%d",ino)
probe nfs.fop.lock = kernel.function("nfs_lock") ?,
module("nfs").function("nfs_lock") ?
{
- dev = $filp->f_dentry->d_inode->i_sb->s_dev
- ino = $filp->f_dentry->d_inode->i_ino
- s_id = $filp->f_dentry->d_inode->i_sb->s_id
+ dev = __file_dev($filp)
+ ino = __file_ino($filp)
+ s_id = __file_id($filp)
devname = kernel_string(s_id)
- i_mode = $filp->f_dentry->d_inode->i_mode
+ i_mode = __file_mode($filp)
cmd = $cmd
fl_type = $fl->fl_type
module("nfs").function("nfs_file_sendfile") ?
{
- dev = $filp->f_dentry->d_inode->i_sb->s_dev
- ino = $filp->f_dentry->d_inode->i_ino
- s_id = $filp->f_dentry->d_inode->i_sb->s_id
+ dev = __file_dev($filp)
+ ino = __file_ino($filp)
+ s_id = __file_id($filp)
devname = kernel_string(s_id)
count = $count
ppos = __d_loff_t($ppos)
- cache_valid = __nfsi_cache_valid($filp->f_dentry->d_inode)
- cache_time = __nfsi_rcache_time($filp->f_dentry->d_inode)
- attr_time = __nfsi_attr_time($filp->f_dentry->d_inode)
-
+ cache_valid = __nfsi_cache_valid(__file_inode($filp))
+ cache_time = __nfsi_rcache_time(__file_inode($filp))
+ attr_time = __nfsi_attr_time(__file_inode($filp))
name = "nfs.fop.sendfile"
argstr = sprintf("%d,%d", count,ppos)
{
struct rpc_clnt * tk_client;
struct rpc_xprt * cl_xprt;
+ struct sockaddr_in *addr;
tk_client = task->tk_client;
cl_xprt= tk_client->cl_xprt;
-
- return cl_xprt->addr.sin_addr.s_addr;
+ addr = (struct sockaddr_in *)&(cl_xprt->addr);
+ if (addr->sin_family != AF_INET)
+ /* Now consider ipv4 only */
+ return 0;
+ return addr->sin_addr.s_addr;
}
int get_prot(struct rpc_task * task)
{
1:get proto
*/
function __i2n_ip_proto :long(dir:long,index:long) %{ /* pure */
- int index = (int) (THIS->index);
- struct inode * dir = (struct inode *)(THIS->dir);
+ int index = (int) (THIS->index);
+ struct inode * dir = (struct inode *)(THIS->dir);
struct rpc_clnt * clnt = NFS_CLIENT(dir);
struct rpc_xprt * cl_xprt = clnt->cl_xprt;
- struct sockaddr_in * addr = &(cl_xprt->addr);
-
- if(index == 0)
- THIS->__retvalue = addr->sin_addr.s_addr;
- else
- THIS->__retvalue = cl_xprt->prot;
+ struct sockaddr_in * addr = (struct sockaddr_in *)&(cl_xprt->addr);
+
+ if(index == 0) {
+ if (addr->sin_family == AF_INET) {
+ /* Now consider ipv4 only */
+ THIS->__retvalue = addr->sin_addr.s_addr;
+ } else
+ THIS->__retvalue = 0;
+ } else
+ THIS->__retvalue = cl_xprt->prot;
%}
/*
prot = __i2n_ip_proto($inode,1)
version = __nfs_version($inode)
- filename = kernel_string($filp->f_dentry->d_name->name)
+ filename = __file_filename($filp)
flag = $filp->f_flags
mode = $filp->f_mode
prot = __i2n_ip_proto($inode,1)
version = __nfs_version($inode)
- filename = kernel_string($filp->f_dentry->d_name->name)
+ filename = __file_filename($filp)
flag = $filp->f_flags
mode = $filp->f_mode
count = $argp->count
offset = $argp->offset
+%( kernel_v >= "2.6.19" %?
+ vec = $rqstp->rq_vec
+%:
vec = $argp->vec
+%)
vlen = $argp->vlen
name = "nfsd.proc2.read"
count = $argp->count
offset = $argp->offset
+%( kernel_v >= "2.6.19" %?
+ vec = $rqstp->rq_vec
+%:
vec = $argp->vec
+%)
vlen = $argp->vlen
name = "nfsd.proc3.read"
count = $argp->len
offset = $argp->offset
+%( kernel_v >= "2.6.19" %?
+ vec = $rqstp->rq_vec
+%:
vec = $argp->vec
+%)
vlen = $argp->vlen
name = "nfsd.proc2.write"
count = $argp->count
offset = $argp->offset
+%( kernel_v >= "2.6.19" %?
+ vec = $rqstp->rq_vec
+%:
vec = $argp->vec
+%)
vlen = $argp->vlen
stable = $argp->stable
probe nfsd.close = kernel.function("nfsd_close")?,
module("nfsd").function("nfsd_close")?
{
- filename = kernel_string($filp->f_dentry->d_name->name)
+ filename = __file_filename($filp)
name = "nfsd.close"
argstr = sprintf("%s",filename)
function prog_from_clnt:long(clnt:long)
%{
struct rpc_clnt *clnt = (struct rpc_clnt *)(long)THIS->clnt;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
+ THIS->__retvalue = clnt ? clnt->cl_prog : 0;
+#else
THIS->__retvalue = clnt ? clnt->cl_pmap->pm_prog : 0;
+#endif
%}
function vers_from_clnt:long(clnt:long)
%{
struct rpc_clnt *clnt = (struct rpc_clnt *)(long)THIS->clnt;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
+ THIS->__retvalue = clnt ? clnt->cl_vers : 0;
+#else
THIS->__retvalue = clnt ? clnt->cl_pmap->pm_vers : 0;
+#endif
%}
function prot_from_clnt:long(clnt:long)
%{
struct rpc_clnt *clnt = (struct rpc_clnt *)(long)THIS->clnt;
- THIS->__retvalue = clnt ? clnt->cl_pmap->pm_prot : 0;
+ THIS->__retvalue = clnt ? clnt->cl_xprt->prot : 0;
%}
function port_from_clnt:long(clnt:long)
%{
struct rpc_clnt *clnt = (struct rpc_clnt *)(long)THIS->clnt;
- THIS->__retvalue = clnt ? clnt->cl_pmap->pm_port : 0;
+ if(clnt != NULL) {
+ struct sockaddr_in *addr = (struct sockaddr_in *)&(clnt->cl_xprt->addr);
+ if(addr != NULL && addr->sin_family == AF_INET) {
+ /* Now consider ipv4 only */
+ THIS->__retvalue = ntohs(addr->sin_port);
+ return;
+ }
+ }
+ THIS->__retvalue = 0;
%}
function clones_from_clnt:long(clnt:long)
}
%}
+function __file_dev:long (file:long) %{ /* pure */
+ struct file *file = (struct file *)(long)THIS->file;
+ if ((file == NULL) || (file->f_dentry == NULL)) {
+ THIS->__retvalue = 0;
+ return;
+ }
+ THIS->__retvalue = deref(sizeof(file->f_dentry->d_inode->i_sb->s_dev),
+ &(file->f_dentry->d_inode->i_sb->s_dev));
+ if (0) {
+deref_fault:
+ CONTEXT->last_error = "pointer dereference fault";
+ }
+%}
+
+function __file_bdev:long (file:long) %{ /* pure */
+ struct file *file = (struct file *)(long)THIS->file;
+ if ((file == NULL) || (file->f_dentry == NULL)) {
+ THIS->__retvalue = 0;
+ return;
+ }
+ THIS->__retvalue = deref(sizeof(file->f_dentry->d_inode->i_sb->s_bdev),
+ &(file->f_dentry->d_inode->i_sb->s_bdev));
+ if (0) {
+deref_fault:
+ CONTEXT->last_error = "pointer dereference fault";
+ }
+%}
+
+function __file_ino:long (file:long) %{ /* pure */
+ struct file *file = (struct file *)(long)THIS->file;
+ if ((file == NULL) || (file->f_dentry == NULL)) {
+ THIS->__retvalue = 0;
+ return;
+ }
+ THIS->__retvalue = deref(sizeof(file->f_dentry->d_inode->i_ino),
+ &(file->f_dentry->d_inode->i_ino));
+ if (0) {
+deref_fault:
+ CONTEXT->last_error = "pointer dereference fault";
+ }
+%}
+
+function __file_maxbytes:long (file:long) %{ /* pure */
+ struct file *file = (struct file *)(long)THIS->file;
+ if ((file == NULL) || (file->f_dentry == NULL)) {
+ THIS->__retvalue = 0;
+ return;
+ }
+ THIS->__retvalue = deref(sizeof(file->f_dentry->d_inode->i_sb->s_maxbytes),
+ &(file->f_dentry->d_inode->i_sb->s_maxbytes));
+ if (0) {
+deref_fault:
+ CONTEXT->last_error = "pointer dereference fault";
+ }
+%}
+
+function __file_filename:string (file:long) %{ /* pure */
+ struct file *file = (struct file *)(long)THIS->file;
+ if ((file == NULL)
+ || (file->f_dentry == NULL)
+ || (file->f_dentry->d_name.name == NULL))
+ strlcpy(THIS->__retvalue, "NULL", MAXSTRINGLEN);
+ else {
+ strlcpy(THIS->__retvalue, file->f_dentry->d_name.name, MAXSTRINGLEN);
+ }
+%}
+
probe generic.fop.llseek = kernel.function ("generic_file_llseek")
{
- dev = $file->f_dentry->d_inode->i_sb->s_dev
- devname = __find_bdevname(dev, $file->f_dentry->d_inode->i_sb->s_bdev)
- ino = $file->f_dentry->d_inode->i_ino
+ dev = __file_dev($file)
+ devname = __find_bdevname(dev, __file_bdev($file))
+ ino = __file_ino($file)
offset = $offset
origin = $origin
- maxbyte = $file->f_dentry->d_inode->i_sb->s_maxbytes
+ maxbyte = __file_maxbytes($file)
name = "generic_file_llseek"
argstr = sprintf("%d, %d", offset, origin)
probe generic.fop.aio_read = kernel.function ("generic_file_aio_read")
{
- dev = $iocb->ki_filp->f_dentry->d_inode->i_sb->s_dev
- devname = __find_bdevname(dev, $iocb->ki_filp->f_dentry->d_inode->i_sb->s_bdev)
- ino = $iocb->ki_filp->f_dentry->d_inode->i_ino
+ dev = __file_dev($iocb->ki_filp)
+ devname = __find_bdevname(dev, __file_bdev($iocb->ki_filp))
+ ino = __file_ino($iocb->ki_filp)
count = $count
pos = $pos
probe generic.fop.aio_write = kernel.function ("generic_file_aio_write")
{
- dev = $iocb->ki_filp->f_dentry->d_inode->i_sb->s_dev
- devname = __find_bdevname(dev, $iocb->ki_filp->f_dentry->d_inode->i_sb->s_bdev)
- ino = $iocb->ki_filp->f_dentry->d_inode->i_ino
+ dev = __file_dev($iocb->ki_filp)
+ devname = __find_bdevname(dev, __file_bdev($iocb->ki_filp))
+ ino = __file_ino($iocb->ki_filp)
count = $count
pos = $pos
probe generic.fop.readv = kernel.function ("generic_file_readv")
{
- dev = $filp->f_dentry->d_inode->i_sb->s_dev
- devname = __find_bdevname(dev, $filp->f_dentry->d_inode->i_sb->s_bdev)
- ino = $filp->f_dentry->d_inode->i_ino
+ dev = __file_dev($filp)
+ devname = __find_bdevname(dev, __file_bdev($filp))
+ ino = __file_ino($filp)
nr_segs = $nr_segs
pos = ppos_pos($ppos)
/* calls __generic_file_write_nolock */
probe generic.fop.writev = kernel.function ("generic_file_writev")
{
- dev = $file->f_dentry->d_inode->i_sb->s_dev
- devname = __find_bdevname(dev, $file->f_dentry->d_inode->i_sb->s_bdev)
- ino = $file->f_dentry->d_inode->i_ino
+ dev = __file_dev($file)
+ devname = __find_bdevname(dev, __file_bdev($file))
+ ino = __file_ino($file)
nr_segs = $nr_segs
pos = ppos_pos($ppos)
add filemap_nopage, filemap_populate */
probe generic.fop.mmap = kernel.function ("generic_file_mmap")
{
- dev = $file->f_dentry->d_inode->i_sb->s_dev
- devname = __find_bdevname(dev, $file->f_dentry->d_inode->i_sb->s_bdev)
- ino = $file->f_dentry->d_inode->i_ino
+ dev = __file_dev($file)
+ devname = __find_bdevname(dev, __file_bdev($file))
+ ino = __file_ino($file)
vm_start = $vma->vm_start
vm_end = $vma->vm_end
probe generic.fop.open = kernel.function ("generic_file_open")
{
- dev = $filp->f_dentry->d_inode->i_sb->s_dev
- devname = __find_bdevname(dev, $filp->f_dentry->d_inode->i_sb->s_bdev)
+ dev = __file_dev($filp)
+ devname = __find_bdevname(dev, __file_bdev($filp))
ino = $inode->i_ino
- filename = kernel_string($filp->f_dentry->d_name->name)
+ filename = __file_filename($filp)
flag = $filp->f_flags
size = $inode->i_size
probe generic.fop.sendfile = kernel.function ("generic_file_sendfile")
{
- dev = $in_file->f_dentry->d_inode->i_sb->s_dev
- devname = __find_bdevname(dev, $in_file->f_dentry->d_inode->i_sb->s_bdev)
- ino = $in_file->f_dentry->d_inode->i_ino
+ dev = __file_dev($in_file)
+ devname = __find_bdevname(dev, __file_bdev($in_file))
+ ino = __file_ino($in_file)
count = $count
ppos = $ppos
probe generic.fop.splice_read = kernel.function ("generic_file_splice_read")
{
- dev = $in->f_dentry->d_inode->i_sb->s_dev
- devname = __find_bdevname(dev, $in->f_dentry->d_inode->i_sb->s_bdev)
- ino = $in->f_dentry->d_inode->i_ino
+ dev = __file_dev($in)
+ devname = __find_bdevname(dev, __file_bdev($in))
+ ino = __file_ino($in)
len = $len
flags = $flags
probe generic.fop.splice_write = kernel.function ("generic_file_splice_write")
{
- dev = $out->f_dentry->d_inode->i_sb->s_dev
- devname = __find_bdevname(dev, $out->f_dentry->d_inode->i_sb->s_bdev)
- ino = $out->f_dentry->d_inode->i_ino
+ dev = __file_dev($out)
+ devname = __find_bdevname(dev, __file_bdev($out))
+ ino = __file_ino($out)
len = $len
flags = $flags
probe generic.fop.read = kernel.function ("generic_file_read")
{
- dev = $filp->f_dentry->d_inode->i_sb->s_dev
- devname = __find_bdevname(dev, $filp->f_dentry->d_inode->i_sb->s_bdev)
- ino = $filp->f_dentry->d_inode->i_ino
+ dev = __file_dev($filp)
+ devname = __find_bdevname(dev, __file_bdev($filp))
+ ino = __file_ino($filp)
count = $count
probe generic.fop.write = kernel.function ("generic_file_write")
{
- dev = $file->f_dentry->d_inode->i_sb->s_dev
- devname = __find_bdevname(dev, $file->f_dentry->d_inode->i_sb->s_bdev)
- ino = $file->f_dentry->d_inode->i_ino
+ dev = __file_dev($file)
+ devname = __find_bdevname(dev, __file_bdev($file))
+ ino = __file_ino($file)
count = $count
probe vfs.do_sync_read = kernel.function ("do_sync_read")
{
- dev = $filp->f_dentry->d_inode->i_sb->s_dev
- ino = $filp->f_dentry->d_inode->i_ino
+ dev = __file_dev($filp)
+ ino = __file_ino($filp)
len = $len
pos = ppos_pos($ppos)
probe vfs.do_sync_write = kernel.function ("do_sync_write")
{
- dev = $filp->f_dentry->d_inode->i_sb->s_dev
- devname = __find_bdevname(dev, $filp->f_dentry->d_inode->i_sb->s_bdev)
- ino = $filp->f_dentry->d_inode->i_ino
+ dev = __file_dev($filp)
+ devname = __find_bdevname(dev, __file_bdev($filp))
+ ino = __file_ino($filp)
len = $len
pos = ppos_pos($ppos)