Print this page
8115 parallel zfs mount


   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */



  26 
  27 #include <sys/param.h>
  28 #include <sys/systm.h>
  29 #include <sys/kmem.h>
  30 #include <sys/user.h>
  31 #include <sys/proc.h>
  32 #include <sys/cred.h>
  33 #include <sys/disp.h>
  34 #include <sys/buf.h>
  35 #include <sys/vfs.h>
  36 #include <sys/vfs_opreg.h>
  37 #include <sys/vnode.h>
  38 #include <sys/fdio.h>
  39 #include <sys/file.h>
  40 #include <sys/uio.h>
  41 #include <sys/conf.h>
  42 #include <sys/statvfs.h>
  43 #include <sys/mount.h>
  44 #include <sys/pathname.h>
  45 #include <sys/cmn_err.h>


 139  * Lock hierarchy: pcfslock > pcfs_lock > pcnodes_lock
 140  *
 141  * pcfs_mountcount:     used to prevent module unloads while there is still
 142  *                      pcfs state from a former mount hanging around. With
 143  *                      forced umount support, the filesystem module must not
 144  *                      be allowed to go away before the last VFS_FREEVFS()
 145  *                      call has been made.
 146  *                      Since this is just an atomic counter, there's no need
 147  *                      for locking.
 148  */
 149 kmutex_t        pcfslock;
 150 krwlock_t       pcnodes_lock;
 151 uint32_t        pcfs_mountcount;
 152 
 153 static int pcfstype;
 154 
 155 static vfsdef_t vfw = {
 156         VFSDEF_VERSION,
 157         "pcfs",
 158         pcfsinit,
 159         VSW_HASPROTO|VSW_CANREMOUNT|VSW_STATS|VSW_CANLOFI,
 160         &pcfs_mntopts
 161 };
 162 
 163 extern struct mod_ops mod_fsops;
 164 
 165 static struct modlfs modlfs = {
 166         &mod_fsops,
 167         "PC filesystem",
 168         &vfw
 169 };
 170 
 171 static struct modlinkage modlinkage = {
 172         MODREV_1,
 173         &modlfs,
 174         NULL
 175 };
 176 
 177 int
 178 _init(void)
 179 {




   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 /*
  27  * Copyright (c) 2017 by Delphix. All rights reserved.
  28  */
  29 
  30 #include <sys/param.h>
  31 #include <sys/systm.h>
  32 #include <sys/kmem.h>
  33 #include <sys/user.h>
  34 #include <sys/proc.h>
  35 #include <sys/cred.h>
  36 #include <sys/disp.h>
  37 #include <sys/buf.h>
  38 #include <sys/vfs.h>
  39 #include <sys/vfs_opreg.h>
  40 #include <sys/vnode.h>
  41 #include <sys/fdio.h>
  42 #include <sys/file.h>
  43 #include <sys/uio.h>
  44 #include <sys/conf.h>
  45 #include <sys/statvfs.h>
  46 #include <sys/mount.h>
  47 #include <sys/pathname.h>
  48 #include <sys/cmn_err.h>


 142  * Lock hierarchy: pcfslock > pcfs_lock > pcnodes_lock
 143  *
 144  * pcfs_mountcount:     used to prevent module unloads while there is still
 145  *                      pcfs state from a former mount hanging around. With
 146  *                      forced umount support, the filesystem module must not
 147  *                      be allowed to go away before the last VFS_FREEVFS()
 148  *                      call has been made.
 149  *                      Since this is just an atomic counter, there's no need
 150  *                      for locking.
 151  */
 152 kmutex_t        pcfslock;
 153 krwlock_t       pcnodes_lock;
 154 uint32_t        pcfs_mountcount;
 155 
 156 static int pcfstype;
 157 
 158 static vfsdef_t vfw = {
 159         VFSDEF_VERSION,
 160         "pcfs",
 161         pcfsinit,
 162         VSW_HASPROTO|VSW_CANREMOUNT|VSW_STATS|VSW_CANLOFI|VSW_MOUNTDEV,
 163         &pcfs_mntopts
 164 };
 165 
 166 extern struct mod_ops mod_fsops;
 167 
 168 static struct modlfs modlfs = {
 169         &mod_fsops,
 170         "PC filesystem",
 171         &vfw
 172 };
 173 
 174 static struct modlinkage modlinkage = {
 175         MODREV_1,
 176         &modlfs,
 177         NULL
 178 };
 179 
 180 int
 181 _init(void)
 182 {