Print this page
6198 Let's EOL cachefs


   5  * Common Development and Distribution License (the "License").
   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 /*
  28  * Just in case we're not in a build environment, make sure that
  29  * TEXT_DOMAIN gets set to something.
  30  */
  31 #if !defined(TEXT_DOMAIN)
  32 #define TEXT_DOMAIN "SYS_TEST"
  33 #endif
  34 
  35 /*
  36  * check componets
  37  */
  38 
  39 #include <meta.h>
  40 #include "meta_lib_prv.h"
  41 
  42 #include <sys/mnttab.h>
  43 #include <sys/swap.h>
  44 #include <devid.h>


  49 #define NOT_SAMEDRIVE           0
  50 #define IDENTICAL_NAME_DEVT     1
  51 #define IDENTICAL_DEVIDS        2
  52 
  53 /*
  54  * static list(s)
  55  */
  56 typedef struct dev_list {
  57         char                    *dev_name;
  58         ddi_devid_t             devid;
  59         struct dev_list         *dev_nxt;
  60 } dev_list_t;
  61 
  62 static dev_list_t       *devnamelist = NULL;
  63 
  64 static char     *skip_these_mntents[] = {
  65         "nfs",
  66         "autofs",
  67         "proc",
  68         "tmpfs",
  69         "cachefs",
  70         "rfs",
  71         "fd",
  72         "mntfs",
  73         "lofs",
  74         "devfs",
  75         "dev",
  76         "ctfs",
  77         "objfs",
  78         "sharefs",
  79         NULL
  80 };
  81 
  82 /*
  83  * free swap info
  84  */
  85 static void
  86 free_swapinfo(
  87         struct swaptable        *swtp
  88 )
  89 {




   5  * Common Development and Distribution License (the "License").
   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  * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
  26  */
  27 
  28 /*
  29  * Just in case we're not in a build environment, make sure that
  30  * TEXT_DOMAIN gets set to something.
  31  */
  32 #if !defined(TEXT_DOMAIN)
  33 #define TEXT_DOMAIN "SYS_TEST"
  34 #endif
  35 
  36 /*
  37  * check componets
  38  */
  39 
  40 #include <meta.h>
  41 #include "meta_lib_prv.h"
  42 
  43 #include <sys/mnttab.h>
  44 #include <sys/swap.h>
  45 #include <devid.h>


  50 #define NOT_SAMEDRIVE           0
  51 #define IDENTICAL_NAME_DEVT     1
  52 #define IDENTICAL_DEVIDS        2
  53 
  54 /*
  55  * static list(s)
  56  */
  57 typedef struct dev_list {
  58         char                    *dev_name;
  59         ddi_devid_t             devid;
  60         struct dev_list         *dev_nxt;
  61 } dev_list_t;
  62 
  63 static dev_list_t       *devnamelist = NULL;
  64 
  65 static char     *skip_these_mntents[] = {
  66         "nfs",
  67         "autofs",
  68         "proc",
  69         "tmpfs",

  70         "rfs",
  71         "fd",
  72         "mntfs",
  73         "lofs",
  74         "devfs",
  75         "dev",
  76         "ctfs",
  77         "objfs",
  78         "sharefs",
  79         NULL
  80 };
  81 
  82 /*
  83  * free swap info
  84  */
  85 static void
  86 free_swapinfo(
  87         struct swaptable        *swtp
  88 )
  89 {