Print this page
8115 parallel zfs mount

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/vfs.c
          +++ new/usr/src/uts/common/fs/vfs.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 (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   * Copyright 2016 Joyent, Inc.
  25   25   * Copyright 2016 Toomas Soome <tsoome@me.com>
  26      - * Copyright (c) 2016 by Delphix. All rights reserved.
       26 + * Copyright (c) 2016, 2017 by Delphix. All rights reserved.
  27   27   * Copyright 2016 Nexenta Systems, Inc.
  28   28   * Copyright 2017 RackTop Systems.
  29   29   */
  30   30  
  31   31  /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T     */
  32   32  /*        All Rights Reserved   */
  33   33  
  34   34  /*
  35   35   * University Copyright- Copyright (c) 1982, 1986, 1988
  36   36   * The Regents of the University of California
↓ open down ↓ 1247 lines elided ↑ open up ↑
1284 1284                              KM_SLEEP);
1285 1285                          (void) strcpy(resource, pn.pn_path);
1286 1286                          pn_free(&pn);
1287 1287                  }
1288 1288                  /*
1289 1289                   * Do a lookupname prior to taking the
1290 1290                   * writelock. Mark this as completed if
1291 1291                   * successful for later cleanup and addition to
1292 1292                   * the mount in progress table.
1293 1293                   */
1294      -                if ((uap->flags & MS_GLOBAL) == 0 &&
     1294 +                if ((vswp->vsw_flag & VSW_MOUNTDEV) &&
     1295 +                    (uap->flags & MS_GLOBAL) == 0 &&
1295 1296                      lookupname(uap->spec, fromspace,
1296 1297                      FOLLOW, NULL, &bvp) == 0) {
1297 1298                          addmip = 1;
1298 1299                  }
1299 1300  
1300 1301                  if ((error = pn_get(uap->dir, fromspace, &pn)) == 0) {
1301 1302                          pathname_t *pnp;
1302 1303  
1303 1304                          if (*pn.pn_path != '/') {
1304 1305                                  error = EINVAL;
↓ open down ↓ 195 lines elided ↑ open up ↑
1500 1501          }
1501 1502  
1502 1503          /*
1503 1504           * Add device to mount in progress table, global mounts require special
1504 1505           * handling. It is possible that we have already done the lookupname
1505 1506           * on a spliced, non-global fs. If so, we don't want to do it again
1506 1507           * since we cannot do a lookupname after taking the
1507 1508           * wlock above. This case is for a non-spliced, non-global filesystem.
1508 1509           */
1509 1510          if (!addmip) {
1510      -                if ((uap->flags & MS_GLOBAL) == 0 &&
     1511 +                if ((vswp->vsw_flag & VSW_MOUNTDEV) &&
     1512 +                    (uap->flags & MS_GLOBAL) == 0 &&
1511 1513                      lookupname(uap->spec, fromspace, FOLLOW, NULL, &bvp) == 0) {
1512 1514                          addmip = 1;
1513 1515                  }
1514 1516          }
1515 1517  
1516 1518          if (addmip) {
1517 1519                  vnode_t *lvp = NULL;
1518 1520  
1519 1521                  error = vfs_get_lofi(vfsp, &lvp);
1520 1522                  if (error > 0) {
↓ open down ↓ 3254 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX