Joeri Vanthienen
2010-08-15 12:52:51 UTC
Hi,
I want to check which process is changing permissions and the path of the file the process has changed.
process is no problem, but can't find a way to extract the path from the zfsvfs_t type.
#!/usr/sbin/dtrace -s
fbt:zfs:zfs_acl_chmod:entry
{
trace(uid);
trace(pid);
trace(execname);
self->path = ((zfsvfs_t*)arg0)->z_root;
}
fbt:zfs:zfs_acl_chmod:return
{
printf("z_root node %d\n",self->path);
}
...
dtrace: script './zfschmoddtrace' matched 2 probes
CPU ID FUNCTION:NAME
7 44525 zfs_acl_chmod:entry 0 675 smbd
7 44526 zfs_acl_chmod:return z_root node 4
7 44525 zfs_acl_chmod:entry 0 675 smbd
7 44526 zfs_acl_chmod:return z_root node 4
7 44525 zfs_acl_chmod:entry 0 675 smbd
7 44526 zfs_acl_chmod:return z_root node 4
7 44525 zfs_acl_chmod:entry 1 673 idmapd
7 44526 zfs_acl_chmod:return z_root node 4
...
***@san:~# mdb -k
Loading modules: [ unix genunix specfs dtrace mac cpu.generic uppc pcplusmp scsi_vhci zfs sata sd sockfs ip hook neti sctp arp usba uhci stmf lofs idm mpt nfs random smbsrv cpc crypto logindmux ptm nsctl sdbc ufs nsmb sv rdc ii ]
void (*)(zfsvfs_t *, uint64_t, zfs_acl_t *)
I want to check which process is changing permissions and the path of the file the process has changed.
process is no problem, but can't find a way to extract the path from the zfsvfs_t type.
#!/usr/sbin/dtrace -s
fbt:zfs:zfs_acl_chmod:entry
{
trace(uid);
trace(pid);
trace(execname);
self->path = ((zfsvfs_t*)arg0)->z_root;
}
fbt:zfs:zfs_acl_chmod:return
{
printf("z_root node %d\n",self->path);
}
...
dtrace: script './zfschmoddtrace' matched 2 probes
CPU ID FUNCTION:NAME
7 44525 zfs_acl_chmod:entry 0 675 smbd
7 44526 zfs_acl_chmod:return z_root node 4
7 44525 zfs_acl_chmod:entry 0 675 smbd
7 44526 zfs_acl_chmod:return z_root node 4
7 44525 zfs_acl_chmod:entry 0 675 smbd
7 44526 zfs_acl_chmod:return z_root node 4
7 44525 zfs_acl_chmod:entry 1 673 idmapd
7 44526 zfs_acl_chmod:return z_root node 4
...
***@san:~# mdb -k
Loading modules: [ unix genunix specfs dtrace mac cpu.generic uppc pcplusmp scsi_vhci zfs sata sd sockfs ip hook neti sctp arp usba uhci stmf lofs idm mpt nfs random smbsrv cpc crypto logindmux ptm nsctl sdbc ufs nsmb sv rdc ii ]
zfs_acl_chmod::nm -f ctype
C Typevoid (*)(zfsvfs_t *, uint64_t, zfs_acl_t *)
--
This message posted from opensolaris.org
This message posted from opensolaris.org