From owner-svn-src-all@freebsd.org Thu Apr 9 14:44:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4AE9B2BBF78; Thu, 9 Apr 2020 14:44:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ykSd1BGMz4gBH; Thu, 9 Apr 2020 14:44:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 23D91E687; Thu, 9 Apr 2020 14:44:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 039EinJl049063; Thu, 9 Apr 2020 14:44:49 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 039EikOO049053; Thu, 9 Apr 2020 14:44:46 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202004091444.039EikOO049053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 9 Apr 2020 14:44:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359745 - in head/sys: conf fs/nfs fs/nfsclient fs/nfsserver kern modules modules/nfslock nfs nlm sys X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys: conf fs/nfs fs/nfsclient fs/nfsserver kern modules modules/nfslock nfs nlm sys X-SVN-Commit-Revision: 359745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2020 14:44:49 -0000 Author: rmacklem Date: Thu Apr 9 14:44:46 2020 New Revision: 359745 URL: https://svnweb.freebsd.org/changeset/base/359745 Log: Remove the old NFS lock device driver that uses Giant. This NFS lock device driver was replaced by the kernel NLM around FreeBSD7 and has not normally been used since then. To use it, the kernel had to be built without "options NFSLOCKD" and the nfslockd.ko had to be deleted as well. Since it uses Giant and is no longer used, this patch removes it. With this device driver removed, there is now a lot of unused code in the userland rpc.lockd. That will be removed on a future commit. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D22933 Deleted: head/sys/modules/nfslock/ head/sys/nfs/nfs_lock.c Modified: head/sys/conf/files head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/kern/kern_exit.c head/sys/kern/kern_thread.c head/sys/modules/Makefile head/sys/nlm/nlm_prot_impl.c head/sys/sys/proc.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Apr 9 08:34:27 2020 (r359744) +++ head/sys/conf/files Thu Apr 9 14:44:46 2020 (r359745) @@ -3489,10 +3489,10 @@ fs/msdosfs/msdosfs_iconv.c optional msdosfs_iconv fs/msdosfs/msdosfs_lookup.c optional msdosfs fs/msdosfs/msdosfs_vfsops.c optional msdosfs fs/msdosfs/msdosfs_vnops.c optional msdosfs -fs/nfs/nfs_commonkrpc.c optional nfscl | nfsd -fs/nfs/nfs_commonsubs.c optional nfscl | nfsd -fs/nfs/nfs_commonport.c optional nfscl | nfsd -fs/nfs/nfs_commonacl.c optional nfscl | nfsd +fs/nfs/nfs_commonkrpc.c optional nfscl | nfslockd | nfsd +fs/nfs/nfs_commonsubs.c optional nfscl | nfslockd | nfsd +fs/nfs/nfs_commonport.c optional nfscl | nfslockd | nfsd +fs/nfs/nfs_commonacl.c optional nfscl | nfslockd | nfsd fs/nfsclient/nfs_clcomsubs.c optional nfscl fs/nfsclient/nfs_clsubs.c optional nfscl fs/nfsclient/nfs_clstate.c optional nfscl @@ -4434,8 +4434,7 @@ nfs/bootp_subr.c optional bootp nfscl nfs/krpc_subr.c optional bootp nfscl nfs/nfs_diskless.c optional nfscl nfs_root nfs/nfs_fha.c optional nfsd -nfs/nfs_lock.c optional nfscl | nfslockd | nfsd -nfs/nfs_nfssvc.c optional nfscl | nfsd +nfs/nfs_nfssvc.c optional nfscl | nfslockd | nfsd nlm/nlm_advlock.c optional nfslockd | nfsd nlm/nlm_prot_clnt.c optional nfslockd | nfsd nlm/nlm_prot_impl.c optional nfslockd | nfsd Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Thu Apr 9 08:34:27 2020 (r359744) +++ head/sys/fs/nfs/nfs_commonport.c Thu Apr 9 14:44:46 2020 (r359745) @@ -74,6 +74,8 @@ struct nfsdevicehead nfsrv_devidhead; volatile int nfsrv_devidcnt = 0; void (*nfsd_call_servertimer)(void) = NULL; void (*ncl_call_invalcaches)(struct vnode *) = NULL; +vop_advlock_t *nfs_advlock_p = NULL; +vop_reclaim_t *nfs_reclaim_p = NULL; int nfs_pnfsio(task_fn_t *, void *); Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Thu Apr 9 08:34:27 2020 (r359744) +++ head/sys/fs/nfsclient/nfs_clport.c Thu Apr 9 14:44:46 2020 (r359745) @@ -1412,5 +1412,4 @@ MODULE_VERSION(nfscl, 1); MODULE_DEPEND(nfscl, nfscommon, 1, 1, 1); MODULE_DEPEND(nfscl, krpc, 1, 1, 1); MODULE_DEPEND(nfscl, nfssvc, 1, 1, 1); -MODULE_DEPEND(nfscl, nfslock, 1, 1, 1); Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Thu Apr 9 08:34:27 2020 (r359744) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Thu Apr 9 14:44:46 2020 (r359745) @@ -152,7 +152,6 @@ MODULE_VERSION(nfs, 1); MODULE_DEPEND(nfs, nfscommon, 1, 1, 1); MODULE_DEPEND(nfs, krpc, 1, 1, 1); MODULE_DEPEND(nfs, nfssvc, 1, 1, 1); -MODULE_DEPEND(nfs, nfslock, 1, 1, 1); /* * This structure is now defined in sys/nfs/nfs_diskless.c so that it Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Thu Apr 9 08:34:27 2020 (r359744) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Thu Apr 9 14:44:46 2020 (r359745) @@ -6443,7 +6443,6 @@ DECLARE_MODULE(nfsd, nfsd_mod, SI_SUB_VFS, SI_ORDER_AN /* So that loader and kldload(2) can find us, wherever we are.. */ MODULE_VERSION(nfsd, 1); MODULE_DEPEND(nfsd, nfscommon, 1, 1, 1); -MODULE_DEPEND(nfsd, nfslock, 1, 1, 1); MODULE_DEPEND(nfsd, nfslockd, 1, 1, 1); MODULE_DEPEND(nfsd, krpc, 1, 1, 1); MODULE_DEPEND(nfsd, nfssvc, 1, 1, 1); Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Thu Apr 9 08:34:27 2020 (r359744) +++ head/sys/kern/kern_exit.c Thu Apr 9 14:44:46 2020 (r359745) @@ -96,9 +96,6 @@ dtrace_execexit_func_t dtrace_fasttrap_exit; SDT_PROVIDER_DECLARE(proc); SDT_PROBE_DEFINE1(proc, , , exit, "int"); -/* Hook for NFS teardown procedure. */ -void (*nlminfo_release_p)(struct proc *p); - struct proc * proc_realparent(struct proc *child) { @@ -364,12 +361,6 @@ exit1(struct thread *td, int rval, int signo) * F_SETOWN with our pid. */ funsetownlst(&p->p_sigiolst); - - /* - * If this process has an nlminfo data area (for lockd), release it - */ - if (nlminfo_release_p != NULL && p->p_nlminfo != NULL) - (*nlminfo_release_p)(p); /* * Close open files and release open-file table. Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Thu Apr 9 08:34:27 2020 (r359744) +++ head/sys/kern/kern_thread.c Thu Apr 9 14:44:46 2020 (r359745) @@ -90,11 +90,11 @@ _Static_assert(offsetof(struct proc, p_flag) == 0xb0, "struct proc KBI p_flag"); _Static_assert(offsetof(struct proc, p_pid) == 0xbc, "struct proc KBI p_pid"); -_Static_assert(offsetof(struct proc, p_filemon) == 0x3c0, +_Static_assert(offsetof(struct proc, p_filemon) == 0x3b8, "struct proc KBI p_filemon"); -_Static_assert(offsetof(struct proc, p_comm) == 0x3d8, +_Static_assert(offsetof(struct proc, p_comm) == 0x3d0, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b8, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b0, "struct proc KBI p_emuldata"); #endif #ifdef __i386__ @@ -110,11 +110,11 @@ _Static_assert(offsetof(struct proc, p_flag) == 0x68, "struct proc KBI p_flag"); _Static_assert(offsetof(struct proc, p_pid) == 0x74, "struct proc KBI p_pid"); -_Static_assert(offsetof(struct proc, p_filemon) == 0x26c, +_Static_assert(offsetof(struct proc, p_filemon) == 0x268, "struct proc KBI p_filemon"); -_Static_assert(offsetof(struct proc, p_comm) == 0x280, +_Static_assert(offsetof(struct proc, p_comm) == 0x27c, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x30c, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x308, "struct proc KBI p_emuldata"); #endif Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Apr 9 08:34:27 2020 (r359744) +++ head/sys/modules/Makefile Thu Apr 9 14:44:46 2020 (r359745) @@ -259,7 +259,6 @@ SUBDIR= \ nfscl \ nfscommon \ nfsd \ - nfslock \ nfslockd \ nfssvc \ nge \ Modified: head/sys/nlm/nlm_prot_impl.c ============================================================================== --- head/sys/nlm/nlm_prot_impl.c Thu Apr 9 08:34:27 2020 (r359744) +++ head/sys/nlm/nlm_prot_impl.c Thu Apr 9 14:44:46 2020 (r359745) @@ -2411,5 +2411,5 @@ DECLARE_MODULE(nfslockd, nfslockd_mod, SI_SUB_VFS, SI_ /* So that loader and kldload(2) can find us, wherever we are.. */ MODULE_DEPEND(nfslockd, krpc, 1, 1, 1); -MODULE_DEPEND(nfslockd, nfslock, 1, 1, 1); +MODULE_DEPEND(nfslockd, nfscommon, 1, 1, 1); MODULE_VERSION(nfslockd, 1); Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Thu Apr 9 08:34:27 2020 (r359744) +++ head/sys/sys/proc.h Thu Apr 9 14:44:46 2020 (r359745) @@ -182,7 +182,6 @@ struct kcov_info; struct kdtrace_proc; struct kdtrace_thread; struct mqueue_notifier; -struct nlminfo; struct p_sched; struct proc; struct procdesc; @@ -645,7 +644,6 @@ struct proc { int p_sigparent; /* (c) Signal to parent on exit. */ int p_sig; /* (n) For core dump/debugger XXX. */ u_int p_ptevents; /* (c + e) ptrace() event mask. */ - struct nlminfo *p_nlminfo; /* (?) Only used by/for lockd. */ struct kaioinfo *p_aioinfo; /* (y) ASYNC I/O info. */ struct thread *p_singlethread;/* (c + j) If single threading this is it */ int p_suspcount; /* (j) Num threads in suspended mode. */