Subject: DTrace NFS v3 Provider [PSARC/2008/050 FastTrack timeout 01/24/2008]
To:      PSARC-ext@Sun.Com
Cc:      adam.leventhal@sun.com,sam.falkner@sun.com,lisa.weeks@sun.com
Bcc:     one-pager-list@sac.sfbay one-pager-log@sac.sfbay sac-bar@sac.sfbay


Template Version: @(#)sac_nextcase 1.64 07/13/07 SMI
This information is Copyright 2008 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 DTrace NFS v3 Provider
    1.2. Name of Document Author/Supplier:
	 Author:  Adam Leventhal
    1.3  Date of This Document:
	24 January, 2008
4. Technical Description
The following specification describes the NFS v3 provider for DTrace. It has
been reviewed and approved by the DTrace community; the PSARC case is
closed approved automatic to record the interface. The stability is Committed
and the binding is Patch.

---8<---

NFS v3 Provider

All NFS operation probes have the first argument in common:

	args[0]		conninfo_t *		socket connection information

The conninfo_t structure is already used by the iSCSI target provider (iscsi)
and the NFS v4 provider (nfsv4), and is intended for use by all providers
related to a higher level protocol (e.g. iscsi, nfs, http, ftp).

	typedef struct conninfo {
		string ci_local;        /* local host address */
		string ci_remote;       /* remote host address */
		string ci_protocol;     /* protocol (ipv4, ipv6, etc) */
	} conninfo_t;


Operation probes have their second argument in common:

	args[1]		nfsv3opinfo_t *		NFS v3 operation properties

	typedef struct nfsv3opinfo {
		string noi_curpath;	/* current file handle path (if any) */
		cred_t *noi_cred;	/* credentials */
		uint64_t noi_xid;	/* transaction ID */
	} nfsv4opinfo_t;

Below is a list of the probes along with the specific argument for each
whose type is defined by the NFS v3 specification:

	probe name				args[2]
	----------				-------
	nfsv3:::op-access-start			ACCESS3args *
	nfsv3:::op-access-done			ACCESS3res *
	nfsv3:::op-commit-start			COMMIT3args *
	nfsv3:::op-commit-done			COMMIT3res *
	nfsv3:::op-create-start			CREATE3args *
	nfsv3:::op-create-done			CREATE3res *
	nfsv3:::op-fsinfo-start			FSINFO3args *
	nfsv3:::op-fsinfo-done			FSINFO3res *
	nfsv3:::op-fsstat-start			FSSTAT3args *
	nfsv3:::op-fsstat-done			FSSTAT3res *
	nfsv3:::op-getattr-start		GETATTR3args *
	nfsv3:::op-getattr-done			GETATTR3res *
	nfsv3:::op-lookup-start			LOOKUP3args *
	nfsv3:::op-lookup-done			LOOKUP3res *
	nfsv3:::op-link-start			LINK3args *
	nfsv3:::op-link-done			LINK3res *
	nfsv3:::op-mkdir-start			MKDIR3args *
	nfsv3:::op-mkdir-done			MKDIR3res *
	nfsv3:::op-mknod-start			MKNOD3args *
	nfsv3:::op-mknod-done			MKNOD3res *
	nfsv3:::op-null-start			-
	nfsv3:::op-null-done			-
	nfsv3:::op-pathconf-start		PATHCONF3args *
	nfsv3:::op-pathconf-done		PATHCONF3res *
	nfsv3:::op-read-start			READ3args *
	nfsv3:::op-read-done			READ3res *
	nfsv3:::op-readdir-start		READDIR3args *
	nfsv3:::op-readdir-done			READDIR3res *
	nfsv3:::op-readdirplus-start		READDIRPLUS3args *
	nfsv3:::op-readdirplus-done		READDIRPLUS3res *
	nfsv3:::op-readlink-start		READLINK3args *
	nfsv3:::op-readlink-done		READLINK3res *
	nfsv3:::op-remove-start			REMOVE3args *
	nfsv3:::op-remove-done			REMOVE3res *
	nfsv3:::op-renamestart			RENAME3args *
	nfsv3:::op-rename-done			RENAME3res *
	nfsv3:::op-rmdir-start			RMDIR3args *
	nfsv3:::op-rmdir-done			RMDIR3res *
	nfsv3:::op-setattr-start		SETATTR3args *
	nfsv3:::op-setattr-done			SETATTR3res *
	nfsv3:::op-symlink-start		SYMLINK3args *
	nfsv3:::op-symlink-done			SYMLINK3res *
	nfsv3:::op-write-start			WRITE3args *
	nfsv3:::op-write-done			WRITE3res *

Note that op-null-* probes have an undefined args[2].

Documentation and examples can be found here:

  http://wikis.sun.com/display/DTrace/nfsv3+Provider

The table below describes the DTrace stability levels

                 |  Name            Data            Class                       
    -------------+-------------------------------------------                   
    Provider     |  Evolving        Evolving        ISA                         
    Module       |  Private         Private         Unknown                     
    Function     |  Private         Private         Unknown                     
    Name         |  Evolving        Evolving        ISA                         
    Arguments    |  Evolving        Evolving        ISA                         

6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		OS/Net
    6.5. ARC review type: FastTrack
    6.6. ARC Exposure: open

