From owner-svn-src-stable-8@FreeBSD.ORG Tue Jan 11 01:12:51 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DA78106566C; Tue, 11 Jan 2011 01:12:51 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BFB88FC12; Tue, 11 Jan 2011 01:12:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0B1CoPi001569; Tue, 11 Jan 2011 01:12:50 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0B1Cop7001566; Tue, 11 Jan 2011 01:12:50 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201101110112.p0B1Cop7001566@svn.freebsd.org> From: Rick Macklem Date: Tue, 11 Jan 2011 01:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217251 - in stable/8/sys/fs: nfs nfsserver X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jan 2011 01:12:51 -0000 Author: rmacklem Date: Tue Jan 11 01:12:50 2011 New Revision: 217251 URL: http://svn.freebsd.org/changeset/base/217251 Log: MFC: r216784 Delete the nfsvno_localconflict() function in the experimental NFS server since it is no longer used and is broken. Modified: stable/8/sys/fs/nfs/nfs_var.h stable/8/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfs/nfs_var.h ============================================================================== --- stable/8/sys/fs/nfs/nfs_var.h Tue Jan 11 01:11:07 2011 (r217250) +++ stable/8/sys/fs/nfs/nfs_var.h Tue Jan 11 01:12:50 2011 (r217251) @@ -571,8 +571,6 @@ int nfsvno_fhtovp(mount_t, fhandle_t *, int nfsvno_pathconf(vnode_t, int, register_t *, struct ucred *, NFSPROC_T *); vnode_t nfsvno_getvp(fhandle_t *); -int nfsvno_localconflict(vnode_t, int, u_int64_t, u_int64_t, - struct nfslockconflict *, NFSPROC_T *); int nfsvno_advlock(vnode_t, int, u_int64_t, u_int64_t, NFSPROC_T *); void nfsvno_unlockvfs(mount_t); int nfsvno_lockvfs(mount_t); Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Tue Jan 11 01:11:07 2011 (r217250) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Tue Jan 11 01:12:50 2011 (r217251) @@ -2781,66 +2781,6 @@ nfsvno_getvp(fhandle_t *fhp) } /* - * Check to see it a byte range lock held by a process running - * locally on the server conflicts with the new lock. - */ -int -nfsvno_localconflict(struct vnode *vp, int ftype, u_int64_t first, - u_int64_t end, struct nfslockconflict *cfp, struct thread *td) -{ - int error; - struct flock fl; - - if (!nfsrv_dolocallocks) - return (0); - fl.l_whence = SEEK_SET; - fl.l_type = ftype; - fl.l_start = (off_t)first; - if (end == NFS64BITSSET) - fl.l_len = 0; - else - fl.l_len = (off_t)(end - first); - /* - * For FreeBSD8, the l_pid and l_sysid must be set to the same - * values for all calls, so that all locks will be held by the - * nfsd server. (The nfsd server handles conflicts between the - * various clients.) - * Since an NFSv4 lockowner is a ClientID plus an array of up to 1024 - * bytes, so it can't be put in l_sysid. - */ - if (nfsv4_sysid == 0) - nfsv4_sysid = nlm_acquire_next_sysid(); - fl.l_pid = (pid_t)0; - fl.l_sysid = (int)nfsv4_sysid; - - NFSVOPUNLOCK(vp, 0, td); - error = VOP_ADVLOCK(vp, (caddr_t)td->td_proc, F_GETLK, &fl, - (F_POSIX | F_REMOTE)); - NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY, td); - if (error) - return (error); - if (fl.l_type == F_UNLCK) - return (0); - if (cfp != NULL) { - cfp->cl_clientid.lval[0] = cfp->cl_clientid.lval[1] = 0; - cfp->cl_first = (u_int64_t)fl.l_start; - if (fl.l_len == 0) - cfp->cl_end = NFS64BITSSET; - else - cfp->cl_end = (u_int64_t) - (fl.l_start + fl.l_len); - if (fl.l_type == F_WRLCK) - cfp->cl_flags = NFSLCK_WRITE; - else - cfp->cl_flags = NFSLCK_READ; - sprintf(cfp->cl_owner, "LOCALID%d", fl.l_pid); - cfp->cl_ownerlen = strlen(cfp->cl_owner); - return (NFSERR_DENIED); - } - return (NFSERR_INVAL); -} - -/* * Do a local VOP_ADVLOCK(). */ int