1 /* 2 * CDDL HEADER START 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 2008 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 #ifndef _NNODE_VN_H 27 #define _NNODE_VN_H 28 29 #include <nfs/nnode.h> 30 31 #include <nfs/nfs4.h> 32 #include <nfs/export.h> 33 #include <nfs/nfs41_filehandle.h> 34 35 #include <sys/types.h> 36 #include <sys/cred.h> 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 typedef struct { 43 vnode_t *nvd_vp; 44 kmutex_t nvd_lock; 45 uint32_t nvd_flags; 46 vattr_t nvd_vattr; 47 exportinfo_t *nvd_exi; 48 } nnode_vn_data_t; 49 #define NNODE_NVD_VATTR_VALID 0x01 50 51 typedef struct { 52 vnode_t *nvm_vp; 53 } nnode_vn_md_t; 54 55 typedef struct { 56 vnode_t *nvs_vp; 57 } nnode_vn_state_t; 58 59 typedef struct { 60 fsid_t *nfk_fsid; 61 fid_t *nfk_fid; 62 uint32_t *nfk_other; 63 } nnode_fid_key_t; 64 65 /* 66 * NB: The firsts fields of nnode_fid_key_v41_t must be the same as all 67 * of the fields in nnode_fid_key_t. 68 */ 69 70 typedef struct { 71 fsid_t *nfk_fsid; 72 fid_t *nfk_fid; 73 uint32_t *nfk_other; 74 fid_t *nfk_xfid; 75 fsid_t nfk_real_fsid; 76 fid_t nfk_real_fid; 77 fid_t nfk_real_xfid; 78 uint32_t nfk_real_other; 79 } nnode_fid_key_v41_t; 80 81 /* 82 * NB: The firsts fields of nnode_fid_key_v4_t must be the same as all 83 * of the fields in nnode_fid_key_t. 84 */ 85 86 typedef struct { 87 fsid_t *nfk_fsid; 88 fid_t *nfk_fid; 89 uint32_t *nfk_other; 90 fid_t *nfk_xfid; 91 nfs_fh4_fmt_t nfk_fh; 92 } nnode_fid_key_v4_t; 93 94 /* 95 * NB: The firsts fields of nnode_fid_key_v3_t must be the same as all 96 * of the fields in nnode_fid_key_t. 97 */ 98 99 typedef struct { 100 fsid_t *nfk_fsid; 101 fid_t *nfk_fid; 102 uint32_t *nfk_other; 103 nfs_fh3 nfk_fh; 104 } nnode_fid_key_v3_t; 105 106 typedef struct { 107 nfs_fh3 *nsv_fh; 108 exportinfo_t *nsv_exi; 109 } nnode_seed_v3data_t; 110 111 /* 112 * NB: The firsts fields of nnode_fid_key_vp_t must be the same as all 113 * of the fields in nnode_fid_key_t. 114 */ 115 116 typedef struct { 117 fsid_t *nfk_fsid; 118 fid_t *nfk_fid; 119 uint32_t *nfk_other; 120 fsid_t nfk_real_fsid; 121 fid_t nfk_real_fid; 122 uint32_t nfk_zero; 123 } nnode_fid_key_vp_t; 124 125 typedef struct { 126 vnode_t *nsv_vp; 127 fsid_t nsv_fsid; 128 fid_t *nsv_fidp; 129 } nnode_seed_vpdata_t; 130 131 #ifdef __cplusplus 132 } 133 #endif 134 135 #endif /* _NNODE_VN_H */ 136