FreeBSD/sys/fs/nfsclient/nfs_clvnops.c
/*
 * nfs read rpc call
 * Ditto above
 */
nfs read rpc call
Ditto above
nfs read rpc call Ditto above
int
ncl_readrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred)
{
	int error, ret, attrflag;
	struct nfsvattr nfsva;
	struct nfsmount *nmp;
	nmp = VFSTONFS(vnode_mount(vp));
	error = EIO;
	attrflag = 0;
	if (NFSHASPNFS(nmp))
		error = nfscl_doiods(vp, uiop, NULL, NULL,
		    NFSV4OPEN_ACCESSREAD, cred, uiop->uio_td);
	NFSCL_DEBUG(4, "readrpc: aft doiods=%d\n", error);
	if (error != 0)
		error = nfsrpc_read(vp, uiop, cred, uiop->uio_td, &nfsva,
		    &attrflag, NULL);
	if (attrflag) {
		ret = nfscl_loadattrcache(&vp, &nfsva, NULL, NULL, 0, 1);
		if (ret && !error)
			error = ret;
	}
	if (error && NFS_ISV4(vp))
		error = nfscl_maperr(uiop->uio_td, error, (uid_t)0, (gid_t)0);
	return (error);
}
int ncl_readrpc ( struct vnode * vp , struct uio * uiop , struct ucred * cred ) { int error , ret , attrflag ; struct nfsvattr nfsva ; struct nfsmount * nmp ; nmp = VFSTONFS ( vnode_mount ( vp ) ) ; error = EIO ; attrflag = 0 ; if ( NFSHASPNFS ( nmp ) ) error = nfscl_doiods ( vp , uiop , NULL , NULL , NFSV4OPEN_ACCESSREAD , cred , uiop -> uio_td ) ; NFSCL_DEBUG ( 4 , " \n " , error ) ; if ( error != 0 ) error = nfsrpc_read ( vp , uiop , cred , uiop -> uio_td , & nfsva , & attrflag , NULL ) ; if ( attrflag ) { ret = nfscl_loadattrcache ( & vp , & nfsva , NULL , NULL , 0 , 1 ) ; if ( ret && ! error ) error = ret ; } if ( error && NFS_ISV4 ( vp ) ) error = nfscl_maperr ( uiop -> uio_td , error , ( uid_t ) 0 , ( gid_t ) 0 ) ; return ( error ) ; }
nfs read rpc call
 Ditto above
nfs read rpc call Ditto above