diff options
author | Dan McDonald <danmcd@joyent.com> | 2021-02-12 16:42:37 -0500 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2021-02-12 16:42:39 -0500 |
commit | 3b5a24cbde3c794c2a4b77cc402302b0c2fefc1d (patch) | |
tree | 160bd5d1dd9e24baf306c57ade7e84bc5fd3a943 | |
parent | a4b5adf38c4d13d8a0bb4c581f0001585cc2ad4e (diff) | |
parent | d12ea28fc42fd800e7bac951f1fd7607dc8e3afd (diff) | |
download | illumos-joyent-3b5a24cbde3c794c2a4b77cc402302b0c2fefc1d.tar.gz |
[illumos-gate merge]
commit d12ea28fc42fd800e7bac951f1fd7607dc8e3afd
13499 System paging parameters no longer calculated at boot after 13097
commit 44e8cbb5864d29abbabb68852e1d183c9c6e534d
13495 klmmod: multiply-defined symbols
commit aab20b47bd0a2879ccd534e4b5516c6af3f5a1d2
13494 nfs: multiply-defined symbols
commit 592b68f9130dc6c5b980b90fbb93d13a5a4c3265
13433 After cxgbe transceiver is reseated, link does not return to up state
commit 99d0d3f582c9145a267ddfd9fef778459d415339
13476 zfs: multiply-defined symbols
commit 379728489ed47862c4927c75771e767b9476c9c4
13496 libnsl: symbol '_null_auth' is multiply-defined
commit 7449d3727c8ac1ccfb0a4c4de0a9ccf79c1d8cfd
13454 loader: create local copy of mode list provided by vbeinfoblock
commit 168091e5da87ff8dbec35e48d0cebe8b5221365d
13506 smbfs panic on failed open for append
commit 72973a2ec5f92e2ddf35c4a344567980fae70ec1
13453 loader.efi: handle multiple gop instances
commit a8e6450ff6a17b0dab01ca8f09ba123395cf94fa
13485 ratz, some ast tools not necessary
Conflicts:
usr/src/uts/common/os/vm_pageout.c
-rw-r--r-- | usr/src/boot/Makefile.version | 2 | ||||
-rw-r--r-- | usr/src/boot/sys/boot/efi/loader/framebuffer.c | 38 | ||||
-rw-r--r-- | usr/src/boot/sys/boot/i386/libi386/vbe.c | 103 | ||||
-rw-r--r-- | usr/src/cmd/ast/tools/Makefile | 5 | ||||
-rw-r--r-- | usr/src/lib/libnsl/rpc/rpc_prot.c | 23 | ||||
-rw-r--r-- | usr/src/uts/common/fs/nfs/nfs4_state.c | 1 | ||||
-rw-r--r-- | usr/src/uts/common/fs/nfs/nfs_server.c | 7 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbclnt/smbfs/smbfs_smb.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbclnt/smbfs/smbfs_vnops.c | 15 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/zfs_vnops.c | 6 | ||||
-rw-r--r-- | usr/src/uts/common/io/cxgbe/common/t4_hw.c | 21 | ||||
-rw-r--r-- | usr/src/uts/common/klm/klmmod.c | 1 | ||||
-rw-r--r-- | usr/src/uts/common/nfs/nfs4.h | 8 | ||||
-rw-r--r-- | usr/src/uts/common/os/vm_pageout.c | 7 |
14 files changed, 165 insertions, 76 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version index 6f851b7eef..d4b95e1bef 100644 --- a/usr/src/boot/Makefile.version +++ b/usr/src/boot/Makefile.version @@ -34,4 +34,4 @@ LOADER_VERSION = 1.1 # Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes. # The version is processed from left to right, the version number can only # be increased. -BOOT_VERSION = $(LOADER_VERSION)-2020.12.11.1 +BOOT_VERSION = $(LOADER_VERSION)-2021.01.17.2 diff --git a/usr/src/boot/sys/boot/efi/loader/framebuffer.c b/usr/src/boot/sys/boot/efi/loader/framebuffer.c index 534e00cf9c..1100f2e4e1 100644 --- a/usr/src/boot/sys/boot/efi/loader/framebuffer.c +++ b/usr/src/boot/sys/boot/efi/loader/framebuffer.c @@ -46,6 +46,7 @@ #include "gfx_fb.h" #include "framebuffer.h" +EFI_GUID conout_guid = EFI_CONSOLE_OUT_DEVICE_GUID; EFI_GUID gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; static EFI_GUID pciio_guid = EFI_PCI_IO_PROTOCOL_GUID; EFI_GUID uga_guid = EFI_UGA_DRAW_PROTOCOL_GUID; @@ -506,6 +507,8 @@ efifb_get_edid(edid_res_list_t *res) int efi_find_framebuffer(struct efi_fb *efifb) { + EFI_HANDLE h, *hlist; + UINTN nhandles, i, hsize; extern EFI_GRAPHICS_OUTPUT *gop; extern EFI_UGA_DRAW_PROTOCOL *uga; EFI_STATUS status; @@ -514,7 +517,40 @@ efi_find_framebuffer(struct efi_fb *efifb) if (gop != NULL) return (efifb_from_gop(efifb, gop->Mode, gop->Mode->Info)); - status = BS->LocateProtocol(&gop_guid, NULL, (void **)&gop); + hsize = 0; + hlist = NULL; + status = BS->LocateHandle(ByProtocol, &gop_guid, NULL, &hsize, hlist); + if (status == EFI_BUFFER_TOO_SMALL) { + hlist = malloc(hsize); + if (hlist == NULL) + return (ENOMEM); + status = BS->LocateHandle(ByProtocol, &gop_guid, NULL, &hsize, + hlist); + if (EFI_ERROR(status)) + free(hlist); + } + if (EFI_ERROR(status)) + return (efi_status_to_errno(status)); + + nhandles = hsize / sizeof (*hlist); + + /* + * Search for ConOut protocol, if not found, use first handle. + */ + h = *hlist; + for (i = 0; i < nhandles; i++) { + void *dummy = NULL; + + status = OpenProtocolByHandle(hlist[i], &conout_guid, &dummy); + if (status == EFI_SUCCESS) { + h = hlist[i]; + break; + } + } + + status = OpenProtocolByHandle(h, &gop_guid, (void **)&gop); + free(hlist); + if (status == EFI_SUCCESS) { /* Save default mode. */ if (default_mode == UINT32_MAX) { diff --git a/usr/src/boot/sys/boot/i386/libi386/vbe.c b/usr/src/boot/sys/boot/i386/libi386/vbe.c index 4f98cdf747..c48427f5f4 100644 --- a/usr/src/boot/sys/boot/i386/libi386/vbe.c +++ b/usr/src/boot/sys/boot/i386/libi386/vbe.c @@ -47,13 +47,14 @@ static struct vbeinfoblock *vbe = (struct vbeinfoblock *)&vbestate.vbe_control_info; static struct modeinfoblock *vbe_mode = (struct modeinfoblock *)&vbestate.vbe_mode_info; +static uint16_t *vbe_mode_list; +static size_t vbe_mode_list_size; multiboot_color_t *cmap; /* The default VGA color palette format is 6 bits per primary color. */ int palette_format = 6; -#define VESA_MODE_BASE 0x100 -#define VESA_MODE_MAX 0x1ff -#define VESA_MODE_COUNT (VESA_MODE_MAX - VESA_MODE_BASE + 1) +#define VESA_MODE_BASE 0x100 +#define VESA_END_OF_MODE_LIST 0xffff /* Actually assuming mode 3. */ void @@ -278,9 +279,25 @@ vbe_check(void) return (1); } +/* + * Translate selector:offset style address to linear adress. + * selector = farptr >> 16; + * offset = farptr & 0xffff; + * linear = (selector * 4) + offset. + * By using mask 0xffff0000, we wil get the optimised line below. + * As a final step, translate physical address to loader virtual address. + */ +static void * +vbe_farptr(uint32_t farptr) +{ + return (PTOV((((farptr & 0xffff0000) >> 12) + (farptr & 0xffff)))); +} + void vbe_init(void) { + uint16_t *p, *ml; + /* First set FB for text mode. */ gfx_fb.framebuffer_common.mb_type = MULTIBOOT_TAG_TYPE_FRAMEBUFFER; gfx_fb.framebuffer_common.framebuffer_type = @@ -301,9 +318,37 @@ vbe_init(void) if (memcmp(vbe->VbeSignature, "VESA", 4) != 0) return; + /* + * Copy mode list array. We must do this because some systems do + * place this array to scratch memory, which will be reused by + * subsequent VBE calls. (vbox 6.1 is one example). + */ + p = ml = vbe_farptr(vbe->VideoModePtr); + while (*p++ != VESA_END_OF_MODE_LIST) + ; + + vbe_mode_list_size = (uintptr_t)p - (uintptr_t)ml; + + /* + * Since vbe_init() is used only once at very start of the loader, + * we assume malloc will not fail there. But in case it does, + * we point vbe_mode_list to memory pointed by VideoModePtr. + * If the VideoModePtr memory area is not valid, we will fail to + * pick usable VBE mode and fall back to use text mode. + */ + vbe_mode_list = malloc(vbe_mode_list_size); + if (vbe_mode_list == NULL) + vbe_mode_list = ml; + else + bcopy(ml, vbe_mode_list, vbe_mode_list_size); + + /* reset VideoModePtr, to make sure, we only do use vbe_mode_list. */ + vbe->VideoModePtr = 0; + vbestate.mb_type = MULTIBOOT_TAG_TYPE_VBE; vbestate.mb_size = sizeof (vbestate); vbestate.vbe_mode = 0; + /* vbe_set_mode() will set up the rest. */ } @@ -446,12 +491,6 @@ vbe_set_mode(int modenum) return (0); } -static void * -vbe_farptr(uint32_t farptr) -{ - return (PTOV((((farptr & 0xffff0000) >> 12) + (farptr & 0xffff)))); -} - /* * Verify existance of mode number or find mode by * dimensions. If depth is not given, walk values 32, 24, 16, 8. @@ -460,9 +499,9 @@ static int vbe_find_mode_xydm(int x, int y, int depth, int m) { struct modeinfoblock mi; - uint32_t farptr; uint16_t mode; - int safety, i; + size_t idx, nentries; + int i; memset(vbe, 0, sizeof (vbe)); memcpy(vbe->VbeSignature, "VBE2", 4); @@ -470,8 +509,6 @@ vbe_find_mode_xydm(int x, int y, int depth, int m) return (0); if (memcmp(vbe->VbeSignature, "VESA", 4) != 0) return (0); - if (vbe->VideoModePtr == 0) - return (0); if (m != -1) i = 8; @@ -480,17 +517,16 @@ vbe_find_mode_xydm(int x, int y, int depth, int m) else i = depth; + nentries = vbe_mode_list_size / sizeof (*vbe_mode_list); while (i > 0) { - farptr = vbe->VideoModePtr; - safety = 0; - while ((mode = *(uint16_t *)vbe_farptr(farptr)) != 0xffff) { - safety++; - farptr += 2; - if (safety == VESA_MODE_COUNT) - return (0); - if (biosvbe_get_mode_info(mode, &mi) != VBE_SUCCESS) { + for (idx = 0; idx < nentries; idx++) { + mode = vbe_mode_list[idx]; + if (mode == VESA_END_OF_MODE_LIST) + break; + + if (biosvbe_get_mode_info(mode, &mi) != VBE_SUCCESS) continue; - } + /* we only care about linear modes here */ if (vbe_mode_is_supported(&mi) == 0) continue; @@ -624,9 +660,8 @@ void vbe_modelist(int depth) { struct modeinfoblock mi; - uint32_t farptr; uint16_t mode; - int nmodes = 0, safety = 0; + int nmodes, idx, nentries; int ddc_caps; uint_t width, height; bool edid = false; @@ -662,6 +697,7 @@ vbe_modelist(int depth) if (vbe_get_flatpanel(&width, &height)) printf(": Panel %dx%d\n", width, height); + nmodes = 0; memset(vbe, 0, sizeof (vbe)); memcpy(vbe->VbeSignature, "VBE2", 4); if (biosvbe_info(vbe) != VBE_SUCCESS) @@ -672,26 +708,19 @@ vbe_modelist(int depth) vbe_print_vbe_info(vbe); printf("Modes: "); - farptr = vbe->VideoModePtr; - if (farptr == 0) - goto done; - - while ((mode = *(uint16_t *)vbe_farptr(farptr)) != 0xffff) { - safety++; - farptr += 2; - if (safety == VESA_MODE_COUNT) { - printf("[?] "); + nentries = vbe_mode_list_size / sizeof (*vbe_mode_list); + for (idx = 0; idx < nentries; idx++) { + mode = vbe_mode_list[idx]; + if (mode == VESA_END_OF_MODE_LIST) break; - } + if (biosvbe_get_mode_info(mode, &mi) != VBE_SUCCESS) continue; + /* we only care about linear modes here */ if (vbe_mode_is_supported(&mi) == 0) continue; - /* we found some mode so reset safety counter */ - safety = 0; - /* apply requested filter */ if (depth != -1 && mi.BitsPerPixel != depth) continue; diff --git a/usr/src/cmd/ast/tools/Makefile b/usr/src/cmd/ast/tools/Makefile index fafe494dc8..4e7f5fb2e5 100644 --- a/usr/src/cmd/ast/tools/Makefile +++ b/usr/src/cmd/ast/tools/Makefile @@ -15,8 +15,8 @@ SHELL= /usr/bin/ksh93 -CTOOLS= mamake ratz release proto lcgen -SHTOOLS= iffe mamprobe mprobe package gentab +CTOOLS= proto lcgen +SHTOOLS= iffe package gentab TOOLS= $(CTOOLS) $(SHTOOLS) probe OBJS= $(CTOOLS:%=%.o) @@ -82,7 +82,6 @@ STACKPROTECT= none CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-implicit-fallthrough -CERRWARN += -_gcc=-Wno-unused-but-set-variable CERRWARN += -_gcc=-Wno-unused-value CERRWARN += $(CNOWARN_UNINIT) SMATCH= off diff --git a/usr/src/lib/libnsl/rpc/rpc_prot.c b/usr/src/lib/libnsl/rpc/rpc_prot.c index 27488d7b09..78202dcabc 100644 --- a/usr/src/lib/libnsl/rpc/rpc_prot.c +++ b/usr/src/lib/libnsl/rpc/rpc_prot.c @@ -33,8 +33,6 @@ * California. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This set of routines implements the rpc message definition, * its serializer and some common rpc utility routines. @@ -52,8 +50,6 @@ /* * * * * * * * * * * * * * XDR Authentication * * * * * * * * * * * */ -struct opaque_auth _null_auth; - /* * XDR an opaque authentication struct * (see auth.h) @@ -63,7 +59,7 @@ xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap) { if (xdr_enum(xdrs, &(ap->oa_flavor))) return (xdr_bytes(xdrs, &ap->oa_base, - &ap->oa_length, MAX_AUTH_BYTES)); + &ap->oa_length, MAX_AUTH_BYTES)); return (FALSE); } @@ -137,7 +133,7 @@ xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg) rmsg->rm_reply.rp_stat == MSG_ACCEPTED && rmsg->rm_direction == REPLY && (buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT + (rndup = - RNDUP(rmsg->rm_reply.rp_acpt.ar_verf.oa_length)))) != NULL) { + RNDUP(rmsg->rm_reply.rp_acpt.ar_verf.oa_length)))) != NULL) { IXDR_PUT_INT32(buf, rmsg->rm_xid); IXDR_PUT_ENUM(buf, rmsg->rm_direction); IXDR_PUT_ENUM(buf, rmsg->rm_reply.rp_stat); @@ -162,7 +158,7 @@ xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg) switch (ar->ar_stat) { case SUCCESS: return ((*(ar->ar_results.proc)) - (xdrs, ar->ar_results.where)); + (xdrs, ar->ar_results.where)); case PROG_MISMATCH: if (!xdr_u_int(xdrs, (uint_t *)&(ar->ar_vers.low))) return (FALSE); @@ -180,7 +176,7 @@ xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg) if (rmsg->rm_reply.rp_stat != MSG_ACCEPTED) { if (rmsg->rm_reply.rp_stat == MSG_DENIED) return (xdr_rejected_reply(xdrs, - &rmsg->rm_reply.rp_rjct)); + &rmsg->rm_reply.rp_rjct)); return (FALSE); } ar = &rmsg->rm_reply.rp_acpt; @@ -201,8 +197,7 @@ xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg) oa->oa_base = malloc(oa->oa_length); if (oa->oa_base == NULL) { syslog(LOG_ERR, - "xdr_replymsg : " - "out of memory."); + "xdr_replymsg : out of memory."); rpc_callerr.re_status = RPC_SYSTEMERROR; return (FALSE); } @@ -225,7 +220,7 @@ xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg) switch (ar->ar_stat) { case SUCCESS: return ((*(ar->ar_results.proc)) - (xdrs, ar->ar_results.where)); + (xdrs, ar->ar_results.where)); case PROG_MISMATCH: if (!xdr_u_int(xdrs, (uint_t *)&(ar->ar_vers.low))) return (FALSE); @@ -244,8 +239,8 @@ xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg) xdr_enum(xdrs, (enum_t *)&(rmsg->rm_direction)) && (rmsg->rm_direction == REPLY)) return (xdr_union(xdrs, (enum_t *)&(rmsg->rm_reply.rp_stat), - (caddr_t)&(rmsg->rm_reply.ru), - reply_dscrm, NULL_xdrproc_t)); + (caddr_t)&(rmsg->rm_reply.ru), + reply_dscrm, NULL_xdrproc_t)); return (FALSE); } @@ -264,7 +259,7 @@ xdr_callhdr(XDR *xdrs, struct rpc_msg *cmsg) xdr_enum(xdrs, (enum_t *)&(cmsg->rm_direction)) && xdr_u_int(xdrs, (uint_t *)&(cmsg->rm_call.cb_rpcvers)) && xdr_u_int(xdrs, (uint_t *)&(cmsg->rm_call.cb_prog))) { - return (xdr_u_int(xdrs, (uint_t *)&(cmsg->rm_call.cb_vers))); + return (xdr_u_int(xdrs, (uint_t *)&(cmsg->rm_call.cb_vers))); } return (FALSE); } diff --git a/usr/src/uts/common/fs/nfs/nfs4_state.c b/usr/src/uts/common/fs/nfs/nfs4_state.c index 0c1efb26df..b95dd6fb02 100644 --- a/usr/src/uts/common/fs/nfs/nfs4_state.c +++ b/usr/src/uts/common/fs/nfs/nfs4_state.c @@ -74,6 +74,7 @@ stateid4 special1 = { int rfs4_debug; #endif +rfs4_db_mem_cache_t rfs4_db_mem_cache_table[RFS4_DB_MEM_CACHE_NUM]; static uint32_t rfs4_database_debug = 0x00; /* CSTYLED */ diff --git a/usr/src/uts/common/fs/nfs/nfs_server.c b/usr/src/uts/common/fs/nfs/nfs_server.c index 5b7658d048..b916f727d9 100644 --- a/usr/src/uts/common/fs/nfs/nfs_server.c +++ b/usr/src/uts/common/fs/nfs/nfs_server.c @@ -115,6 +115,13 @@ krwlock_t nfssrv_globals_rwl; kmem_cache_t *nfs_xuio_cache; int nfs_loaned_buffers = 0; +/* array of paths passed-in from nfsd command-line; stored in nvlist */ +char **rfs4_dss_newpaths; +uint_t rfs4_dss_numnewpaths; + +/* nvlists of all DSS paths: current, and before last warmstart */ +nvlist_t *rfs4_dss_paths, *rfs4_dss_oldpaths; + int _init(void) { diff --git a/usr/src/uts/common/fs/smbclnt/smbfs/smbfs_smb.c b/usr/src/uts/common/fs/smbclnt/smbfs/smbfs_smb.c index 73b5c62225..16b9987972 100644 --- a/usr/src/uts/common/fs/smbclnt/smbfs/smbfs_smb.c +++ b/usr/src/uts/common/fs/smbclnt/smbfs/smbfs_smb.c @@ -34,7 +34,7 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * - * Copyright 2019 Nexenta by DDN, Inc. All rights reserved. + * Copyright 2021 Tintri by DDN, Inc. All rights reserved. */ #include <sys/param.h> @@ -439,7 +439,7 @@ out: if (fhp != NULL) smb_fh_rele(fhp); - return (0); + return (error); } void diff --git a/usr/src/uts/common/fs/smbclnt/smbfs/smbfs_vnops.c b/usr/src/uts/common/fs/smbclnt/smbfs/smbfs_vnops.c index 3fca806155..c19e92976f 100644 --- a/usr/src/uts/common/fs/smbclnt/smbfs/smbfs_vnops.c +++ b/usr/src/uts/common/fs/smbclnt/smbfs/smbfs_vnops.c @@ -34,7 +34,7 @@ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2018 Nexenta Systems, Inc. All rights reserved. + * Copyright 2021 Tintri by DDN, Inc. All rights reserved. */ /* @@ -326,6 +326,7 @@ smbfs_open(vnode_t **vpp, int flag, cred_t *cr, caller_context_t *ct) /* * We have a new FID and access rights. */ + VERIFY(fid != NULL); oldfid = np->n_fid; np->n_fid = fid; np->n_fidrefs++; @@ -562,6 +563,10 @@ smbfs_read(vnode_t *vp, struct uio *uiop, int ioflag, cred_t *cr, if (smi->smi_flags & SMI_DEAD || vp->v_vfsp->vfs_flag & VFS_UNMOUNTED) return (EIO); + /* Sanity check: should have a valid open */ + if (np->n_fid == NULL) + return (EIO); + ASSERT(smbfs_rw_lock_held(&np->r_rwlock, RW_READER)); if (vp->v_type != VREG) @@ -723,6 +728,10 @@ smbfs_write(vnode_t *vp, struct uio *uiop, int ioflag, cred_t *cr, if (smi->smi_flags & SMI_DEAD || vp->v_vfsp->vfs_flag & VFS_UNMOUNTED) return (EIO); + /* Sanity check: should have a valid open */ + if (np->n_fid == NULL) + return (EIO); + ASSERT(smbfs_rw_lock_held(&np->r_rwlock, RW_WRITER)); if (vp->v_type != VREG) @@ -4427,6 +4436,10 @@ smbfs_map(vnode_t *vp, offset_t off, struct as *as, caddr_t *addrp, if (smi->smi_flags & SMI_DEAD || vp->v_vfsp->vfs_flag & VFS_UNMOUNTED) return (EIO); + /* Sanity check: should have a valid open */ + if (np->n_fid == NULL) + return (EIO); + if (vp->v_flag & VNOMAP) return (ENOSYS); diff --git a/usr/src/uts/common/fs/zfs/zfs_vnops.c b/usr/src/uts/common/fs/zfs/zfs_vnops.c index 6672d85702..1cb2ede931 100644 --- a/usr/src/uts/common/fs/zfs/zfs_vnops.c +++ b/usr/src/uts/common/fs/zfs/zfs_vnops.c @@ -5589,7 +5589,6 @@ zfs_isdir() /* * Directory vnode operations template */ -vnodeops_t *zfs_dvnodeops; const fs_operation_def_t zfs_dvnodeops_template[] = { VOPNAME_OPEN, { .vop_open = zfs_open }, VOPNAME_CLOSE, { .vop_close = zfs_close }, @@ -5622,7 +5621,6 @@ const fs_operation_def_t zfs_dvnodeops_template[] = { /* * Regular file vnode operations template */ -vnodeops_t *zfs_fvnodeops; const fs_operation_def_t zfs_fvnodeops_template[] = { VOPNAME_OPEN, { .vop_open = zfs_open }, VOPNAME_CLOSE, { .vop_close = zfs_close }, @@ -5657,7 +5655,6 @@ const fs_operation_def_t zfs_fvnodeops_template[] = { /* * Symbolic link vnode operations template */ -vnodeops_t *zfs_symvnodeops; const fs_operation_def_t zfs_symvnodeops_template[] = { VOPNAME_GETATTR, { .vop_getattr = zfs_getattr }, VOPNAME_SETATTR, { .vop_setattr = zfs_setattr }, @@ -5674,7 +5671,6 @@ const fs_operation_def_t zfs_symvnodeops_template[] = { /* * special share hidden files vnode operations template */ -vnodeops_t *zfs_sharevnodeops; const fs_operation_def_t zfs_sharevnodeops_template[] = { VOPNAME_GETATTR, { .vop_getattr = zfs_getattr }, VOPNAME_ACCESS, { .vop_access = zfs_access }, @@ -5700,7 +5696,6 @@ const fs_operation_def_t zfs_sharevnodeops_template[] = { * zfs_link() - no links into/out of attribute space * zfs_rename() - no moves into/out of attribute space */ -vnodeops_t *zfs_xdvnodeops; const fs_operation_def_t zfs_xdvnodeops_template[] = { VOPNAME_OPEN, { .vop_open = zfs_open }, VOPNAME_CLOSE, { .vop_close = zfs_close }, @@ -5731,7 +5726,6 @@ const fs_operation_def_t zfs_xdvnodeops_template[] = { /* * Error vnode operations template */ -vnodeops_t *zfs_evnodeops; const fs_operation_def_t zfs_evnodeops_template[] = { VOPNAME_INACTIVE, { .vop_inactive = zfs_inactive }, VOPNAME_PATHCONF, { .vop_pathconf = zfs_pathconf }, diff --git a/usr/src/uts/common/io/cxgbe/common/t4_hw.c b/usr/src/uts/common/io/cxgbe/common/t4_hw.c index 4bb48f1b3a..82f7555945 100644 --- a/usr/src/uts/common/io/cxgbe/common/t4_hw.c +++ b/usr/src/uts/common/io/cxgbe/common/t4_hw.c @@ -9351,6 +9351,7 @@ void t4_handle_get_port_info(struct port_info *pi, const __be64 *rpl) enum fw_port_module_type mod_type; unsigned int speed, fc, fec; fw_port_cap32_t pcaps, acaps, lpacaps, linkattr; + boolean_t fec_changed; /* * Extract the various fields from the Port Information message. @@ -9452,8 +9453,11 @@ void t4_handle_get_port_info(struct port_info *pi, const __be64 *rpl) t4_os_portmod_changed(adapter, pi->port_id); } + fec_changed = fec != (lc->requested_fec == FEC_AUTO ? + lc->fec : lc->requested_fec); if (link_ok != lc->link_ok || speed != lc->speed || - fc != lc->fc || fec != lc->fec) { /* something changed */ + fc != lc->fc || fec_changed) { + /* something changed */ if (!link_ok && lc->link_ok) { lc->link_down_rc = linkdnrc; CH_WARN_RATELIMIT(adapter, @@ -9464,6 +9468,13 @@ void t4_handle_get_port_info(struct port_info *pi, const __be64 *rpl) lc->speed = speed; lc->fc = fc; lc->fec = fec; + if (fec_changed) { + /* + * If the fec is not as requested we need + * to save the l1 config. + */ + lc->redo_l1cfg = B_TRUE; + } lc->lpacaps = lpacaps; lc->acaps = acaps & ADVERT_MASK; @@ -9691,10 +9702,12 @@ static void init_link_config(struct link_config *lc, fw_port_cap32_t pcaps, if (fec_supported(pcaps)) { /* - * For Forward Error Control, we default to whatever the Firmware - * tells us the Link is currently advertising. + * For Forward Error Control, we default to whatever the + * Firmware tells us the Link is currently advertising. + * We also retain any overrides set. */ - lc->requested_fec = FEC_AUTO; + if (lc->requested_fec == 0) + lc->requested_fec = FEC_AUTO; lc->fec = fwcap_to_cc_fec(lc->def_acaps); } else { lc->requested_fec = FEC_NONE; diff --git a/usr/src/uts/common/klm/klmmod.c b/usr/src/uts/common/klm/klmmod.c index 02a0b49e66..8a714ec686 100644 --- a/usr/src/uts/common/klm/klmmod.c +++ b/usr/src/uts/common/klm/klmmod.c @@ -62,7 +62,6 @@ void (*lm_set_nlm_status)(int nlm_id, flk_nlm_status_t) = NULL; */ void (*lm_remove_file_locks)(int) = NULL; -krwlock_t lm_lck; zone_key_t nlm_zone_key; /* diff --git a/usr/src/uts/common/nfs/nfs4.h b/usr/src/uts/common/nfs/nfs4.h index 450b05b64c..48e6194d8a 100644 --- a/usr/src/uts/common/nfs/nfs4.h +++ b/usr/src/uts/common/nfs/nfs4.h @@ -383,11 +383,11 @@ typedef struct rfs4_dss_path { } rfs4_dss_path_t; /* array of paths passed-in from nfsd command-line; stored in nvlist */ -char **rfs4_dss_newpaths; -uint_t rfs4_dss_numnewpaths; +extern char **rfs4_dss_newpaths; +extern uint_t rfs4_dss_numnewpaths; /* nvlists of all DSS paths: current, and before last warmstart */ -nvlist_t *rfs4_dss_paths, *rfs4_dss_oldpaths; +extern nvlist_t *rfs4_dss_paths, *rfs4_dss_oldpaths; /* * The server maintains a set of state on a per client basis that @@ -876,7 +876,7 @@ typedef struct rfs4_db_mem_cache { #define RFS4_DB_MEM_CACHE_NUM 8 -rfs4_db_mem_cache_t rfs4_db_mem_cache_table[RFS4_DB_MEM_CACHE_NUM]; +extern rfs4_db_mem_cache_t rfs4_db_mem_cache_table[RFS4_DB_MEM_CACHE_NUM]; extern srv_deleg_policy_t nfs4_get_deleg_policy(); diff --git a/usr/src/uts/common/os/vm_pageout.c b/usr/src/uts/common/os/vm_pageout.c index 45e90c34c3..f3c2fe1e88 100644 --- a/usr/src/uts/common/os/vm_pageout.c +++ b/usr/src/uts/common/os/vm_pageout.c @@ -21,6 +21,7 @@ /* * Copyright 2021 Oxide Computer Company + * Copyright 2021 OmniOS Community Edition (OmniOSce) Association. */ /* @@ -1387,9 +1388,11 @@ loop: pageout_sample_pages += pcount; pageout_sample_etime += sample_end - sample_start; ++pageout_sample_cnt; - } else { + } + + if (!PAGE_SCAN_STARTUP) { /* - * We have run enough samples, set the spread. + * We have enough samples, set the spread. */ pageout_rate = (hrrate_t)pageout_sample_pages * (hrrate_t)(NANOSEC) / pageout_sample_etime; |