Date: Sat, 5 Sep 2020 02:16:11 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365356 - in stable/12/sys: cddl/contrib/opensolaris/uts/common/fs/zfs conf modules modules/krpc modules/xdr rpc sys xdr Message-ID: <202009050216.0852GBBg090078@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Sat Sep 5 02:16:10 2020 New Revision: 365356 URL: https://svnweb.freebsd.org/changeset/base/365356 Log: MFC r360035-r360037: Split XDR off, minimize ZFS dependency __FreeBSD_version bumped to indicate the change. r360035: Move M_RPC malloc type into XDR. Both RPC and XDR libraries use this type, but since RPC depends on XDR (not vice versa) we need it defined in XDR to make the module loadable without RPC. r360036: Split XDR into separate kernel module. Make krpc depend on xdr. r360037: Make ZFS depend on xdr.ko only. It doesn't need kernel RPC. Added: stable/12/sys/modules/xdr/ - copied from r360036, head/sys/modules/xdr/ Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/12/sys/conf/files stable/12/sys/conf/options stable/12/sys/modules/Makefile stable/12/sys/modules/krpc/Makefile stable/12/sys/rpc/rpc_generic.c stable/12/sys/rpc/rpc_prot.c stable/12/sys/sys/param.h stable/12/sys/xdr/xdr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sat Sep 5 00:50:52 2020 (r365355) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sat Sep 5 02:16:10 2020 (r365356) @@ -7342,5 +7342,5 @@ static moduledata_t zfs_mod = { DECLARE_MODULE(zfsctrl, zfs_mod, SI_SUB_VFS, SI_ORDER_ANY); MODULE_VERSION(zfsctrl, 1); MODULE_DEPEND(zfsctrl, opensolaris, 1, 1, 1); -MODULE_DEPEND(zfsctrl, krpc, 1, 1, 1); +MODULE_DEPEND(zfsctrl, xdr, 1, 1, 1); MODULE_DEPEND(zfsctrl, acl_nfs4, 1, 1, 1); Modified: stable/12/sys/conf/files ============================================================================== --- stable/12/sys/conf/files Sat Sep 5 00:50:52 2020 (r365355) +++ stable/12/sys/conf/files Sat Sep 5 02:16:10 2020 (r365356) @@ -5044,9 +5044,9 @@ xen/xenbus/xenbusb.c optional xenhvm xen/xenbus/xenbusb_front.c optional xenhvm xen/xenbus/xenbusb_back.c optional xenhvm xen/xenmem/xenmem_if.m optional xenhvm -xdr/xdr.c optional krpc | nfslockd | nfscl | nfsd -xdr/xdr_array.c optional krpc | nfslockd | nfscl | nfsd -xdr/xdr_mbuf.c optional krpc | nfslockd | nfscl | nfsd -xdr/xdr_mem.c optional krpc | nfslockd | nfscl | nfsd -xdr/xdr_reference.c optional krpc | nfslockd | nfscl | nfsd -xdr/xdr_sizeof.c optional krpc | nfslockd | nfscl | nfsd +xdr/xdr.c optional xdr | krpc | nfslockd | nfscl | nfsd +xdr/xdr_array.c optional xdr | krpc | nfslockd | nfscl | nfsd +xdr/xdr_mbuf.c optional xdr | krpc | nfslockd | nfscl | nfsd +xdr/xdr_mem.c optional xdr | krpc | nfslockd | nfscl | nfsd +xdr/xdr_reference.c optional xdr | krpc | nfslockd | nfscl | nfsd +xdr/xdr_sizeof.c optional xdr | krpc | nfslockd | nfscl | nfsd Modified: stable/12/sys/conf/options ============================================================================== --- stable/12/sys/conf/options Sat Sep 5 00:50:52 2020 (r365355) +++ stable/12/sys/conf/options Sat Sep 5 02:16:10 2020 (r365356) @@ -472,6 +472,7 @@ TCP_RFC7413_MAX_KEYS opt_inet.h TCP_RFC7413_MAX_PSKS opt_inet.h TCP_SIGNATURE opt_ipsec.h VLAN_ARRAY opt_vlan.h +XDR XBONEHACK # Modified: stable/12/sys/modules/Makefile ============================================================================== --- stable/12/sys/modules/Makefile Sat Sep 5 00:50:52 2020 (r365355) +++ stable/12/sys/modules/Makefile Sat Sep 5 02:16:10 2020 (r365356) @@ -422,6 +422,7 @@ SUBDIR= \ ${_wpi} \ ${_wpifw} \ ${_x86bios} \ + xdr \ ${_xe} \ xl \ xz \ Modified: stable/12/sys/modules/krpc/Makefile ============================================================================== --- stable/12/sys/modules/krpc/Makefile Sat Sep 5 00:50:52 2020 (r365355) +++ stable/12/sys/modules/krpc/Makefile Sat Sep 5 02:16:10 2020 (r365356) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${SRCTOP}/sys/rpc ${SRCTOP}/sys/xdr +.PATH: ${SRCTOP}/sys/rpc KMOD= krpc SRCS= auth_none.c \ auth_unix.c \ @@ -22,13 +22,6 @@ SRCS= auth_none.c \ svc_dg.c \ svc_generic.c \ svc_vc.c \ - -SRCS+= xdr.c \ - xdr_array.c \ - xdr_mbuf.c \ - xdr_mem.c \ - xdr_reference.c \ - xdr_sizeof.c SRCS+= opt_inet6.h Modified: stable/12/sys/rpc/rpc_generic.c ============================================================================== --- stable/12/sys/rpc/rpc_generic.c Sat Sep 5 00:50:52 2020 (r365355) +++ stable/12/sys/rpc/rpc_generic.c Sat Sep 5 02:16:10 2020 (r365356) @@ -886,3 +886,4 @@ DECLARE_MODULE(krpc, krpc_mod, SI_SUB_VFS, SI_ORDER_AN /* So that loader and kldload(2) can find us, wherever we are.. */ MODULE_VERSION(krpc, 1); +MODULE_DEPEND(krpc, xdr, 1, 1, 1); Modified: stable/12/sys/rpc/rpc_prot.c ============================================================================== --- stable/12/sys/rpc/rpc_prot.c Sat Sep 5 00:50:52 2020 (r365355) +++ stable/12/sys/rpc/rpc_prot.c Sat Sep 5 02:16:10 2020 (r365356) @@ -61,8 +61,6 @@ __FBSDID("$FreeBSD$"); #include <rpc/clnt.h> #include <rpc/rpc_msg.h> -MALLOC_DEFINE(M_RPC, "rpc", "Remote Procedure Call"); - #define assert(exp) KASSERT(exp, ("bad arguments")) static enum clnt_stat accepted(enum accept_stat, struct rpc_err *); Modified: stable/12/sys/sys/param.h ============================================================================== --- stable/12/sys/sys/param.h Sat Sep 5 00:50:52 2020 (r365355) +++ stable/12/sys/sys/param.h Sat Sep 5 02:16:10 2020 (r365356) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1201523 /* Master, propagated to newvers */ +#define __FreeBSD_version 1201524 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: stable/12/sys/xdr/xdr.c ============================================================================== --- stable/12/sys/xdr/xdr.c Sat Sep 5 00:50:52 2020 (r365355) +++ stable/12/sys/xdr/xdr.c Sat Sep 5 02:16:10 2020 (r365356) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/kernel.h> #include <sys/malloc.h> +#include <sys/module.h> #include <rpc/rpc.h> #include <rpc/rpc_com.h> @@ -65,6 +66,8 @@ typedef u_quad_t u_longlong_t; /* ANSI unsign #define XDR_FALSE ((long) 0) #define XDR_TRUE ((long) 1) +MALLOC_DEFINE(M_RPC, "rpc", "Remote Procedure Call"); + /* * for unit alignment */ @@ -834,3 +837,20 @@ xdr_u_longlong_t(XDR *xdrs, u_longlong_t *ullp) */ return (xdr_uint64_t(xdrs, (uint64_t *)ullp)); } + +/* + * Kernel module glue + */ +static int +xdr_modevent(module_t mod, int type, void *data) +{ + + return (0); +} +static moduledata_t xdr_mod = { + "xdr", + xdr_modevent, + NULL, +}; +DECLARE_MODULE(xdr, xdr_mod, SI_SUB_VFS, SI_ORDER_ANY); +MODULE_VERSION(xdr, 1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009050216.0852GBBg090078>