Print this page
NEX-15279 support NFS server in zone
NEX-15520 online NFS shares cause zoneadm halt to hang in nfs_export_zone_fini
Portions contributed by: Dan Kruchinin dan.kruchinin@nexenta.com
Portions contributed by: Stepan Zastupov stepan.zastupov@gmail.com
Reviewed by: Joyce McIntosh <joyce.mcintosh@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
OS-20 share_nfs(1m) charset handling is unreliable
OS-22 Page fault at nfscmd_dropped_entrysize+0x1e()
OS-23 NFSv2/3/4: READDIR responses are inconsistent when charset conversion fails
OS-24 rfs3_readdir(): Issues related to nfscmd_convdirent()
Reviewed by: Jan Kryl <jan.kryl@nexenta.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/nfs/nfs_cmd.h
+++ new/usr/src/uts/common/nfs/nfs_cmd.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
|
↓ open down ↓ |
10 lines elided |
↑ open up ↑ |
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
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 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 24 * Use is subject to license terms.
24 25 */
25 26
26 27 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
27 28 /* All Rights Reserved */
28 29
30 +/*
31 + * Copyright 2018 Nexenta Systems, Inc.
32 + */
33 +
29 34 #ifndef _NFS_CMD_H
30 35 #define _NFS_CMD_H
31 36
32 37 #ifdef __cplusplus
33 38 extern "C" {
34 39 #endif
35 40
36 41 #include <sys/types.h>
37 42 #include <sys/param.h>
38 43 #include <sys/kiconv.h>
39 44
40 45 #define KICONV_MAX_CODENAME_LEN 63 /* copied from sys/kiconv.h */
41 46
42 47 #define NFSCMD_VERS_1 1
43 48 #define NFSCMD_VERSION NFSCMD_VERS_1
44 49
45 50 typedef enum { NFSCMD_CHARMAP_LOOKUP, NFSCMD_ERROR } nfscmd_t;
46 51 typedef enum { NFSCMD_ERR_SUCCESS, NFSCMD_ERR_BADCMD, NFSCMD_ERR_NOTFOUND,
47 52 NFSCMD_ERR_FAIL, NFSCMD_ERR_DROP, NFSCMD_ERR_NOMEM } nfscmd_err_t;
48 53 #define NFSCMD_ERR_RET 0x100000
49 54
50 55 typedef struct nfscmd_arg {
51 56 uint32_t version;
52 57 nfscmd_t cmd;
53 58 union {
54 59 struct {
55 60 char path[MAXPATHLEN];
56 61 struct sockaddr addr;
57 62 } charmap;
58 63 } arg;
59 64 } nfscmd_arg_t;
60 65
61 66 typedef struct nfscmd_res {
62 67 uint32_t version;
63 68 uint32_t cmd;
64 69 nfscmd_err_t error;
65 70 union {
66 71 struct {
67 72 char codeset[KICONV_MAX_CODENAME_LEN + 1];
68 73 uint32_t apply;
69 74 } charmap;
70 75 } result;
71 76 } nfscmd_res_t;
72 77
|
↓ open down ↓ |
34 lines elided |
↑ open up ↑ |
73 78 #ifdef _KERNEL
74 79
75 80 #define NFSCMD_CONV_INBOUND 1
76 81 #define NFSCMD_CONV_OUTBOUND 0
77 82
78 83 extern int nfscmd_send(nfscmd_arg_t *, nfscmd_res_t *);
79 84 extern struct charset_cache *nfscmd_findmap(struct exportinfo *,
80 85 struct sockaddr *);
81 86 extern char *nfscmd_convname(struct sockaddr *, struct exportinfo *,
82 87 char *, int, size_t);
83 -extern char *nfscmd_convdirent(struct sockaddr *, struct exportinfo *, char *,
84 - size_t, enum nfsstat3 *);
85 -extern size_t nfscmd_convdirplus(struct sockaddr *, struct exportinfo *, char *,
86 - size_t, size_t, char **);
87 -extern size_t nfscmd_countents(char *, size_t);
88 -extern size_t nfscmd_dropped_entrysize(struct dirent64 *, size_t, size_t);
88 +extern void nfscmd_init(void);
89 +extern void nfscmd_fini(void);
89 90
90 91 #endif
91 92
92 93 #ifdef __cplusplus
93 94 }
94 95 #endif
95 96
96 97 #endif /* _NFS_CMD_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX