Merge remote-tracking branch 'origin/master'
[unleashed/lotheac.git] / usr / src / uts / common / sharefs / sharetab.h
blobf1a3fd620cd6ce2397175f5d24811c8f6d2504f2
1 /*
2 * CDDL HEADER START
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.
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.
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]
19 * CDDL HEADER END
22 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
25 #ifndef _SHAREFS_SHARETAB_H
26 #define _SHAREFS_SHARETAB_H
28 #include <sys/pkp_hash.h>
31 * This header defines the glue to keeping a sharetab in memory.
32 * It is broken out from sharefs.h in the case that it will be
33 * reused in userland.
37 * Note:
38 * Must include share/share.h before this header.
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
45 typedef struct sh_list { /* cached share list */
46 struct sh_list *shl_next;
47 share_t *shl_sh;
48 } sh_list_t;
50 typedef struct sharefs_hash_head {
51 share_t *ssh_sh;
52 uint_t ssh_count;
53 } sharefs_hash_head_t;
55 #define SHARETAB_HASHES PKP_HASH_SIZE
57 typedef struct sharetab {
58 sharefs_hash_head_t s_buckets[SHARETAB_HASHES];
59 char *s_fstype;
60 struct sharetab *s_next;
61 uint_t s_count;
62 } sharetab_t;
64 #ifdef __cplusplus
66 #endif
68 #endif /* !_SHAREFS_SHARETAB_H */