#! stap -p4


probe nfs.proc.lookup {
	printf("%s(%s)\n", name, argstr)
	printf("%s %d %d %d\n", server_ip, prot, version, name_len)
	printf("%d %d\n", bitmask0, bitmask1)
}
probe nfs.proc.lookup.return {
	printf("%d: %s(%s)\n", version, name, retstr)
}

probe nfs.proc.read ? {
	printf("%s(%s)\n", name, argstr)
	printf("%s %d %d %d %d %s\n", server_ip, prot, version, flags,
		size, units)
}
probe nfs.proc.read.return ? {
	printf("%d: %s(%s)\n", version, name, retstr)
}

probe nfs.proc.write ? {
	printf("%s(%s)\n", name, argstr)
	printf("%s %d %d %d %d %s\n", server_ip, prot, version, flags,
		size, units)
	printf("%d %d\n", bitmask0, bitmask1)
}
probe nfs.proc.write.return ? {
	printf("%d: %s(%s)\n", version, name, retstr)
	printf("%d %s\n", size, units)
}

probe nfs.proc.commit ? {
	printf("%s(%s)\n", name, argstr)
	printf("%s %d %d %d %s\n", server_ip, prot, version, size, units)
	printf("%d %d\n", bitmask0, bitmask1)
}
probe nfs.proc.commit.return ? {
	printf("%d: %s(%s)\n", version, name, retstr)
	printf("%d %s\n", size, units)
}


probe nfs.proc.read_setup {
	printf("%s(%s)\n", name, argstr)
	printf("%d %s %d %d %d %s\n", client, server_ip, prot,
		version, size, units)
}
probe nfs.proc.read_setup.return {
	printf("%d: %s(%d)\n", version, name, retvalue)
}

probe nfs.proc.read_done {
	printf("%s(%s)\n", name, argstr)
	printf("%s %d %d %d\n", server_ip, prot, count, version)
	printf("%d\n", timestamp)
}
probe nfs.proc.read_done.return {
	printf("%d: %s(%s)\n", version, name, retstr)
}

probe nfs.proc.write_setup {
	printf("%s(%s)\n", name, argstr)
	printf("%d %s %d %d %d %s\n", client, server_ip, prot,
		version, size, units)
	printf("%d %d %d\n", how, bitmask0, bitmask1)
}
probe nfs.proc.write_setup.return {
	printf("%d: %s(%d)\n", version, name, retvalue)
}

probe nfs.proc.write_done {
	printf("%s(%s)\n", name, argstr)
	printf("%s %d %d %d %d\n", server_ip, prot, count, valid, version)
	printf("%d\n", timestamp)
}
probe nfs.proc.write_done.return {
	printf("%d: %s(%s)\n", version, name, retstr)
}

probe nfs.proc.commit_setup {
	printf("%s(%s)\n", name, argstr)
	printf("%d %s %d %d %d %s\n", client, server_ip, prot,
		version, size, units)
	printf("%d %d\n", bitmask0, bitmask1)
}
probe nfs.proc.commit_setup.return {
	printf("%d: %s(%d)\n", version, name, retvalue)
}

probe nfs.proc.commit_done {
	printf("%s(%s)\n", name, argstr)
	printf("%s %d %d %d %d\n", server_ip, prot, count, valid, version)
	printf("%d\n", timestamp)
}
probe nfs.proc.commit_done.return {
	printf("%d: %s(%s)\n", version, name, retstr)
}

probe nfs.proc.rename_setup {
	printf("%s(%s)\n", name, argstr)
	printf("%d %s %d %d\n", client, server_ip, prot,
		version)
	printf("%d\n", fh)
}
probe nfs.proc.rename_setup.return {
	printf("%d: %s(%d)\n", version, name, retvalue)
}

probe nfs.proc.rename_done {
	printf("%s(%s)\n", name, argstr)
	printf("%s %d %d\n", server_ip, prot, version)
	printf("%d %d\n", timestamp, status)
	printf("%d %d\n", old_fh, new_fh)
}
probe nfs.proc.rename_done.return {
	printf("%d: %s(%s)\n", version, name, retstr)
}

probe nfs.proc.open {
	printf("%s(%s)\n", name, argstr)
	printf("%s %d %d\n", server_ip, prot, version)
}
probe nfs.proc.open.return {
	printf("%s(%s)\n", name, retstr)
}

probe nfs.proc.release ? {
	printf("%s(%s)\n", name, argstr)
	printf("%s %d %d\n", server_ip, prot, version)
}
probe nfs.proc.release.return ? {
	printf("%s(%s)\n", name, retstr)
}

probe nfs.proc.handle_exception {
	printf("%s(%s)\n", name, argstr)
	printf("%d\n", version)
}
probe nfs.proc.handle_exception.return {
	printf("%s(%s)\n", name, retstr)
}

probe nfs.proc.create {
	printf("%s(%s)\n", name, argstr)
	printf("%s %d %d %d %d %d\n", server_ip, prot, version, fh,
		filelen, mode)
}
probe nfs.proc.create.return {
	printf("%d: %s(%s)\n", version, name, retstr)
}

probe nfs.proc.remove {
	printf("%s(%s)\n", name, argstr)
	printf("%s %d %d %d %d\n", server_ip, prot, version, fh,
		filelen)
}
probe nfs.proc.remove.return {
	printf("%d: %s(%s)\n", version, name, retstr)
}

probe nfs.proc.rename {
	printf("%s(%s)\n", name, argstr)
	printf("%s %d %d\n", server_ip, prot, version)
	printf("%d %d %s\n", old_fh, old_filelen, old_name)
	printf("%d %d %s\n", new_fh, new_filelen, new_name)
}
probe nfs.proc.rename.return {
	printf("%d: %s(%s)\n", version, name, retstr)
}
