Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nfs_common: make include/linux/nfs4.h include generated nfs4_1.h

In the long run, the NFS development community intends to autogenerate a
lot of the XDR handling code. Both the NFS client and server include
"include/linux/nfs4.hi". That file was hand-rolled, and some of the symbols
in it conflict with the autogenerated symbols.

Add a small nfs4_1.x to Documentation that currently just has the
necessary definitions for the delstid draft, and generate the relevant
header and source files. Make include/linux/nfs4.h include the generated
include/linux/sunrpc/xdrgen/nfs4_1.h and remove the conflicting
definitions from it and nfs_xdr.h.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

authored by

Jeff Layton and committed by
Chuck Lever
8e1d3227 53150305

+570 -12
+166
Documentation/sunrpc/xdr/nfs4_1.x
··· 1 + /* 2 + * Copyright (c) 2010 IETF Trust and the persons identified 3 + * as the document authors. All rights reserved. 4 + * 5 + * The document authors are identified in RFC 3530 and 6 + * RFC 5661. 7 + * 8 + * Redistribution and use in source and binary forms, with 9 + * or without modification, are permitted provided that the 10 + * following conditions are met: 11 + * 12 + * - Redistributions of source code must retain the above 13 + * copyright notice, this list of conditions and the 14 + * following disclaimer. 15 + * 16 + * - Redistributions in binary form must reproduce the above 17 + * copyright notice, this list of conditions and the 18 + * following disclaimer in the documentation and/or other 19 + * materials provided with the distribution. 20 + * 21 + * - Neither the name of Internet Society, IETF or IETF 22 + * Trust, nor the names of specific contributors, may be 23 + * used to endorse or promote products derived from this 24 + * software without specific prior written permission. 25 + * 26 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 27 + * AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 28 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 29 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 30 + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 31 + * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 32 + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 33 + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 34 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 35 + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 36 + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 37 + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 38 + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 39 + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 40 + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 + */ 42 + 43 + pragma header nfs4; 44 + 45 + /* 46 + * Basic typedefs for RFC 1832 data type definitions 47 + */ 48 + typedef hyper int64_t; 49 + typedef unsigned int uint32_t; 50 + 51 + /* 52 + * Basic data types 53 + */ 54 + typedef uint32_t bitmap4<>; 55 + 56 + /* 57 + * Timeval 58 + */ 59 + struct nfstime4 { 60 + int64_t seconds; 61 + uint32_t nseconds; 62 + }; 63 + 64 + 65 + /* 66 + * The following content was extracted from draft-ietf-nfsv4-delstid 67 + */ 68 + 69 + typedef bool fattr4_offline; 70 + 71 + 72 + const FATTR4_OFFLINE = 83; 73 + 74 + 75 + struct open_arguments4 { 76 + bitmap4 oa_share_access; 77 + bitmap4 oa_share_deny; 78 + bitmap4 oa_share_access_want; 79 + bitmap4 oa_open_claim; 80 + bitmap4 oa_create_mode; 81 + }; 82 + 83 + 84 + enum open_args_share_access4 { 85 + OPEN_ARGS_SHARE_ACCESS_READ = 1, 86 + OPEN_ARGS_SHARE_ACCESS_WRITE = 2, 87 + OPEN_ARGS_SHARE_ACCESS_BOTH = 3 88 + }; 89 + 90 + 91 + enum open_args_share_deny4 { 92 + OPEN_ARGS_SHARE_DENY_NONE = 0, 93 + OPEN_ARGS_SHARE_DENY_READ = 1, 94 + OPEN_ARGS_SHARE_DENY_WRITE = 2, 95 + OPEN_ARGS_SHARE_DENY_BOTH = 3 96 + }; 97 + 98 + 99 + enum open_args_share_access_want4 { 100 + OPEN_ARGS_SHARE_ACCESS_WANT_ANY_DELEG = 3, 101 + OPEN_ARGS_SHARE_ACCESS_WANT_NO_DELEG = 4, 102 + OPEN_ARGS_SHARE_ACCESS_WANT_CANCEL = 5, 103 + OPEN_ARGS_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL 104 + = 17, 105 + OPEN_ARGS_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED 106 + = 18, 107 + OPEN_ARGS_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS = 20, 108 + OPEN_ARGS_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION = 21 109 + }; 110 + 111 + 112 + enum open_args_open_claim4 { 113 + OPEN_ARGS_OPEN_CLAIM_NULL = 0, 114 + OPEN_ARGS_OPEN_CLAIM_PREVIOUS = 1, 115 + OPEN_ARGS_OPEN_CLAIM_DELEGATE_CUR = 2, 116 + OPEN_ARGS_OPEN_CLAIM_DELEGATE_PREV = 3, 117 + OPEN_ARGS_OPEN_CLAIM_FH = 4, 118 + OPEN_ARGS_OPEN_CLAIM_DELEG_CUR_FH = 5, 119 + OPEN_ARGS_OPEN_CLAIM_DELEG_PREV_FH = 6 120 + }; 121 + 122 + 123 + enum open_args_createmode4 { 124 + OPEN_ARGS_CREATEMODE_UNCHECKED4 = 0, 125 + OPEN_ARGS_CREATE_MODE_GUARDED = 1, 126 + OPEN_ARGS_CREATEMODE_EXCLUSIVE4 = 2, 127 + OPEN_ARGS_CREATE_MODE_EXCLUSIVE4_1 = 3 128 + }; 129 + 130 + 131 + typedef open_arguments4 fattr4_open_arguments; 132 + pragma public fattr4_open_arguments; 133 + 134 + 135 + %/* 136 + % * Determine what OPEN supports. 137 + % */ 138 + const FATTR4_OPEN_ARGUMENTS = 86; 139 + 140 + 141 + const OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION = 0x200000; 142 + 143 + 144 + const OPEN4_RESULT_NO_OPEN_STATEID = 0x00000010; 145 + 146 + 147 + /* 148 + * attributes for the delegation times being 149 + * cached and served by the "client" 150 + */ 151 + typedef nfstime4 fattr4_time_deleg_access; 152 + typedef nfstime4 fattr4_time_deleg_modify; 153 + pragma public fattr4_time_deleg_access; 154 + pragma public fattr4_time_deleg_modify; 155 + 156 + 157 + %/* 158 + % * New RECOMMENDED Attribute for 159 + % * delegation caching of times 160 + % */ 161 + const FATTR4_TIME_DELEG_ACCESS = 84; 162 + const FATTR4_TIME_DELEG_MODIFY = 85; 163 + 164 + 165 + const OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS = 0x100000; 166 +
+15 -1
fs/nfsd/Makefile
··· 18 18 nfsd-$(CONFIG_NFSD_V2_ACL) += nfs2acl.o 19 19 nfsd-$(CONFIG_NFSD_V3_ACL) += nfs3acl.o 20 20 nfsd-$(CONFIG_NFSD_V4) += nfs4proc.o nfs4xdr.o nfs4state.o nfs4idmap.o \ 21 - nfs4acl.o nfs4callback.o nfs4recover.o 21 + nfs4acl.o nfs4callback.o nfs4recover.o nfs4xdr_gen.o 22 22 nfsd-$(CONFIG_NFSD_PNFS) += nfs4layouts.o 23 23 nfsd-$(CONFIG_NFSD_BLOCKLAYOUT) += blocklayout.o blocklayoutxdr.o 24 24 nfsd-$(CONFIG_NFSD_SCSILAYOUT) += blocklayout.o blocklayoutxdr.o 25 25 nfsd-$(CONFIG_NFSD_FLEXFILELAYOUT) += flexfilelayout.o flexfilelayoutxdr.o 26 26 nfsd-$(CONFIG_NFS_LOCALIO) += localio.o 27 + 28 + 29 + .PHONY: xdrgen 30 + 31 + xdrgen: ../../include/linux/sunrpc/xdrgen/nfs4_1.h nfs4xdr_gen.h nfs4xdr_gen.c 32 + 33 + ../../include/linux/sunrpc/xdrgen/nfs4_1.h: ../../Documentation/sunrpc/xdr/nfs4_1.x 34 + ../../tools/net/sunrpc/xdrgen/xdrgen definitions $< > $@ 35 + 36 + nfs4xdr_gen.h: ../../Documentation/sunrpc/xdr/nfs4_1.x 37 + ../../tools/net/sunrpc/xdrgen/xdrgen declarations $< > $@ 38 + 39 + nfs4xdr_gen.c: ../../Documentation/sunrpc/xdr/nfs4_1.x 40 + ../../tools/net/sunrpc/xdrgen/xdrgen source $< > $@
+239
fs/nfsd/nfs4xdr_gen.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + // Generated by xdrgen. Manual edits will be lost. 3 + // XDR specification file: ../../Documentation/sunrpc/xdr/nfs4_1.x 4 + // XDR specification modification time: Thu Oct 3 11:30:59 2024 5 + 6 + #include <linux/sunrpc/svc.h> 7 + 8 + #include "nfs4xdr_gen.h" 9 + 10 + static bool __maybe_unused 11 + xdrgen_decode_int64_t(struct xdr_stream *xdr, int64_t *ptr) 12 + { 13 + return xdrgen_decode_hyper(xdr, ptr); 14 + }; 15 + 16 + static bool __maybe_unused 17 + xdrgen_decode_uint32_t(struct xdr_stream *xdr, uint32_t *ptr) 18 + { 19 + return xdrgen_decode_unsigned_int(xdr, ptr); 20 + }; 21 + 22 + static bool __maybe_unused 23 + xdrgen_decode_bitmap4(struct xdr_stream *xdr, bitmap4 *ptr) 24 + { 25 + if (xdr_stream_decode_u32(xdr, &ptr->count) < 0) 26 + return false; 27 + for (u32 i = 0; i < ptr->count; i++) 28 + if (!xdrgen_decode_uint32_t(xdr, &ptr->element[i])) 29 + return false; 30 + return true; 31 + }; 32 + 33 + static bool __maybe_unused 34 + xdrgen_decode_nfstime4(struct xdr_stream *xdr, struct nfstime4 *ptr) 35 + { 36 + if (!xdrgen_decode_int64_t(xdr, &ptr->seconds)) 37 + return false; 38 + if (!xdrgen_decode_uint32_t(xdr, &ptr->nseconds)) 39 + return false; 40 + return true; 41 + }; 42 + 43 + static bool __maybe_unused 44 + xdrgen_decode_fattr4_offline(struct xdr_stream *xdr, fattr4_offline *ptr) 45 + { 46 + return xdrgen_decode_bool(xdr, ptr); 47 + }; 48 + 49 + static bool __maybe_unused 50 + xdrgen_decode_open_arguments4(struct xdr_stream *xdr, struct open_arguments4 *ptr) 51 + { 52 + if (!xdrgen_decode_bitmap4(xdr, &ptr->oa_share_access)) 53 + return false; 54 + if (!xdrgen_decode_bitmap4(xdr, &ptr->oa_share_deny)) 55 + return false; 56 + if (!xdrgen_decode_bitmap4(xdr, &ptr->oa_share_access_want)) 57 + return false; 58 + if (!xdrgen_decode_bitmap4(xdr, &ptr->oa_open_claim)) 59 + return false; 60 + if (!xdrgen_decode_bitmap4(xdr, &ptr->oa_create_mode)) 61 + return false; 62 + return true; 63 + }; 64 + 65 + static bool __maybe_unused 66 + xdrgen_decode_open_args_share_access4(struct xdr_stream *xdr, open_args_share_access4 *ptr) 67 + { 68 + u32 val; 69 + 70 + if (xdr_stream_decode_u32(xdr, &val) < 0) 71 + return false; 72 + *ptr = val; 73 + return true; 74 + } 75 + 76 + static bool __maybe_unused 77 + xdrgen_decode_open_args_share_deny4(struct xdr_stream *xdr, open_args_share_deny4 *ptr) 78 + { 79 + u32 val; 80 + 81 + if (xdr_stream_decode_u32(xdr, &val) < 0) 82 + return false; 83 + *ptr = val; 84 + return true; 85 + } 86 + 87 + static bool __maybe_unused 88 + xdrgen_decode_open_args_share_access_want4(struct xdr_stream *xdr, open_args_share_access_want4 *ptr) 89 + { 90 + u32 val; 91 + 92 + if (xdr_stream_decode_u32(xdr, &val) < 0) 93 + return false; 94 + *ptr = val; 95 + return true; 96 + } 97 + 98 + static bool __maybe_unused 99 + xdrgen_decode_open_args_open_claim4(struct xdr_stream *xdr, open_args_open_claim4 *ptr) 100 + { 101 + u32 val; 102 + 103 + if (xdr_stream_decode_u32(xdr, &val) < 0) 104 + return false; 105 + *ptr = val; 106 + return true; 107 + } 108 + 109 + static bool __maybe_unused 110 + xdrgen_decode_open_args_createmode4(struct xdr_stream *xdr, open_args_createmode4 *ptr) 111 + { 112 + u32 val; 113 + 114 + if (xdr_stream_decode_u32(xdr, &val) < 0) 115 + return false; 116 + *ptr = val; 117 + return true; 118 + } 119 + 120 + bool 121 + xdrgen_decode_fattr4_open_arguments(struct xdr_stream *xdr, fattr4_open_arguments *ptr) 122 + { 123 + return xdrgen_decode_open_arguments4(xdr, ptr); 124 + }; 125 + 126 + bool 127 + xdrgen_decode_fattr4_time_deleg_access(struct xdr_stream *xdr, fattr4_time_deleg_access *ptr) 128 + { 129 + return xdrgen_decode_nfstime4(xdr, ptr); 130 + }; 131 + 132 + bool 133 + xdrgen_decode_fattr4_time_deleg_modify(struct xdr_stream *xdr, fattr4_time_deleg_modify *ptr) 134 + { 135 + return xdrgen_decode_nfstime4(xdr, ptr); 136 + }; 137 + 138 + static bool __maybe_unused 139 + xdrgen_encode_int64_t(struct xdr_stream *xdr, const int64_t value) 140 + { 141 + return xdrgen_encode_hyper(xdr, value); 142 + }; 143 + 144 + static bool __maybe_unused 145 + xdrgen_encode_uint32_t(struct xdr_stream *xdr, const uint32_t value) 146 + { 147 + return xdrgen_encode_unsigned_int(xdr, value); 148 + }; 149 + 150 + static bool __maybe_unused 151 + xdrgen_encode_bitmap4(struct xdr_stream *xdr, const bitmap4 value) 152 + { 153 + if (xdr_stream_encode_u32(xdr, value.count) != XDR_UNIT) 154 + return false; 155 + for (u32 i = 0; i < value.count; i++) 156 + if (!xdrgen_encode_uint32_t(xdr, value.element[i])) 157 + return false; 158 + return true; 159 + }; 160 + 161 + static bool __maybe_unused 162 + xdrgen_encode_nfstime4(struct xdr_stream *xdr, const struct nfstime4 *value) 163 + { 164 + if (!xdrgen_encode_int64_t(xdr, value->seconds)) 165 + return false; 166 + if (!xdrgen_encode_uint32_t(xdr, value->nseconds)) 167 + return false; 168 + return true; 169 + }; 170 + 171 + static bool __maybe_unused 172 + xdrgen_encode_fattr4_offline(struct xdr_stream *xdr, const fattr4_offline value) 173 + { 174 + return xdrgen_encode_bool(xdr, value); 175 + }; 176 + 177 + static bool __maybe_unused 178 + xdrgen_encode_open_arguments4(struct xdr_stream *xdr, const struct open_arguments4 *value) 179 + { 180 + if (!xdrgen_encode_bitmap4(xdr, value->oa_share_access)) 181 + return false; 182 + if (!xdrgen_encode_bitmap4(xdr, value->oa_share_deny)) 183 + return false; 184 + if (!xdrgen_encode_bitmap4(xdr, value->oa_share_access_want)) 185 + return false; 186 + if (!xdrgen_encode_bitmap4(xdr, value->oa_open_claim)) 187 + return false; 188 + if (!xdrgen_encode_bitmap4(xdr, value->oa_create_mode)) 189 + return false; 190 + return true; 191 + }; 192 + 193 + static bool __maybe_unused 194 + xdrgen_encode_open_args_share_access4(struct xdr_stream *xdr, open_args_share_access4 value) 195 + { 196 + return xdr_stream_encode_u32(xdr, value) == XDR_UNIT; 197 + } 198 + 199 + static bool __maybe_unused 200 + xdrgen_encode_open_args_share_deny4(struct xdr_stream *xdr, open_args_share_deny4 value) 201 + { 202 + return xdr_stream_encode_u32(xdr, value) == XDR_UNIT; 203 + } 204 + 205 + static bool __maybe_unused 206 + xdrgen_encode_open_args_share_access_want4(struct xdr_stream *xdr, open_args_share_access_want4 value) 207 + { 208 + return xdr_stream_encode_u32(xdr, value) == XDR_UNIT; 209 + } 210 + 211 + static bool __maybe_unused 212 + xdrgen_encode_open_args_open_claim4(struct xdr_stream *xdr, open_args_open_claim4 value) 213 + { 214 + return xdr_stream_encode_u32(xdr, value) == XDR_UNIT; 215 + } 216 + 217 + static bool __maybe_unused 218 + xdrgen_encode_open_args_createmode4(struct xdr_stream *xdr, open_args_createmode4 value) 219 + { 220 + return xdr_stream_encode_u32(xdr, value) == XDR_UNIT; 221 + } 222 + 223 + bool 224 + xdrgen_encode_fattr4_open_arguments(struct xdr_stream *xdr, const fattr4_open_arguments *value) 225 + { 226 + return xdrgen_encode_open_arguments4(xdr, value); 227 + }; 228 + 229 + bool 230 + xdrgen_encode_fattr4_time_deleg_access(struct xdr_stream *xdr, const fattr4_time_deleg_access *value) 231 + { 232 + return xdrgen_encode_nfstime4(xdr, value); 233 + }; 234 + 235 + bool 236 + xdrgen_encode_fattr4_time_deleg_modify(struct xdr_stream *xdr, const fattr4_time_deleg_modify *value) 237 + { 238 + return xdrgen_encode_nfstime4(xdr, value); 239 + };
+25
fs/nfsd/nfs4xdr_gen.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* Generated by xdrgen. Manual edits will be lost. */ 3 + /* XDR specification file: ../../Documentation/sunrpc/xdr/nfs4_1.x */ 4 + /* XDR specification modification time: Thu Oct 3 11:30:59 2024 */ 5 + 6 + #ifndef _LINUX_XDRGEN_NFS4_1_DECL_H 7 + #define _LINUX_XDRGEN_NFS4_1_DECL_H 8 + 9 + #include <linux/types.h> 10 + 11 + #include <linux/sunrpc/xdr.h> 12 + #include <linux/sunrpc/xdrgen/_defs.h> 13 + #include <linux/sunrpc/xdrgen/_builtins.h> 14 + #include <linux/sunrpc/xdrgen/nfs4_1.h> 15 + 16 + bool xdrgen_decode_fattr4_open_arguments(struct xdr_stream *xdr, fattr4_open_arguments *ptr); 17 + bool xdrgen_encode_fattr4_open_arguments(struct xdr_stream *xdr, const fattr4_open_arguments *value); 18 + 19 + bool xdrgen_decode_fattr4_time_deleg_access(struct xdr_stream *xdr, fattr4_time_deleg_access *ptr); 20 + bool xdrgen_encode_fattr4_time_deleg_access(struct xdr_stream *xdr, const fattr4_time_deleg_access *value); 21 + 22 + bool xdrgen_decode_fattr4_time_deleg_modify(struct xdr_stream *xdr, fattr4_time_deleg_modify *ptr); 23 + bool xdrgen_encode_fattr4_time_deleg_modify(struct xdr_stream *xdr, const fattr4_time_deleg_modify *value); 24 + 25 + #endif /* _LINUX_XDRGEN_NFS4_1_DECL_H */
+1 -6
include/linux/nfs4.h
··· 17 17 #include <linux/uidgid.h> 18 18 #include <uapi/linux/nfs4.h> 19 19 #include <linux/sunrpc/msg_prot.h> 20 + #include <linux/sunrpc/xdrgen/nfs4_1.h> 20 21 21 22 enum nfs4_acl_whotype { 22 23 NFS4_ACL_WHO_NAMED = 0, ··· 511 510 */ 512 511 enum { 513 512 FATTR4_XATTR_SUPPORT = 82, 514 - }; 515 - 516 - enum { 517 - FATTR4_TIME_DELEG_ACCESS = 84, 518 - FATTR4_TIME_DELEG_MODIFY = 85, 519 - FATTR4_OPEN_ARGUMENTS = 86, 520 513 }; 521 514 522 515 /*
-5
include/linux/nfs_xdr.h
··· 1315 1315 1316 1316 #endif /* CONFIG_NFS_V4 */ 1317 1317 1318 - struct nfstime4 { 1319 - u64 seconds; 1320 - u32 nseconds; 1321 - }; 1322 - 1323 1318 #ifdef CONFIG_NFS_V4_1 1324 1319 1325 1320 struct pnfs_commit_bucket {
+124
include/linux/sunrpc/xdrgen/nfs4_1.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* Generated by xdrgen. Manual edits will be lost. */ 3 + /* XDR specification file: ../../Documentation/sunrpc/xdr/nfs4_1.x */ 4 + /* XDR specification modification time: Thu Oct 3 11:30:59 2024 */ 5 + 6 + #ifndef _LINUX_XDRGEN_NFS4_1_DEF_H 7 + #define _LINUX_XDRGEN_NFS4_1_DEF_H 8 + 9 + #include <linux/types.h> 10 + #include <linux/sunrpc/xdrgen/_defs.h> 11 + 12 + typedef s64 int64_t; 13 + 14 + typedef u32 uint32_t; 15 + 16 + typedef struct { 17 + u32 count; 18 + uint32_t *element; 19 + } bitmap4; 20 + 21 + struct nfstime4 { 22 + int64_t seconds; 23 + uint32_t nseconds; 24 + }; 25 + 26 + typedef bool fattr4_offline; 27 + 28 + enum { FATTR4_OFFLINE = 83 }; 29 + 30 + struct open_arguments4 { 31 + bitmap4 oa_share_access; 32 + bitmap4 oa_share_deny; 33 + bitmap4 oa_share_access_want; 34 + bitmap4 oa_open_claim; 35 + bitmap4 oa_create_mode; 36 + }; 37 + 38 + enum open_args_share_access4 { 39 + OPEN_ARGS_SHARE_ACCESS_READ = 1, 40 + OPEN_ARGS_SHARE_ACCESS_WRITE = 2, 41 + OPEN_ARGS_SHARE_ACCESS_BOTH = 3, 42 + }; 43 + typedef enum open_args_share_access4 open_args_share_access4; 44 + 45 + enum open_args_share_deny4 { 46 + OPEN_ARGS_SHARE_DENY_NONE = 0, 47 + OPEN_ARGS_SHARE_DENY_READ = 1, 48 + OPEN_ARGS_SHARE_DENY_WRITE = 2, 49 + OPEN_ARGS_SHARE_DENY_BOTH = 3, 50 + }; 51 + typedef enum open_args_share_deny4 open_args_share_deny4; 52 + 53 + enum open_args_share_access_want4 { 54 + OPEN_ARGS_SHARE_ACCESS_WANT_ANY_DELEG = 3, 55 + OPEN_ARGS_SHARE_ACCESS_WANT_NO_DELEG = 4, 56 + OPEN_ARGS_SHARE_ACCESS_WANT_CANCEL = 5, 57 + OPEN_ARGS_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL = 17, 58 + OPEN_ARGS_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED = 18, 59 + OPEN_ARGS_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS = 20, 60 + OPEN_ARGS_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION = 21, 61 + }; 62 + typedef enum open_args_share_access_want4 open_args_share_access_want4; 63 + 64 + enum open_args_open_claim4 { 65 + OPEN_ARGS_OPEN_CLAIM_NULL = 0, 66 + OPEN_ARGS_OPEN_CLAIM_PREVIOUS = 1, 67 + OPEN_ARGS_OPEN_CLAIM_DELEGATE_CUR = 2, 68 + OPEN_ARGS_OPEN_CLAIM_DELEGATE_PREV = 3, 69 + OPEN_ARGS_OPEN_CLAIM_FH = 4, 70 + OPEN_ARGS_OPEN_CLAIM_DELEG_CUR_FH = 5, 71 + OPEN_ARGS_OPEN_CLAIM_DELEG_PREV_FH = 6, 72 + }; 73 + typedef enum open_args_open_claim4 open_args_open_claim4; 74 + 75 + enum open_args_createmode4 { 76 + OPEN_ARGS_CREATEMODE_UNCHECKED4 = 0, 77 + OPEN_ARGS_CREATE_MODE_GUARDED = 1, 78 + OPEN_ARGS_CREATEMODE_EXCLUSIVE4 = 2, 79 + OPEN_ARGS_CREATE_MODE_EXCLUSIVE4_1 = 3, 80 + }; 81 + typedef enum open_args_createmode4 open_args_createmode4; 82 + 83 + typedef struct open_arguments4 fattr4_open_arguments; 84 + 85 + enum { FATTR4_OPEN_ARGUMENTS = 86 }; 86 + 87 + enum { OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION = 0x200000 }; 88 + 89 + enum { OPEN4_RESULT_NO_OPEN_STATEID = 0x00000010 }; 90 + 91 + typedef struct nfstime4 fattr4_time_deleg_access; 92 + 93 + typedef struct nfstime4 fattr4_time_deleg_modify; 94 + 95 + enum { FATTR4_TIME_DELEG_ACCESS = 84 }; 96 + 97 + enum { FATTR4_TIME_DELEG_MODIFY = 85 }; 98 + 99 + enum { OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS = 0x100000 }; 100 + 101 + #define NFS4_int64_t_sz \ 102 + (XDR_hyper) 103 + #define NFS4_uint32_t_sz \ 104 + (XDR_unsigned_int) 105 + #define NFS4_bitmap4_sz (XDR_unsigned_int) 106 + #define NFS4_nfstime4_sz \ 107 + (NFS4_int64_t_sz + NFS4_uint32_t_sz) 108 + #define NFS4_fattr4_offline_sz \ 109 + (XDR_bool) 110 + #define NFS4_open_arguments4_sz \ 111 + (NFS4_bitmap4_sz + NFS4_bitmap4_sz + NFS4_bitmap4_sz + NFS4_bitmap4_sz + NFS4_bitmap4_sz) 112 + #define NFS4_open_args_share_access4_sz (XDR_int) 113 + #define NFS4_open_args_share_deny4_sz (XDR_int) 114 + #define NFS4_open_args_share_access_want4_sz (XDR_int) 115 + #define NFS4_open_args_open_claim4_sz (XDR_int) 116 + #define NFS4_open_args_createmode4_sz (XDR_int) 117 + #define NFS4_fattr4_open_arguments_sz \ 118 + (NFS4_open_arguments4_sz) 119 + #define NFS4_fattr4_time_deleg_access_sz \ 120 + (NFS4_nfstime4_sz) 121 + #define NFS4_fattr4_time_deleg_modify_sz \ 122 + (NFS4_nfstime4_sz) 123 + 124 + #endif /* _LINUX_XDRGEN_NFS4_1_DEF_H */