Print this page
8115 parallel zfs mount

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/ufs/ufs_vfsops.c
          +++ new/usr/src/uts/common/fs/ufs/ufs_vfsops.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   * Copyright 2016 Nexenta Systems, Inc.
       26 + * Copyright (c) 2017 by Delphix. All rights reserved.
  26   27   */
  27   28  
  28   29  /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T     */
  29   30  /*        All Rights Reserved   */
  30   31  
  31   32  /*
  32   33   * University Copyright- Copyright (c) 1982, 1986, 1988
  33   34   * The Regents of the University of California
  34   35   * All Rights Reserved
  35   36   *
↓ open down ↓ 153 lines elided ↑ open up ↑
 189  190  
 190  191  static mntopts_t ufs_mntopts = {
 191  192          sizeof (mntopts) / sizeof (mntopt_t),
 192  193          mntopts
 193  194  };
 194  195  
 195  196  static vfsdef_t vfw = {
 196  197          VFSDEF_VERSION,
 197  198          "ufs",
 198  199          ufsinit,
 199      -        VSW_HASPROTO|VSW_CANREMOUNT|VSW_STATS|VSW_CANLOFI,
      200 +        VSW_HASPROTO|VSW_CANREMOUNT|VSW_STATS|VSW_CANLOFI|VSW_MOUNTDEV,
 200  201          &ufs_mntopts
 201  202  };
 202  203  
 203  204  /*
 204  205   * Module linkage information for the kernel.
 205  206   */
 206  207  extern struct mod_ops mod_fsops;
 207  208  
 208  209  static struct modlfs modlfs = {
 209  210          &mod_fsops, "filesystem for ufs", &vfw
↓ open down ↓ 41 lines elided ↑ open up ↑
 251  252  extern struct vnode *makespecvp(dev_t dev, vtype_t type);
 252  253  
 253  254  extern kmutex_t ufs_scan_lock;
 254  255  
 255  256  static int mountfs(struct vfs *, enum whymountroot, struct vnode *, char *,
 256  257                  struct cred *, int, void *, int);
 257  258  
 258  259  
 259  260  static int
 260  261  ufs_mount(struct vfs *vfsp, struct vnode *mvp, struct mounta *uap,
 261      -        struct cred *cr)
 262      -
      262 +    struct cred *cr)
 263  263  {
 264  264          char *data = uap->dataptr;
 265  265          int datalen = uap->datalen;
 266  266          dev_t dev;
 267  267          struct vnode *lvp = NULL;
 268  268          struct vnode *svp = NULL;
 269  269          struct pathname dpn;
 270  270          int error;
 271  271          enum whymountroot why = ROOT_INIT;
 272  272          struct ufs_args args;
↓ open down ↓ 516 lines elided ↑ open up ↑
 789  789   */
 790  790  int ufs_maxmaxphys = (1024 * 1024);
 791  791  
 792  792  #include <sys/ddi.h>            /* for delay(9f) */
 793  793  
 794  794  int ufs_mount_error_delay = 20; /* default to 20ms */
 795  795  int ufs_mount_timeout = 60000;  /* default to 1 minute */
 796  796  
 797  797  static int
 798  798  mountfs(struct vfs *vfsp, enum whymountroot why, struct vnode *devvp,
 799      -        char *path, cred_t *cr, int isroot, void *raw_argsp, int args_len)
      799 +    char *path, cred_t *cr, int isroot, void *raw_argsp, int args_len)
 800  800  {
 801  801          dev_t dev = devvp->v_rdev;
 802  802          struct fs *fsp;
 803  803          struct ufsvfs *ufsvfsp = 0;
 804  804          struct buf *bp = 0;
 805  805          struct buf *tp = 0;
 806  806          struct dk_cinfo ci;
 807  807          int error = 0;
 808  808          size_t len;
 809  809          int needclose = 0;
↓ open down ↓ 1295 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX