From owner-p4-projects@FreeBSD.ORG Tue Jun 1 17:28:19 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6C226106567B; Tue, 1 Jun 2010 17:28:19 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3095A1065672 for ; Tue, 1 Jun 2010 17:28:19 +0000 (UTC) (envelope-from gpf@FreeBSD.org) Received: from repoman.freebsd.org (unknown [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1538FC0C for ; Tue, 1 Jun 2010 17:28:19 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o51HSINx012816 for ; Tue, 1 Jun 2010 17:28:18 GMT (envelope-from gpf@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o51HSI4W012814 for perforce@freebsd.org; Tue, 1 Jun 2010 17:28:18 GMT (envelope-from gpf@FreeBSD.org) Date: Tue, 1 Jun 2010 17:28:18 GMT Message-Id: <201006011728.o51HSI4W012814@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gpf@FreeBSD.org using -f From: Efstratios Karatzas To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 179052 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2010 17:28:19 -0000 http://p4web.freebsd.org/@@179052?ac=10 Change 179052 by gpf@gpf_desktop on 2010/06/01 17:28:11 The new nfs implementation gave me some trouble but I managed to make it work as both server and client. This is a minor change, now we're just keeping track of what rpcs are actually getting serviced and where they come from. This is for non-compound rpcs. Should probably check and see what happens when the reply is returned from the cache and we are actually executing the rpc. Affected files ... .. //depot/projects/soc2010/gpf_audit/freebsd/src/sys/fs/nfsserver/nfs_nfsdsocket.c#2 edit Differences ... ==== //depot/projects/soc2010/gpf_audit/freebsd/src/sys/fs/nfsserver/nfs_nfsdsocket.c#2 (text+ko) ==== @@ -268,6 +268,8 @@ }; #endif /* !APPLEKEXT */ +#include + /* * Static array that defines which nfs rpc's are nonidempotent */ @@ -428,8 +430,14 @@ * The group is indicated by the value in nfs_retfh[]. */ if (nd->nd_flag & ND_NFSV4) { + printf("compound rpc enter\n"); nfsrvd_compound(nd, isdgram, p); + printf("compound rpc exit\n"); } else { + printf("non compound rpc %d\n", nd->nd_procnum); + AUDIT_NFS_ENTER(nd->nd_procnum, nd->nd_cred, curthread); + if (nd->nd_nam != NULL) + AUDIT_ARG_SOCKADDR_IN((struct sockaddr_in *)nd->nd_nam); if (nfs_retfh[nd->nd_procnum] == 1) { if (vp) NFSVOPUNLOCK(vp, 0, p); @@ -442,6 +450,7 @@ error = (*(nfsrv3_procs0[nd->nd_procnum]))(nd, isdgram, vp, p, &nes); } + AUDIT_NFS_EXIT(error, curthread); if (mp) { if (nfs_writerpc[nd->nd_procnum]) NFS_ENDWRITE(mp); @@ -699,6 +708,8 @@ nd->nd_flag |= ND_SAVEREPLY; NFSINCRGLOBAL(newnfsstats.srvrpccnt[nd->nd_procnum]); switch (op) { + /* xxx gpf */ + printf("op = %d\n", op); case NFSV4OP_PUTFH: error = nfsrv_mtofh(nd, &fh); if (error)