{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":1584339,"defaultBranch":"master","name":"illumos-joyent","ownerLogin":"TritonDataCenter","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2011-04-07T20:50:31.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/100366084?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1716565656.0","currentOid":""},"activityList":{"items":[{"before":"5ea3536ab90fd957a8ed80b8975e97bb7a954e07","after":"853c1c7e63112ef2cc378d0b58e9e2a31af490b6","ref":"refs/heads/OS-8443","pushedAt":"2024-05-24T15:50:05.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"OS-8443 Update Bhyve SMBIOS Manufacturer","shortMessageHtmlLink":"OS-8443 Update Bhyve SMBIOS Manufacturer"}},{"before":null,"after":"5ea3536ab90fd957a8ed80b8975e97bb7a954e07","ref":"refs/heads/OS-8443","pushedAt":"2024-05-24T15:47:36.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"OS-8443 Update Bhyve SMBIOS Manufacturer","shortMessageHtmlLink":"OS-8443 Update Bhyve SMBIOS Manufacturer"}},{"before":"26bbeeb72d838a46549a49e2e3c896e8ee944f91","after":"579fd4cbb95e4e4c6fcc7e2e633af26c482c38b3","ref":"refs/heads/OS-8543","pushedAt":"2024-05-22T20:12:28.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"Add lx_unsupported() call (fix caller some more)","shortMessageHtmlLink":"Add lx_unsupported() call (fix caller some more)"}},{"before":"3b2267a71a62a26147231aa664ff9f71cd346d56","after":"60bc1b303372ba7b979085558f6dab5482cb5575","ref":"refs/heads/master","pushedAt":"2024-05-20T16:57:43.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"16538 fifofs should track tv_nsec (fix lx)\n\nNOTE: Previous merge commit should read:\n\n [illumos-gate merge]\n\n commit cd9ea253fe43247db7ca9d20404804e8f2926e21\n 16564 mdb nv_resize() doesn't correctly handle UM_GC\n commit 63b16c4bd3a0bfb84c8fba1973a8b5e476545701\n 16565 smbadm: diagnostic messages are missing newline\n commit 8bfb438df96fa91c2b1b34db1cc562e9330aba32\n 16538 fifofs should track tv_nsec\n commit d8048045f75b60d97deaf376b39d437b027becd1\n 16531 clean up low-hanging warnings in cmd/audio\n commit 3b363e384673bd88fc57814d909651859c7c41a3\n 16530 cmd/audio should deal in big-endian and little-endian, not sparc and i386\n commit 38cb0f8da322259cf87fc5829f835f5f7e61adfb\n 15277 update demangle(1) man page to indicate both the legacy and v0 rust mangling formats are supported\n commit f17620a4f72a29025a22655ba8735ccd20ae174f\n 16517 Overhaul section 9 intro pages\n commit 888cdcce412c4564892695498708992a5c310cce\n 15909 clean up build in dfs.cmds\n\n Conflicts:\n usr/src/uts/common/fs/fifofs/fifosubr.c","shortMessageHtmlLink":"16538 fifofs should track tv_nsec (fix lx)"}},{"before":"28e7d46df57987446e23af5c73100752ae0d202e","after":"3b2267a71a62a26147231aa664ff9f71cd346d56","ref":"refs/heads/master","pushedAt":"2024-05-19T19:42:59.000Z","pushType":"push","commitsCount":9,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"/*\n * CDDL HEADER START\n *\n * The contents of this file are subject to the terms of the\n * Common Development and Distribution License (the \"License\").\n * You may not use this file except in compliance with the License.\n *\n * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE\n * or http://www.opensolaris.org/os/licensing.\n * See the License for the specific language governing permissions\n * and limitations under the License.\n *\n * When distributing Covered Code, include this CDDL HEADER in each\n * file and include the License file at usr/src/OPENSOLARIS.LICENSE.\n * If applicable, add the following below this CDDL HEADER, with the\n * fields enclosed by brackets \"[]\" replaced with your own identifying\n * information: Portions Copyright [yyyy] [name of copyright owner]\n *\n * CDDL HEADER END\n */\n/*\tCopyright (c) 1984, 1986, 1987, 1988, 1989 AT&T\t*/\n\n/*\n * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.\n * Copyright 2017 Joyent, Inc.\n * Copyright 2024 Oxide Computer Company\n */\n\n/*\n * The routines defined in this file are supporting routines for FIFOFS\n * file system type.\n */\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#if FIFODEBUG\nint Fifo_fastmode = 1;\t\t/* pipes/fifos will be opened in fast mode */\nint Fifo_verbose = 0;\t\t/* msg when switching out of fast mode */\n#endif\n\n/*\n * This is the loadable module wrapper.\n */\n#include \n\nextern struct qinit fifo_strdata;\n\nstruct vfsops *fifo_vfsops;\n\nstatic vfsdef_t vfw = {\n\tVFSDEF_VERSION,\n\t\"fifofs\",\n\tfifoinit,\n\tVSW_ZMOUNT,\n\tNULL\n};\n\n/*\n * Module linkage information for the kernel.\n */\nextern struct mod_ops mod_fsops;\n\nstatic struct modlfs modlfs = {\n\t&mod_fsops, \"filesystem for fifo\", &vfw\n};\n\nstatic struct modlinkage modlinkage = {\n\tMODREV_1, (void *)&modlfs, NULL\n};\n\nint\n_init()\n{\n\treturn (mod_install(&modlinkage));\n}\n\nint\n_info(struct modinfo *modinfop)\n{\n\treturn (mod_info(&modlinkage, modinfop));\n}\n\n/*\n * Define data structures within this file.\n * XXX should the hash size be configurable ?\n */\n#define\tFIFOSHFT\t5\n#define\tFIFO_HASHSZ\t63\n\n#if ((FIFO_HASHSZ & (FIFO_HASHSZ - 1)) == 0)\n#define\tFIFOHASH(vp) (((uintptr_t)(vp) >> FIFOSHFT) & (FIFO_HASHSZ - 1))\n#else\n#define\tFIFOHASH(vp) (((uintptr_t)(vp) >> FIFOSHFT) % FIFO_HASHSZ)\n#endif\n\nfifonode_t\t*fifoalloc[FIFO_HASHSZ];\ndev_t\t\tfifodev;\nstruct vfs\t*fifovfsp;\nint\t\tfifofstype;\n\nkmutex_t ftable_lock;\nstatic kmutex_t fino_lock;\nstruct kmem_cache *fnode_cache;\nstruct kmem_cache *pipe_cache;\n\nstatic void fifoinsert(fifonode_t *);\nstatic fifonode_t *fifofind(vnode_t *);\nstatic int fifo_connld(struct vnode **, int, cred_t *);\nstatic void fifo_fastturnoff(fifonode_t *);\n\nstatic void fifo_reinit_vp(vnode_t *);\n\nstatic void fnode_destructor(void *, void *);\n\n/*\n * Constructor/destructor routines for fifos and pipes.\n *\n * In the interest of code sharing, we define a common fifodata structure\n * which consists of a fifolock and one or two fnodes. A fifo contains\n * one fnode; a pipe contains two. The fifolock is shared by the fnodes,\n * each of which points to it:\n *\n *\t--> -->\t--------- --- ---\n *\t| |\t| lock\t| |\t|\n *\t| |\t--------- |\t|\n *\t| |\t|\t| fifo\t|\n *\t| --- | fnode\t| |\t|\n *\t|\t|\t| | pipe\n *\t|\t--------- ---\t|\n *\t|\t|\t|\t|\n *\t------- | fnode\t|\t|\n *\t\t|\t|\t|\n *\t\t--------- ---\n *\n * Since the fifolock is at the beginning of the fifodata structure,\n * the fifolock address is the same as the fifodata address. Thus,\n * we can determine the fifodata address from any of its member fnodes.\n * This is essential for fifo_inactive.\n *\n * The fnode constructor is designed to handle any fifodata structure,\n * deducing the number of fnodes from the total size. Thus, the fnode\n * constructor does most of the work for the pipe constructor.\n */\nstatic int\nfnode_constructor(void *buf, void *cdrarg, int kmflags)\n{\n\tfifodata_t *fdp = buf;\n\tfifolock_t *flp = &fdp->fifo_lock;\n\tfifonode_t *fnp = &fdp->fifo_fnode[0];\n\tsize_t size = (uintptr_t)cdrarg;\n\n\tmutex_init(&flp->flk_lock, NULL, MUTEX_DEFAULT, NULL);\n\tcv_init(&flp->flk_wait_cv, NULL, CV_DEFAULT, NULL);\n\tflp->flk_ocsync = 0;\n\n\twhile ((char *)fnp < (char *)buf + size) {\n\n\t\tvnode_t *vp;\n\n\t\tvp = vn_alloc(kmflags);\n\t\tif (vp == NULL) {\n\t\t\tfnp->fn_vnode = NULL; /* mark for destructor */\n\t\t\tfnode_destructor(buf, cdrarg);\n\t\t\treturn (-1);\n\t\t}\n\t\tfnp->fn_vnode = vp;\n\n\t\tfnp->fn_lock = flp;\n\t\tfnp->fn_open = 0;\n\t\tfnp->fn_dest = fnp;\n\t\tfnp->fn_mp = NULL;\n\t\tfnp->fn_count = 0;\n\t\tfnp->fn_hiwat = FIFOHIWAT;\n\t\tfnp->fn_rsynccnt = 0;\n\t\tfnp->fn_wsynccnt = 0;\n\t\tfnp->fn_wwaitcnt = 0;\n\t\tfnp->fn_insync = 0;\n\t\tfnp->fn_pcredp = NULL;\n\t\tfnp->fn_cpid = -1;\n\t\t/*\n\t\t * 32-bit stat(2) may fail if fn_ino isn't initialized\n\t\t */\n\t\tfnp->fn_ino = 0;\n\n\t\tcv_init(&fnp->fn_wait_cv, NULL, CV_DEFAULT, NULL);\n\n\t\tvn_setops(vp, fifo_vnodeops);\n\t\tvp->v_stream = NULL;\n\t\tvp->v_type = VFIFO;\n\t\tvp->v_data = (caddr_t)fnp;\n\t\tvp->v_flag = VNOMAP | VNOSWAP;\n\t\tvn_exists(vp);\n\t\tfnp++;\n\t}\n\treturn (0);\n}\n\nstatic void\nfnode_destructor(void *buf, void *cdrarg)\n{\n\tfifodata_t *fdp = buf;\n\tfifolock_t *flp = &fdp->fifo_lock;\n\tfifonode_t *fnp = &fdp->fifo_fnode[0];\n\tsize_t size = (uintptr_t)cdrarg;\n\n\tmutex_destroy(&flp->flk_lock);\n\tcv_destroy(&flp->flk_wait_cv);\n\tASSERT(flp->flk_ocsync == 0);\n\n\twhile ((char *)fnp < (char *)buf + size) {\n\n\t\tvnode_t *vp = FTOV(fnp);\n\n\t\tif (vp == NULL) {\n\t\t\treturn; /* constructor failed here */\n\t\t}\n\n\t\tASSERT(fnp->fn_mp == NULL);\n\t\tASSERT(fnp->fn_count == 0);\n\t\tASSERT(fnp->fn_lock == flp);\n\t\tASSERT(fnp->fn_open == 0);\n\t\tASSERT(fnp->fn_insync == 0);\n\t\tASSERT(fnp->fn_rsynccnt == 0 && fnp->fn_wsynccnt == 0);\n\t\tASSERT(fnp->fn_wwaitcnt == 0);\n\t\tASSERT(fnp->fn_pcredp == NULL);\n\t\tASSERT(vn_matchops(vp, fifo_vnodeops));\n\t\tASSERT(vp->v_stream == NULL);\n\t\tASSERT(vp->v_type == VFIFO);\n\t\tASSERT(vp->v_data == (caddr_t)fnp);\n\t\tASSERT((vp->v_flag & (VNOMAP|VNOSWAP)) == (VNOMAP|VNOSWAP));\n\n\t\tcv_destroy(&fnp->fn_wait_cv);\n\t\tvn_invalid(vp);\n\t\tvn_free(vp);\n\n\t\tfnp++;\n\t}\n}\n\nstatic int\npipe_constructor(void *buf, void *cdrarg, int kmflags)\n{\n\tfifodata_t *fdp = buf;\n\tfifonode_t *fnp1 = &fdp->fifo_fnode[0];\n\tfifonode_t *fnp2 = &fdp->fifo_fnode[1];\n\tvnode_t *vp1;\n\tvnode_t *vp2;\n\n\t(void) fnode_constructor(buf, cdrarg, kmflags);\n\n\tvp1 = FTOV(fnp1);\n\tvp2 = FTOV(fnp2);\n\n\tvp1->v_vfsp\t= vp2->v_vfsp\t\t= fifovfsp;\n\tvp1->v_rdev\t= vp2->v_rdev\t\t= fifodev;\n\tfnp1->fn_realvp\t= fnp2->fn_realvp\t= NULL;\n\tfnp1->fn_dest\t= fnp2;\n\tfnp2->fn_dest\t= fnp1;\n\n\treturn (0);\n}\n\nstatic void\npipe_destructor(void *buf, void *cdrarg)\n{\n#ifdef DEBUG\n\tfifodata_t *fdp = buf;\n\tfifonode_t *fnp1 = &fdp->fifo_fnode[0];\n\tfifonode_t *fnp2 = &fdp->fifo_fnode[1];\n\tvnode_t *vp1 = FTOV(fnp1);\n\tvnode_t *vp2 = FTOV(fnp2);\n\n\tASSERT(vp1->v_vfsp == fifovfsp);\n\tASSERT(vp2->v_vfsp == fifovfsp);\n\tASSERT(vp1->v_rdev == fifodev);\n\tASSERT(vp2->v_rdev == fifodev);\n#endif\n\tfnode_destructor(buf, cdrarg);\n}\n\n/*\n * Reinitialize a FIFO vnode (uses normal vnode reinit, but ensures that\n * vnode type and flags are reset).\n */\n\nstatic void fifo_reinit_vp(vnode_t *vp)\n{\n\tvn_reinit(vp);\n\tvp->v_type = VFIFO;\n\tvp->v_flag &= VROOT;\n\tvp->v_flag |= VNOMAP | VNOSWAP;\n}\n\n/*\n * Save file system type/index, initialize vfs operations vector, get\n * unique device number for FIFOFS and initialize the FIFOFS hash.\n * Create and initialize a \"generic\" vfs pointer that will be placed\n * in the v_vfsp field of each pipe's vnode.\n */\nint\nfifoinit(int fstype, char *name)\n{\n\tstatic const fs_operation_def_t fifo_vfsops_template[] = {\n\t\tNULL, NULL\n\t};\n\tint error;\n\tmajor_t dev;\n\n\tfifofstype = fstype;\n\terror = vfs_setfsops(fstype, fifo_vfsops_template, &fifo_vfsops);\n\tif (error != 0) {\n\t\tcmn_err(CE_WARN, \"fifoinit: bad vfs ops template\");\n\t\treturn (error);\n\t}\n\n\terror = vn_make_ops(name, fifo_vnodeops_template, &fifo_vnodeops);\n\tif (error != 0) {\n\t\t(void) vfs_freevfsops_by_type(fstype);\n\t\tcmn_err(CE_WARN, \"fifoinit: bad vnode ops template\");\n\t\treturn (error);\n\t}\n\n\tif ((dev = getudev()) == (major_t)-1) {\n\t\tcmn_err(CE_WARN, \"fifoinit: can't get unique device number\");\n\t\tdev = 0;\n\t}\n\tfifodev = makedevice(dev, 0);\n\n\tfifovfsp = kmem_zalloc(sizeof (struct vfs), KM_SLEEP);\n\tfifovfsp->vfs_next = NULL;\n\tvfs_setops(fifovfsp, fifo_vfsops);\n\tfifovfsp->vfs_vnodecovered = NULL;\n\tfifovfsp->vfs_flag = 0;\n\tfifovfsp->vfs_bsize = 1024;\n\tfifovfsp->vfs_fstype = fifofstype;\n\tvfs_make_fsid(&fifovfsp->vfs_fsid, fifodev, fifofstype);\n\tfifovfsp->vfs_data = NULL;\n\tfifovfsp->vfs_dev = fifodev;\n\tfifovfsp->vfs_bcount = 0;\n\n\t/*\n\t * It is necessary to initialize vfs_count here to 1.\n\t * This prevents the fifovfsp from getting freed when\n\t * a thread does a VFS_HOLD followed by a VFS_RELE\n\t * on the fifovfsp\n\t *\n\t * The fifovfsp should never be freed.\n\t */\n\tfifovfsp->vfs_count = 1;\n\n\tmutex_init(&ftable_lock, NULL, MUTEX_DEFAULT, NULL);\n\tmutex_init(&fino_lock, NULL, MUTEX_DEFAULT, NULL);\n\n\t/*\n\t * vnodes are cached aligned\n\t */\n\tfnode_cache = kmem_cache_create(\"fnode_cache\",\n\t sizeof (fifodata_t) - sizeof (fifonode_t), 32,\n\t fnode_constructor, fnode_destructor, NULL,\n\t (void *)(sizeof (fifodata_t) - sizeof (fifonode_t)), NULL, 0);\n\n\tpipe_cache = kmem_cache_create(\"pipe_cache\", sizeof (fifodata_t), 32,\n\t pipe_constructor, pipe_destructor, NULL,\n\t (void *)(sizeof (fifodata_t)), NULL, 0);\n\n\tfifo_strdata.qi_minfo->mi_hiwat = FIFOHIWAT;\n\n\treturn (0);\n}\n\n/*\n * Provide a shadow for a vnode. We create a new shadow before checking for an\n * existing one, to minimize the amount of time we need to hold ftable_lock.\n * If a vp already has a shadow in the hash list, return its shadow. If not,\n * we hash the new vnode and return its pointer to the caller.\n */\nvnode_t *\nfifovp(vnode_t *vp, cred_t *crp)\n{\n\tfifonode_t *fnp;\n\tfifonode_t *spec_fnp; /* Speculative fnode ptr. */\n\tfifodata_t *fdp;\n\tvnode_t *newvp;\n\tstruct vattr va;\n\tvnode_t\t*rvp;\n\n\tASSERT(vp != NULL);\n\n\tfdp = kmem_cache_alloc(fnode_cache, KM_SLEEP);\n\n\tfdp->fifo_lock.flk_ref = 1;\n\tfnp = &fdp->fifo_fnode[0];\n\n\t/*\n\t * Its possible that fifo nodes on different lofs mountpoints\n\t * shadow the same real filesystem fifo node.\n\t * In this case its necessary to get and store the realvp.\n\t * This way different fifo nodes sharing the same real vnode\n\t * can use realvp for communication.\n\t */\n\n\tif (VOP_REALVP(vp, &rvp, NULL) == 0)\n\t\t\tvp = rvp;\n\n\tfnp->fn_realvp\t= vp;\n\tfnp->fn_wcnt\t= 0;\n\tfnp->fn_rcnt\t= 0;\n\n#if FIFODEBUG\n\tif (! Fifo_fastmode) {\n\t\tfnp->fn_flag\t= 0;\n\t} else {\n\t\tfnp->fn_flag\t= FIFOFAST;\n\t}\n#else /* FIFODEBUG */\n\tfnp->fn_flag\t= FIFOFAST;\n#endif /* FIFODEBUG */\n\n\t/*\n\t * initialize the times from vp.\n\t */\n\tva.va_mask = AT_TIMES;\n\tif (VOP_GETATTR(vp, &va, 0, crp, NULL) == 0) {\n\t\tfnp->fn_atime = va.va_atime;\n\t\tfnp->fn_mtime = va.va_mtime;\n\t\tfnp->fn_ctime = va.va_ctime;\n\t} else {\n\t\tfnp->fn_atime.tv_sec = 0;\n\t\tfnp->fn_atime.tv_nsec = 0;\n\t\tfnp->fn_mtime.tv_sec = 0;\n\t\tfnp->fn_mtime.tv_nsec = 0;\n\t\tfnp->fn_ctime.tv_sec = 0;\n\t\tfnp->fn_ctime.tv_nsec = 0;\n\t}\n\n\t/*\n\t * Grab the VP here to avoid holding locks\n\t * whilst trying to acquire others.\n\t */\n\n\tVN_HOLD(vp);\n\n\tmutex_enter(&ftable_lock);\n\n\tif ((spec_fnp = fifofind(vp)) != NULL) {\n\t\tmutex_exit(&ftable_lock);\n\n\t\t/*\n\t\t * Release the vnode and free up our pre-prepared fnode.\n\t\t * Zero the lock reference just to explicitly signal\n\t\t * this is unused.\n\t\t */\n\t\tVN_RELE(vp);\n\t\tfdp->fifo_lock.flk_ref = 0;\n\t\tkmem_cache_free(fnode_cache, fdp);\n\n\t\treturn (FTOV(spec_fnp));\n\t}\n\n\tnewvp = FTOV(fnp);\n\tfifo_reinit_vp(newvp);\n\t/*\n\t * Since the fifo vnode's v_vfsp needs to point to the\n\t * underlying filesystem's vfsp we need to bump up the\n\t * underlying filesystem's vfs reference count.\n\t * The count is decremented when the fifo node is\n\t * inactivated.\n\t */\n\n\tVFS_HOLD(vp->v_vfsp);\n\tnewvp->v_vfsp = vp->v_vfsp;\n\tnewvp->v_rdev = vp->v_rdev;\n\tnewvp->v_flag |= (vp->v_flag & VROOT);\n\n\tfifoinsert(fnp);\n\tmutex_exit(&ftable_lock);\n\n\treturn (newvp);\n}\n\n/*\n * Create a pipe end by...\n * allocating a vnode-fifonode pair and initializing the fifonode.\n */\nvoid\nmakepipe(vnode_t **vpp1, vnode_t **vpp2)\n{\n\tfifonode_t *fnp1;\n\tfifonode_t *fnp2;\n\tvnode_t *nvp1;\n\tvnode_t *nvp2;\n\tfifodata_t *fdp;\n\ttimestruc_t now;\n\n\tfdp = kmem_cache_alloc(pipe_cache, KM_SLEEP);\n\tfdp->fifo_lock.flk_ref = 2;\n\tfnp1 = &fdp->fifo_fnode[0];\n\tfnp2 = &fdp->fifo_fnode[1];\n\n\tfnp1->fn_wcnt\t= fnp2->fn_wcnt\t\t= 1;\n\tfnp1->fn_rcnt\t= fnp2->fn_rcnt\t\t= 1;\n#if FIFODEBUG\n\tif (! Fifo_fastmode) {\n\t\tfnp1->fn_flag\t= fnp2->fn_flag\t\t= ISPIPE;\n\t} else {\n\t\tfnp1->fn_flag\t= fnp2->fn_flag\t\t= ISPIPE | FIFOFAST;\n\t}\n#else /* FIFODEBUG */\n\tfnp1->fn_flag\t= fnp2->fn_flag\t\t= ISPIPE | FIFOFAST;\n#endif /* FIFODEBUG */\n\tgethrestime(&now);\n\tfnp1->fn_atime\t= fnp2->fn_atime\t= now;\n\tfnp1->fn_mtime\t= fnp2->fn_mtime\t= now;\n\tfnp1->fn_ctime\t= fnp2->fn_ctime\t= now;\n\n\t*vpp1 = nvp1 = FTOV(fnp1);\n\t*vpp2 = nvp2 = FTOV(fnp2);\n\n\tfifo_reinit_vp(nvp1);\t\t/* Reinitialize vnodes for reuse... */\n\tfifo_reinit_vp(nvp2);\n\tnvp1->v_vfsp = fifovfsp;\t/* Need to re-establish VFS & device */\n\tnvp2->v_vfsp = fifovfsp;\t/* before we can reuse this vnode. */\n\tnvp1->v_rdev = fifodev;\n\tnvp2->v_rdev = fifodev;\n}\n\n/*\n * Attempt to establish a unique pipe id. Only un-named pipes use this\n * routine.\n */\nino_t\nfifogetid(void)\n{\n\tstatic ino_t fifo_ino = 0;\n\tino_t fino;\n\n\tmutex_enter(&fino_lock);\n\tfino = fifo_ino++;\n\tmutex_exit(&fino_lock);\n\treturn (fino);\n}\n\n/*\n * Stream a pipe/FIFO.\n * The FIFOCONNLD flag is used when CONNLD has been pushed on the stream.\n * If the flag is set, a new vnode is created by calling fifo_connld().\n * Connld logic was moved to fifo_connld() to speed up the open\n * operation, simplify the connld/fifo interaction, and remove inherent\n * race conditions between the connld module and fifos.\n * This routine is single threaded for two reasons.\n * 1) connld requests are synchronous; that is, they must block\n * until the server does an I_RECVFD (oh, well). Single threading is\n * the simplest way to accomplish this.\n * 2) fifo_close() must not send M_HANGUP or M_ERROR while we are\n * in stropen. Stropen() has a tendency to reset things and\n * we would like streams to remember that a hangup occurred.\n */\nint\nfifo_stropen(vnode_t **vpp, int flag, cred_t *crp, int dotwist, int lockheld)\n{\n\tint error = 0;\n\tvnode_t *oldvp = *vpp;\n\tfifonode_t *fnp = VTOF(*vpp);\n\tdev_t pdev = 0;\n\tint firstopen = 0;\n\tfifolock_t *fn_lock;\n\n\tfn_lock = fnp->fn_lock;\n\tif (!lockheld)\n\t\tmutex_enter(&fn_lock->flk_lock);\n\tASSERT(MUTEX_HELD(&fnp->fn_lock->flk_lock));\n\n\t/*\n\t * FIFO is in the process of opening. Wait for it\n\t * to complete before starting another open on it\n\t * This prevents races associated with connld open\n\t */\n\twhile (fnp->fn_flag & FIFOOPEN) {\n\t\tif (!cv_wait_sig(&fnp->fn_wait_cv, &fn_lock->flk_lock)) {\n\t\t\tfifo_cleanup(oldvp, flag);\n\t\t\tif (!lockheld)\n\t\t\t\tmutex_exit(&fn_lock->flk_lock);\n\t\t\treturn (EINTR);\n\t\t}\n\t}\n\n\t/*\n\t * The other end of the pipe is almost closed so\n\t * reject any other open on this end of the pipe\n\t * This normally only happens with a pipe mounted under namefs, but\n\t * we can also see an open via proc/fd, which should still succeed.\n\t * To indicate the proc/fd case the FKLYR flag is passed.\n\t */\n\tif ((fnp->fn_flag & (FIFOCLOSE|ISPIPE)) == (FIFOCLOSE|ISPIPE) &&\n\t (flag & FKLYR) == 0) {\n\t\tfifo_cleanup(oldvp, flag);\n\t\tcv_broadcast(&fnp->fn_wait_cv);\n\t\tif (!lockheld)\n\t\t\tmutex_exit(&fn_lock->flk_lock);\n\t\treturn (ENXIO);\n\t}\n\n\tfnp->fn_flag |= FIFOOPEN;\n\n\t/*\n\t * can't allow close to happen while we are\n\t * in the middle of stropen().\n\t * M_HANGUP and M_ERROR could leave the stream in a strange state\n\t */\n\twhile (fn_lock->flk_ocsync)\n\t\tcv_wait(&fn_lock->flk_wait_cv, &fn_lock->flk_lock);\n\n\tfn_lock->flk_ocsync = 1;\n\n\tif (fnp->fn_flag & FIFOCONNLD) {\n\t\t/*\n\t\t * This is a reopen, so we should release the fifo lock\n\t\t * just in case some strange module pushed on connld\n\t\t * has some odd side effect.\n\t\t * Note: this stropen is on the oldvp. It will\n\t\t * have no impact on the connld vp returned and\n\t\t * strclose() will only be called when we release\n\t\t * flk_ocsync\n\t\t */\n\t\tmutex_exit(&fn_lock->flk_lock);\n\t\tif ((error = stropen(oldvp, &pdev, flag, crp)) != 0) {\n\t\t\tmutex_enter(&fn_lock->flk_lock);\n\t\t\tfifo_cleanup(oldvp, flag);\n\t\t\tfn_lock->flk_ocsync = 0;\n\t\t\tcv_broadcast(&fn_lock->flk_wait_cv);\n\t\t\tgoto out;\n\t\t}\n\t\t/*\n\t\t * streams open done, allow close on other end if\n\t\t * required. Do this now.. it could\n\t\t * be a very long time before fifo_connld returns.\n\t\t */\n\t\tmutex_enter(&fn_lock->flk_lock);\n\t\t/*\n\t\t * we need to fake an open here so that if this\n\t\t * end of the pipe closes, we don't loose the\n\t\t * stream head (kind of like single threading\n\t\t * open and close for this end of the pipe)\n\t\t * We'll need to call fifo_close() to do clean\n\t\t * up in case this end of the pipe was closed\n\t\t * down while we were in fifo_connld()\n\t\t */\n\t\tASSERT(fnp->fn_open > 0);\n\t\tfnp->fn_open++;\n\t\tfn_lock->flk_ocsync = 0;\n\t\tcv_broadcast(&fn_lock->flk_wait_cv);\n\t\tmutex_exit(&fn_lock->flk_lock);\n\t\t/*\n\t\t * Connld has been pushed onto the pipe\n\t\t * Create new pipe on behalf of connld\n\t\t */\n\t\tif (error = fifo_connld(vpp, flag, crp)) {\n\t\t\t(void) fifo_close(oldvp, flag, 1, 0, crp, NULL);\n\t\t\tmutex_enter(&fn_lock->flk_lock);\n\t\t\tgoto out;\n\t\t}\n\t\t/*\n\t\t * undo fake open. We need to call fifo_close\n\t\t * because some other thread could have done\n\t\t * a close and detach of the named pipe while\n\t\t * we were in fifo_connld(), so\n\t\t * we want to make sure the close completes (yuk)\n\t\t */\n\t\t(void) fifo_close(oldvp, flag, 1, 0, crp, NULL);\n\t\t/*\n\t\t * fifo_connld has changed the vp, so we\n\t\t * need to re-initialize locals\n\t\t */\n\t\tfnp = VTOF(*vpp);\n\t\tfn_lock = fnp->fn_lock;\n\t\tmutex_enter(&fn_lock->flk_lock);\n\t} else {\n\t\t/*\n\t\t * release lock in case there are modules pushed that\n\t\t * could have some strange side effect\n\t\t */\n\n\t\tmutex_exit(&fn_lock->flk_lock);\n\n\t\t/*\n\t\t * If this is the first open of a fifo (dotwist\n\t\t * will be non-zero) we will need to twist the queues.\n\t\t */\n\t\tif (oldvp->v_stream == NULL)\n\t\t\tfirstopen = 1;\n\n\t\t/*\n\t\t * normal open of pipe/fifo\n\t\t */\n\n\t\tif ((error = stropen(oldvp, &pdev, flag, crp)) != 0) {\n\t\t\tmutex_enter(&fn_lock->flk_lock);\n\t\t\tfifo_cleanup(oldvp, flag);\n\t\t\tASSERT(fnp->fn_open != 0 || oldvp->v_stream == NULL);\n\t\t\tfn_lock->flk_ocsync = 0;\n\t\t\tcv_broadcast(&fn_lock->flk_wait_cv);\n\t\t\tgoto out;\n\t\t}\n\t\tmutex_enter(&fn_lock->flk_lock);\n\n\t\t/*\n\t\t * twist the ends of the fifo together\n\t\t */\n\t\tif (dotwist && firstopen)\n\t\t\tstrmate(*vpp, *vpp);\n\n\t\t/*\n\t\t * Show that this open has succeeded\n\t\t * and allow closes or other opens to proceed\n\t\t */\n\t\tfnp->fn_open++;\n\t\tfn_lock->flk_ocsync = 0;\n\t\tcv_broadcast(&fn_lock->flk_wait_cv);\n\t}\nout:\n\tfnp->fn_flag &= ~FIFOOPEN;\n\tif (error == 0) {\n\t\tfnp->fn_flag |= FIFOISOPEN;\n\t\t/*\n\t\t * If this is a FIFO and has the close flag set\n\t\t * and there are now writers, clear the close flag\n\t\t * Note: close flag only gets set when last writer\n\t\t * on a FIFO goes away.\n\t\t */\n\t\tif (((fnp->fn_flag & (ISPIPE|FIFOCLOSE)) == FIFOCLOSE) &&\n\t\t fnp->fn_wcnt > 0)\n\t\t\tfnp->fn_flag &= ~FIFOCLOSE;\n\t}\n\tcv_broadcast(&fnp->fn_wait_cv);\n\tif (!lockheld)\n\t\tmutex_exit(&fn_lock->flk_lock);\n\treturn (error);\n}\n\n/*\n * Clean up the state of a FIFO and/or mounted pipe in the\n * event that a fifo_open() was interrupted while the\n * process was blocked.\n */\nvoid\nfifo_cleanup(vnode_t *vp, int flag)\n{\n\tfifonode_t *fnp = VTOF(vp);\n\n\tASSERT(MUTEX_HELD(&fnp->fn_lock->flk_lock));\n\n\tcleanlocks(vp, curproc->p_pid, 0);\n\tcleanshares(vp, curproc->p_pid);\n\tif (flag & FREAD) {\n\t\tfnp->fn_rcnt--;\n\t}\n\tif (flag & FWRITE) {\n\t\tfnp->fn_wcnt--;\n\t}\n\tcv_broadcast(&fnp->fn_wait_cv);\n}\n\n/*\n * Insert a fifonode-vnode pair onto the fifoalloc hash list.\n */\nstatic void\nfifoinsert(fifonode_t *fnp)\n{\n\tint idx = FIFOHASH(fnp->fn_realvp);\n\n\t/*\n\t * We don't need to hold fn_lock since we're holding ftable_lock and\n\t * this routine is only called right after we've allocated an fnode.\n\t * FIFO is inserted at head of NULL terminated doubly linked list.\n\t */\n\n\tASSERT(MUTEX_HELD(&ftable_lock));\n\tfnp->fn_backp = NULL;\n\tfnp->fn_nextp = fifoalloc[idx];\n\tfifoalloc[idx] = fnp;\n\tif (fnp->fn_nextp)\n\t\tfnp->fn_nextp->fn_backp = fnp;\n}\n\n/*\n * Find a fifonode-vnode pair on the fifoalloc hash list.\n * vp is a vnode to be shadowed. If it's on the hash list,\n * it already has a shadow, therefore return its corresponding\n * fifonode.\n */\nstatic fifonode_t *\nfifofind(vnode_t *vp)\n{\n\tfifonode_t *fnode;\n\n\tASSERT(MUTEX_HELD(&ftable_lock));\n\tfor (fnode = fifoalloc[FIFOHASH(vp)]; fnode; fnode = fnode->fn_nextp) {\n\t\tif (fnode->fn_realvp == vp) {\n\t\t\tVN_HOLD(FTOV(fnode));\n\t\t\treturn (fnode);\n\t\t}\n\t}\n\treturn (NULL);\n}\n\n/*\n * Remove a fifonode-vnode pair from the fifoalloc hash list.\n * This routine is called from the fifo_inactive() routine when a\n * FIFO is being released.\n * If the link to be removed is the only link, set fifoalloc to NULL.\n */\nvoid\nfiforemove(fifonode_t *fnp)\n{\n\tint idx = FIFOHASH(fnp->fn_realvp);\n\tfifonode_t *fnode;\n\n\tASSERT(MUTEX_HELD(&ftable_lock));\n\tfnode = fifoalloc[idx];\n\t/*\n\t * fast path... only 1 FIFO in this list entry\n\t */\n\tif (fnode != NULL && fnode == fnp &&\n\t !fnode->fn_nextp && !fnode->fn_backp) {\n\t\tfifoalloc[idx] = NULL;\n\t} else {\n\n\t\tfor (; fnode; fnode = fnode->fn_nextp) {\n\t\t\tif (fnode == fnp) {\n\t\t\t\t/*\n\t\t\t\t * if we are first entry\n\t\t\t\t */\n\t\t\t\tif (fnp == fifoalloc[idx])\n\t\t\t\t\tfifoalloc[idx] = fnp->fn_nextp;\n\t\t\t\tif (fnode->fn_nextp)\n\t\t\t\t\tfnode->fn_nextp->fn_backp =\n\t\t\t\t\t fnode->fn_backp;\n\t\t\t\tif (fnode->fn_backp)\n\t\t\t\t\tfnode->fn_backp->fn_nextp =\n\t\t\t\t\t fnode->fn_nextp;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*\n * Flush all data from a fifo's message queue\n */\n\nvoid\nfifo_fastflush(fifonode_t *fnp)\n{\n\tmblk_t *bp;\n\tASSERT(MUTEX_HELD(&fnp->fn_lock->flk_lock));\n\n\tif ((bp = fnp->fn_mp) != NULL) {\n\t\tfnp->fn_mp = NULL;\n\t\tfnp->fn_count = 0;\n\t\tfreemsg(bp);\n\t}\n\tfifo_wakewriter(fnp->fn_dest, fnp->fn_lock);\n}\n\n/*\n * Note: This routine is single threaded\n * Protected by FIFOOPEN flag (i.e. flk_lock is not held)\n * Upon successful completion, the original fifo is unlocked\n * and FIFOOPEN is cleared for the original vpp.\n * The new fifo returned has FIFOOPEN set.\n */\nstatic int\nfifo_connld(struct vnode **vpp, int flag, cred_t *crp)\n{\n\tstruct vnode *vp1;\n\tstruct vnode *vp2;\n\tstruct fifonode *oldfnp;\n\tstruct fifonode *fn_dest;\n\tint error;\n\tstruct file *filep;\n\tstruct fifolock *fn_lock;\n\tcred_t *c;\n\n\t/*\n\t * Get two vnodes that will represent the pipe ends for the new pipe.\n\t */\n\tmakepipe(&vp1, &vp2);\n\n\t/*\n\t * Allocate a file descriptor and file pointer for one of the pipe\n\t * ends. The file descriptor will be used to send that pipe end to\n\t * the process on the other end of this stream. Note that we get\n\t * the file structure only, there is no file list entry allocated.\n\t */\n\tif (error = falloc(vp1, FWRITE|FREAD, &filep, NULL)) {\n\t\tVN_RELE(vp1);\n\t\tVN_RELE(vp2);\n\t\treturn (error);\n\t}\n\tmutex_exit(&filep->f_tlock);\n\toldfnp = VTOF(*vpp);\n\tfn_lock = oldfnp->fn_lock;\n\tfn_dest = oldfnp->fn_dest;\n\n\t/*\n\t * Create two new stream heads and attach them to the two vnodes for\n\t * the new pipe.\n\t */\n\tif ((error = fifo_stropen(&vp1, FREAD|FWRITE, filep->f_cred, 0, 0)) !=\n\t 0 ||\n\t (error = fifo_stropen(&vp2, flag, filep->f_cred, 0, 0)) != 0) {\n#if DEBUG\n\t\tcmn_err(CE_NOTE, \"fifo stropen failed error 0x%x\", error);\n#endif\n\t\t/*\n\t\t * this will call fifo_close and VN_RELE on vp1\n\t\t */\n\t\t(void) closef(filep);\n\t\tVN_RELE(vp2);\n\t\treturn (error);\n\t}\n\n\t/*\n\t * twist the ends of the pipe together\n\t */\n\tstrmate(vp1, vp2);\n\n\t/*\n\t * Set our end to busy in open\n\t * Note: Don't need lock around this because we're the only\n\t * one who knows about it\n\t */\n\tVTOF(vp2)->fn_flag |= FIFOOPEN;\n\n\tmutex_enter(&fn_lock->flk_lock);\n\n\tfn_dest->fn_flag |= FIFOSEND;\n\t/*\n\t * check to make sure neither end of pipe has gone away\n\t */\n\tif (!(fn_dest->fn_flag & FIFOISOPEN)) {\n\t\terror = ENXIO;\n\t\tfn_dest->fn_flag &= ~FIFOSEND;\n\t\tmutex_exit(&fn_lock->flk_lock);\n\t\t/*\n\t\t * this will call fifo_close and VN_RELE on vp1\n\t\t */\n\t\tgoto out;\n\t}\n\tmutex_exit(&fn_lock->flk_lock);\n\n\t/*\n\t * Tag the sender's credential on the pipe descriptor.\n\t */\n\tcrhold(VTOF(vp1)->fn_pcredp = crp);\n\tVTOF(vp1)->fn_cpid = curproc->p_pid;\n\n\t/*\n\t * send the file descriptor to other end of pipe\n\t */\n\tif (error = do_sendfp((*vpp)->v_stream, filep, crp)) {\n\t\tmutex_enter(&fn_lock->flk_lock);\n\t\tfn_dest->fn_flag &= ~FIFOSEND;\n\t\tmutex_exit(&fn_lock->flk_lock);\n\t\t/*\n\t\t * this will call fifo_close and VN_RELE on vp1\n\t\t */\n\t\tgoto out;\n\t}\n\n\tmutex_enter(&fn_lock->flk_lock);\n\t/*\n\t * Wait for other end to receive file descriptor\n\t * FIFOCLOSE indicates that one or both sides of the pipe\n\t * have gone away.\n\t */\n\twhile ((fn_dest->fn_flag & (FIFOCLOSE | FIFOSEND)) == FIFOSEND) {\n\t\tif (!cv_wait_sig(&oldfnp->fn_wait_cv, &fn_lock->flk_lock)) {\n\t\t\terror = EINTR;\n\t\t\tfn_dest->fn_flag &= ~FIFOSEND;\n\t\t\tmutex_exit(&fn_lock->flk_lock);\n\t\t\tgoto out;\n\t\t}\n\t}\n\t/*\n\t * If either end of pipe has gone away and the other end did not\n\t * receive pipe, reject the connld open\n\t */\n\tif ((fn_dest->fn_flag & FIFOSEND)) {\n\t\terror = ENXIO;\n\t\tfn_dest->fn_flag &= ~FIFOSEND;\n\t\tmutex_exit(&fn_lock->flk_lock);\n\t\tgoto out;\n\t}\n\n\toldfnp->fn_flag &= ~FIFOOPEN;\n\tcv_broadcast(&oldfnp->fn_wait_cv);\n\tmutex_exit(&fn_lock->flk_lock);\n\n\tVN_RELE(*vpp);\n\t*vpp = vp2;\n\t(void) closef(filep);\n\treturn (0);\nout:\n\tc = filep->f_cred;\n\tcrhold(c);\n\t(void) closef(filep);\n\tVTOF(vp2)->fn_flag &= ~FIFOOPEN;\n\t(void) fifo_close(vp2, flag, 1, (offset_t)0, c, NULL);\n\tcrfree(c);\n\tVN_RELE(vp2);\n\treturn (error);\n}\n\n/*\n * Disable fastpath mode.\n */\nvoid\nfifo_fastoff(fifonode_t *fnp)\n{\n\tASSERT(MUTEX_HELD(&fnp->fn_lock->flk_lock));\n\tASSERT(FTOV(fnp)->v_stream);\n\n\t/* FIFOSTAYFAST is set => FIFOFAST is set */\n\twhile ((fnp->fn_flag & FIFOSTAYFAST) || ((fnp->fn_flag & ISPIPE) &&\n\t (fnp->fn_dest->fn_flag & FIFOSTAYFAST))) {\n\t\tASSERT(fnp->fn_flag & FIFOFAST);\n\t\t/* indicate someone is waiting to turn into stream mode */\n\t\tfnp->fn_flag |= FIFOWAITMODE;\n\t\tcv_wait(&fnp->fn_wait_cv, &fnp->fn_lock->flk_lock);\n\t\tfnp->fn_flag &= ~FIFOWAITMODE;\n\t}\n\n\t/* as we may have relased the lock, test the FIFOFAST flag here */\n\tif (!(fnp->fn_flag & FIFOFAST))\n\t\treturn;\n#if FIFODEBUG\n\tif (Fifo_verbose)\n\t\tcmn_err(CE_NOTE, \"Fifo reverting to streams mode\\n\");\n#endif\n\n\tfifo_fastturnoff(fnp);\n\tif (fnp->fn_flag & ISPIPE) {\n\t\tfifo_fastturnoff(fnp->fn_dest);\n\t}\n}\n\n/*\n * flk_lock must be held while calling fifo_fastturnoff() to\n * preserve data ordering (no reads or writes allowed)\n */\n\nstatic void\nfifo_fastturnoff(fifonode_t *fnp)\n{\n\tfifonode_t *fn_dest = fnp->fn_dest;\n\tmblk_t\t*fn_mp;\n\tint\tfn_flag;\n\n\tASSERT(MUTEX_HELD(&fnp->fn_lock->flk_lock));\n\t/*\n\t * Note: This end can't be closed if there\n\t * is stuff in fn_mp\n\t */\n\tif ((fn_mp = fnp->fn_mp) != NULL) {\n\t\tASSERT(fnp->fn_flag & FIFOISOPEN);\n\t\tASSERT(FTOV(fnp)->v_stream != NULL);\n\t\tASSERT(FTOV(fnp)->v_stream->sd_wrq != NULL);\n\t\tASSERT(RD(FTOV(fnp)->v_stream->sd_wrq) != NULL);\n\t\tASSERT(strvp2wq(FTOV(fnp)) != NULL);\n\t\tfnp->fn_mp = NULL;\n\t\tfnp->fn_count = 0;\n\t\t/*\n\t\t * Don't need to drop flk_lock across the put()\n\t\t * since we're just moving the message from the fifo\n\t\t * node to the STREAM head...\n\t\t */\n\t\tput(RD(strvp2wq(FTOV(fnp))), fn_mp);\n\t}\n\n\t/*\n\t * Need to re-issue any pending poll requests\n\t * so that the STREAMS framework sees them\n\t * Writers would be waiting on fnp and readers on fn_dest\n\t */\n\tif ((fnp->fn_flag & (FIFOISOPEN | FIFOPOLLW)) ==\n\t (FIFOISOPEN | FIFOPOLLW)) {\n\t\tstrpollwakeup(FTOV(fnp), POLLWRNORM);\n\t}\n\tfn_flag = fn_dest->fn_flag;\n\tif ((fn_flag & FIFOISOPEN) == FIFOISOPEN) {\n\t\tif ((fn_flag & (FIFOPOLLR | FIFOPOLLRBAND))) {\n\t\t\tstrpollwakeup(FTOV(fn_dest), POLLIN|POLLRDNORM);\n\t\t}\n\t}\n\t/*\n\t * wake up any sleeping processes so they can notice we went\n\t * to streams mode\n\t */\n\tfnp->fn_flag &= ~(FIFOFAST|FIFOWANTW|FIFOWANTR);\n\tcv_broadcast(&fnp->fn_wait_cv);\n}\n\n/*\n * Alternative version of fifo_fastoff()\n * optimized for putmsg/getmsg.\n */\nvoid\nfifo_vfastoff(vnode_t *vp)\n{\n\tfifonode_t\t*fnp = VTOF(vp);\n\n\tmutex_enter(&fnp->fn_lock->flk_lock);\n\tif (!(fnp->fn_flag & FIFOFAST)) {\n\t\tmutex_exit(&fnp->fn_lock->flk_lock);\n\t\treturn;\n\t}\n\tfifo_fastoff(fnp);\n\tmutex_exit(&fnp->fn_lock->flk_lock);\n}\n\n/*\n * Wake any sleeping writers, poll and send signals if necessary\n * This module is only called when we drop below the hi water mark\n * FIFOWANTW indicates that a process is sleeping in fifo_write()\n * FIFOHIWATW indicates that we have either attempted a poll or\n * non-blocking write and were over the high water mark\n * This routine assumes a low water mark of 0.\n */\n\nvoid\nfifo_wakewriter(fifonode_t *fn_dest, fifolock_t *fn_lock)\n{\n\tint fn_dflag = fn_dest->fn_flag;\n\n\tASSERT(MUTEX_HELD(&fn_lock->flk_lock));\n\tASSERT(fn_dest->fn_dest->fn_count < fn_dest->fn_dest->fn_hiwat);\n\n\tif ((fn_dflag & FIFOWANTW)) {\n\t\tcv_broadcast(&fn_dest->fn_wait_cv);\n\t}\n\tif ((fn_dflag & (FIFOHIWATW | FIFOISOPEN)) ==\n\t (FIFOHIWATW | FIFOISOPEN)) {\n\t\tif (fn_dflag & FIFOPOLLW)\n\t\t\tstrpollwakeup(FTOV(fn_dest), POLLWRNORM);\n\t\tif (fn_dflag & FIFOSETSIG)\n\t\t\tstr_sendsig(FTOV(fn_dest), S_WRNORM, 0, 0);\n\t}\n\t/*\n\t * FIFOPOLLW can't be set without setting FIFOHIWAT\n\t * This allows us to clear both here.\n\t */\n\tfn_dest->fn_flag = fn_dflag & ~(FIFOWANTW | FIFOHIWATW | FIFOPOLLW);\n}\n\n/*\n * wake up any sleeping readers, poll or send signal if needed\n * FIFOWANTR indicates that a process is waiting in fifo_read() for data\n * FIFOSETSIG indicates that SIGPOLL should be sent to process\n * FIFOPOLLR indicates that a poll request for reading on the fifo was made\n */\n\nvoid\nfifo_wakereader(fifonode_t *fn_dest, fifolock_t *fn_lock)\n{\n\tint fn_dflag = fn_dest->fn_flag;\n\n\tASSERT(MUTEX_HELD(&fn_lock->flk_lock));\n\tif (fn_dflag & FIFOWANTR) {\n\t\tcv_broadcast(&fn_dest->fn_wait_cv);\n\t}\n\tif (fn_dflag & FIFOISOPEN) {\n\t\tif (fn_dflag & FIFOPOLLR)\n\t\t\tstrpollwakeup(FTOV(fn_dest), POLLIN | POLLRDNORM);\n\t\tif (fn_dflag & FIFOSETSIG)\n\t\t\tstr_sendsig(FTOV(fn_dest), S_INPUT | S_RDNORM, 0, 0);\n\t}\n\tfn_dest->fn_flag = fn_dflag & ~(FIFOWANTR | FIFOPOLLR);\n}","shortMessageHtmlLink":"/*"}},{"before":"c78f95a54e0679113abc0c0a51cbec2397df7374","after":"28e7d46df57987446e23af5c73100752ae0d202e","ref":"refs/heads/master","pushedAt":"2024-05-17T20:03:47.000Z","pushType":"push","commitsCount":6,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"16492 ipkg brand should include smbsrv1 device (fix joyent* zones)","shortMessageHtmlLink":"16492 ipkg brand should include smbsrv1 device (fix joyent* zones)"}},{"before":null,"after":"c78f95a54e0679113abc0c0a51cbec2397df7374","ref":"refs/heads/release-20240516","pushedAt":"2024-05-15T23:59:25.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"\t[illumos-gate merge]\n\ncommit 9d9f553dbf21dd5a42309551d1b69fdc837737d0\n 16549 qlc: the comparison will always evaluate as 'true'\ncommit 0a3719466d7d72ebb1b7699ebc8ae18966575936\n 16532 smbd: conflicting types for 'smbd_logon_final'\ncommit 16f0f9b3a6dec7c7fd20d32eb734697578942b90\n 16547 savecore should report progress when saving compressed dump\ncommit cde3e94d79d833480d2f3ba69f901b918878fd65\n 16524 driver for 38xx HBA in illumos\n\nConflicts:\n usr/src/cmd/savecore/Makefile\n usr/src/cmd/savecore/savecore.c\n usr/src/uts/intel/os/driver_aliases","shortMessageHtmlLink":"\t[illumos-gate merge]"}},{"before":"7199e590b0f5d3d9daebf97bf7952921baf7aaac","after":"c78f95a54e0679113abc0c0a51cbec2397df7374","ref":"refs/heads/master","pushedAt":"2024-05-15T17:40:08.000Z","pushType":"push","commitsCount":5,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"\t[illumos-gate merge]\n\ncommit 9d9f553dbf21dd5a42309551d1b69fdc837737d0\n 16549 qlc: the comparison will always evaluate as 'true'\ncommit 0a3719466d7d72ebb1b7699ebc8ae18966575936\n 16532 smbd: conflicting types for 'smbd_logon_final'\ncommit 16f0f9b3a6dec7c7fd20d32eb734697578942b90\n 16547 savecore should report progress when saving compressed dump\ncommit cde3e94d79d833480d2f3ba69f901b918878fd65\n 16524 driver for 38xx HBA in illumos\n\nConflicts:\n usr/src/cmd/savecore/Makefile\n usr/src/cmd/savecore/savecore.c\n usr/src/uts/intel/os/driver_aliases","shortMessageHtmlLink":"\t[illumos-gate merge]"}},{"before":"fd1993fc750ebeab6e4a1fe167e620dad3201b3c","after":"26bbeeb72d838a46549a49e2e3c896e8ee944f91","ref":"refs/heads/OS-8543","pushedAt":"2024-05-14T18:10:00.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"Add lx_unsupported() call (fix caller some more)","shortMessageHtmlLink":"Add lx_unsupported() call (fix caller some more)"}},{"before":"74e422cffeb440204afbea668687832956681b90","after":"fd1993fc750ebeab6e4a1fe167e620dad3201b3c","ref":"refs/heads/OS-8543","pushedAt":"2024-05-14T18:09:33.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"Add lx_unsupported() call (fix caller some more)","shortMessageHtmlLink":"Add lx_unsupported() call (fix caller some more)"}},{"before":"76f03a739727e5f4adcb5525de1e12988f57ff7a","after":"74e422cffeb440204afbea668687832956681b90","ref":"refs/heads/OS-8543","pushedAt":"2024-05-14T18:01:53.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"Add lx_unsupported() call (fix caller)","shortMessageHtmlLink":"Add lx_unsupported() call (fix caller)"}},{"before":"17eb9315900b0fd10684dd2cbad128eb1221f1ee","after":"76f03a739727e5f4adcb5525de1e12988f57ff7a","ref":"refs/heads/OS-8543","pushedAt":"2024-05-14T17:37:16.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"Add lx_unsupported() call","shortMessageHtmlLink":"Add lx_unsupported() call"}},{"before":"7c320b8da56ae5129e43f5fda1acdb7132233f79","after":"7199e590b0f5d3d9daebf97bf7952921baf7aaac","ref":"refs/heads/master","pushedAt":"2024-05-13T19:59:42.000Z","pushType":"push","commitsCount":6,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"\t[illumos-gate merge]\n\ncommit ce7a304d880a0cf033d8b45bfaf65dfdec0d3faf\n 16429 zpool hot spare replacement not grabbing similar/appropriate sized drive\ncommit 2c6ce8c7196246d26327a3e70ae208a2dec8c305\n 16535 libnvme: argument 1 with mismatched bound\ncommit ee073065c7200b026f498d9cad2beb87ba3b57a7\n 16528 clean up low-hanging warnings in svccfg(8) (duplicate definition)\ncommit 9d9f94326341c9595a2be9de21b1b5bb335155f8\n 16534 libnvme: conflicting types for 'nvme_log_req_set_csi'\ncommit 4d8d108f42a089b7b4441353f2ad7a75e1c7b31d\n 16542 Document ACL_NORESOLVE flag for acl_totext","shortMessageHtmlLink":"\t[illumos-gate merge]"}},{"before":"e35355d7bbcf6545c72750120a8e375966cbb5b4","after":"17eb9315900b0fd10684dd2cbad128eb1221f1ee","ref":"refs/heads/OS-8543","pushedAt":"2024-05-12T04:57:41.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"Typo fix","shortMessageHtmlLink":"Typo fix"}},{"before":"7d19a80405ccdc9ffe74369f71dc759794f221e0","after":"e35355d7bbcf6545c72750120a8e375966cbb5b4","ref":"refs/heads/OS-8543","pushedAt":"2024-05-10T22:05:56.000Z","pushType":"push","commitsCount":6,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"Merge branch 'master' into OS-8543","shortMessageHtmlLink":"Merge branch 'master' into OS-8543"}},{"before":"36fa999cb7fe54a1942f41802029e323f1cbc22c","after":"7d19a80405ccdc9ffe74369f71dc759794f221e0","ref":"refs/heads/OS-8543","pushedAt":"2024-05-10T22:03:13.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"Dan's PR comments, hopefully addressed","shortMessageHtmlLink":"Dan's PR comments, hopefully addressed"}},{"before":null,"after":"36fa999cb7fe54a1942f41802029e323f1cbc22c","ref":"refs/heads/OS-8543","pushedAt":"2024-05-10T20:13:44.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"On LX, add support for OFD locking","shortMessageHtmlLink":"On LX, add support for OFD locking"}},{"before":"bf1fc769b8016fa7f4091e74f20ffd3431174751","after":"7c320b8da56ae5129e43f5fda1acdb7132233f79","ref":"refs/heads/master","pushedAt":"2024-05-08T16:36:36.000Z","pushType":"push","commitsCount":4,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"\t[illumos-gate merge]\n\ncommit 54819d46b24e4252ba4cdbe22d8c419c16f0d396\n 16525 TCP_MD5SIG listening socket should degrade gracefully\ncommit 3ade83088bf2797d3800b650040b7ea6f9fc7c14\n 16529 TIOCGWINSZ returns EINVAL on a freshly-created pty","shortMessageHtmlLink":"\t[illumos-gate merge]"}},{"before":"96a3a0747ac0074df18111f823d2fd333aea72ef","after":null,"ref":"refs/heads/OS-8544","pushedAt":"2024-05-08T16:34:00.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"}},{"before":"03d0f844e30c56f9323d63ad2cf3d575cbaddef5","after":"bf1fc769b8016fa7f4091e74f20ffd3431174751","ref":"refs/heads/master","pushedAt":"2024-05-08T16:33:57.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"OS-8544 Memory leaks in vnd(4D) of DL_OK_ACKs\n\nReviewed by: Jonathan Perkin \r\nReviewed by: Brian Bennett \r\nApproved by: Brian Bennett ","shortMessageHtmlLink":"OS-8544 Memory leaks in vnd(4D) of DL_OK_ACKs"}},{"before":null,"after":"967bf530ad5f15246c53ba2cef51ae6901b957a6","ref":"refs/heads/16537","pushedAt":"2024-05-07T18:47:28.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"16537 cxgbe: update firmware version to 1.27.5.0 (fix manifest)","shortMessageHtmlLink":"16537 cxgbe: update firmware version to 1.27.5.0 (fix manifest)"}},{"before":"f3e7d9a95c33737335bb8f08d721a90d13a4cbf6","after":"96a3a0747ac0074df18111f823d2fd333aea72ef","ref":"refs/heads/OS-8544","pushedAt":"2024-05-06T19:40:24.000Z","pushType":"push","commitsCount":8,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"Merge branch 'master' into OS-8544","shortMessageHtmlLink":"Merge branch 'master' into OS-8544"}},{"before":"6c7fbb899e660a6d0ff0794c2f43441359fc742f","after":"03d0f844e30c56f9323d63ad2cf3d575cbaddef5","ref":"refs/heads/master","pushedAt":"2024-05-06T18:48:18.000Z","pushType":"push","commitsCount":7,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"\t[illumos-gate merge]\n\ncommit e2a8479967f5e2ae9ba0aa265cfa175d7874b057\n 16516 clone: smatch errors\ncommit 98f0a994ee13c4f450852a3d01f2e340abe69fb8\n 16477 lmrc: move MFI definitions into their own headers\ncommit ce43180545011b378bac8def8f2bd23b86dde522\n 14320 loader.efi: Do not use as frame buffer BLT-only GOPs.\ncommit 4e0cc57d7ff13862aa2a3b1eed78c72355eda972\n 16350 SHA1 may produce incorrect hashes if given a 2^29 byte input\ncommit b960b5ef739d69365f28458932126c08e93ffe7e\n 16528 clean up low-hanging warnings in svccfg(8)\ncommit c7685b3b29df92103b7e1709dd59c034d347385a\n 16510 mdb incorrectly prints the IPv6 Traffic Class","shortMessageHtmlLink":"\t[illumos-gate merge]"}},{"before":"b84ab697cf6d2de8a63f30c3c643e827367dcd5f","after":"f3e7d9a95c33737335bb8f08d721a90d13a4cbf6","ref":"refs/heads/OS-8544","pushedAt":"2024-05-03T21:03:16.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"pbchk cleanup","shortMessageHtmlLink":"pbchk cleanup"}},{"before":"44a3f800921aec53c0112bf99be06a0ea6c53a13","after":"b84ab697cf6d2de8a63f30c3c643e827367dcd5f","ref":"refs/heads/OS-8544","pushedAt":"2024-05-03T20:44:07.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"spelling mistake","shortMessageHtmlLink":"spelling mistake"}},{"before":null,"after":"44a3f800921aec53c0112bf99be06a0ea6c53a13","ref":"refs/heads/OS-8544","pushedAt":"2024-05-03T18:54:04.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"OS-8544 Memory leaks in vnd(4D) of DL_OK_ACKs","shortMessageHtmlLink":"OS-8544 Memory leaks in vnd(4D) of DL_OK_ACKs"}},{"before":null,"after":"6c7fbb899e660a6d0ff0794c2f43441359fc742f","ref":"refs/heads/release-20240502","pushedAt":"2024-05-01T23:59:27.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"16511 vioif_reclaim_tx() is holding lock across calling mac_tx_update\n(early pull)","shortMessageHtmlLink":"16511 vioif_reclaim_tx() is holding lock across calling mac_tx_update"}},{"before":"a0a83f51541187360c801916dc8b2b90667532b3","after":"6c7fbb899e660a6d0ff0794c2f43441359fc742f","ref":"refs/heads/master","pushedAt":"2024-05-01T14:43:22.000Z","pushType":"push","commitsCount":8,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"16511 vioif_reclaim_tx() is holding lock across calling mac_tx_update\n(early pull)","shortMessageHtmlLink":"16511 vioif_reclaim_tx() is holding lock across calling mac_tx_update"}},{"before":"bdab3cb0d2df8da66ed609711ff41593fa647918","after":"a0a83f51541187360c801916dc8b2b90667532b3","ref":"refs/heads/master","pushedAt":"2024-04-30T15:21:13.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"},"commit":{"message":"\t[illumos-gate merge]\n\ncommit 3887472aa243054938a45279585c3659297eaf8c\n 16519 panic when removing SADB entry with tcpkey delete","shortMessageHtmlLink":"\t[illumos-gate merge]"}},{"before":"5900f5b89f1ae5d3d293860c41aaf85e75d702ef","after":null,"ref":"refs/heads/OS-8542","pushedAt":"2024-04-29T19:58:41.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"danmcd","name":"Dan McDonald","path":"/danmcd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1406252?s=80&v=4"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEUzNXSwA","startCursor":null,"endCursor":null}},"title":"Activity ยท TritonDataCenter/illumos-joyent"}