Print this page
6198 Let's EOL cachefs


   3  *
   4  * The contents of this file are subject to the terms of the
   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  * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
  27 /*        All Rights Reserved   */
  28 
  29 /*
  30  * Portions of this source code were derived from Berkeley 4.3 BSD
  31  * under license from the Regents of the University of California.
  32  */
  33 
  34 #ifndef _SYS_VFS_H
  35 #define _SYS_VFS_H
  36 
  37 #include <sys/zone.h>
  38 #include <sys/types.h>
  39 #include <sys/t_lock.h>
  40 #include <sys/cred.h>
  41 #include <sys/vnode.h>
  42 #include <sys/statvfs.h>
  43 #include <sys/refstr.h>


  54 
  55 /*
  56  * Operations vector.  This is used internal to the kernel; file systems
  57  * supply their list of operations via vfs_setfsops().
  58  */
  59 
  60 typedef struct vfsops vfsops_t;
  61 
  62 /*
  63  * File system identifier. Should be unique (at least per machine).
  64  */
  65 typedef struct {
  66         int val[2];                     /* file system id type */
  67 } fsid_t;
  68 
  69 /*
  70  * File identifier.  Should be unique per filesystem on a single
  71  * machine.  This is typically called by a stateless file server
  72  * in order to generate "file handles".
  73  *
  74  * Do not change the definition of struct fid ... fid_t without
  75  * letting the CacheFS group know about it!  They will have to do at
  76  * least two things, in the same change that changes this structure:
  77  *   1. change CFSVERSION in usr/src/uts/common/sys/fs/cachefs_fs.h
  78  *   2. put the old version # in the canupgrade array
  79  *      in cachfs_upgrade() in usr/src/cmd/fs.d/cachefs/fsck/fsck.c
  80  * This is necessary because CacheFS stores FIDs on disk.
  81  *
  82  * Many underlying file systems cast a struct fid into other
  83  * file system dependent structures which may require 4 byte alignment.
  84  * Because a fid starts with a short it may not be 4 byte aligned, the
  85  * fid_pad will force the alignment.
  86  */
  87 #define MAXFIDSZ        64
  88 #define OLD_MAXFIDSZ    16
  89 
  90 typedef struct fid {
  91         union {
  92                 long fid_pad;
  93                 struct {
  94                         ushort_t len;   /* length of data in bytes */
  95                         char    data[MAXFIDSZ]; /* data (variable len) */
  96                 } _fid;
  97         } un;
  98 } fid_t;
  99 
 100 #ifdef _SYSCALL32
 101 /*




   3  *
   4  * The contents of this file are subject to the terms of the
   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  * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
  27 /*        All Rights Reserved   */
  28 
  29 /*
  30  * Portions of this source code were derived from Berkeley 4.3 BSD
  31  * under license from the Regents of the University of California.
  32  */
  33 
  34 #ifndef _SYS_VFS_H
  35 #define _SYS_VFS_H
  36 
  37 #include <sys/zone.h>
  38 #include <sys/types.h>
  39 #include <sys/t_lock.h>
  40 #include <sys/cred.h>
  41 #include <sys/vnode.h>
  42 #include <sys/statvfs.h>
  43 #include <sys/refstr.h>


  54 
  55 /*
  56  * Operations vector.  This is used internal to the kernel; file systems
  57  * supply their list of operations via vfs_setfsops().
  58  */
  59 
  60 typedef struct vfsops vfsops_t;
  61 
  62 /*
  63  * File system identifier. Should be unique (at least per machine).
  64  */
  65 typedef struct {
  66         int val[2];                     /* file system id type */
  67 } fsid_t;
  68 
  69 /*
  70  * File identifier.  Should be unique per filesystem on a single
  71  * machine.  This is typically called by a stateless file server
  72  * in order to generate "file handles".
  73  *








  74  * Many underlying file systems cast a struct fid into other
  75  * file system dependent structures which may require 4 byte alignment.
  76  * Because a fid starts with a short it may not be 4 byte aligned, the
  77  * fid_pad will force the alignment.
  78  */
  79 #define MAXFIDSZ        64
  80 #define OLD_MAXFIDSZ    16
  81 
  82 typedef struct fid {
  83         union {
  84                 long fid_pad;
  85                 struct {
  86                         ushort_t len;   /* length of data in bytes */
  87                         char    data[MAXFIDSZ]; /* data (variable len) */
  88                 } _fid;
  89         } un;
  90 } fid_t;
  91 
  92 #ifdef _SYSCALL32
  93 /*