blob: 6512901e8d03d89dcd37a4f3e51c0faea3ed5585 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef _UAPI_LINUX_NFS4_H
8#define _UAPI_LINUX_NFS4_H
9#include <linux/types.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080010#define NFS4_BITMAP_SIZE 3
Ben Cheng655a7c02013-10-16 16:09:24 -070011#define NFS4_VERIFIER_SIZE 8
12#define NFS4_STATEID_SEQID_SIZE 4
13#define NFS4_STATEID_OTHER_SIZE 12
14#define NFS4_STATEID_SIZE (NFS4_STATEID_SEQID_SIZE + NFS4_STATEID_OTHER_SIZE)
Ben Cheng655a7c02013-10-16 16:09:24 -070015#define NFS4_FHSIZE 128
16#define NFS4_MAXPATHLEN PATH_MAX
17#define NFS4_MAXNAMLEN NAME_MAX
18#define NFS4_OPAQUE_LIMIT 1024
Ben Cheng655a7c02013-10-16 16:09:24 -070019#define NFS4_MAX_SESSIONID_LEN 16
20#define NFS4_ACCESS_READ 0x0001
21#define NFS4_ACCESS_LOOKUP 0x0002
22#define NFS4_ACCESS_MODIFY 0x0004
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define NFS4_ACCESS_EXTEND 0x0008
24#define NFS4_ACCESS_DELETE 0x0010
25#define NFS4_ACCESS_EXECUTE 0x0020
Christopher Ferris25c18d42020-10-14 17:42:58 -070026#define NFS4_ACCESS_XAREAD 0x0040
27#define NFS4_ACCESS_XAWRITE 0x0080
28#define NFS4_ACCESS_XALIST 0x0100
Ben Cheng655a7c02013-10-16 16:09:24 -070029#define NFS4_FH_PERSISTENT 0x0000
Ben Cheng655a7c02013-10-16 16:09:24 -070030#define NFS4_FH_NOEXPIRE_WITH_OPEN 0x0001
31#define NFS4_FH_VOLATILE_ANY 0x0002
32#define NFS4_FH_VOL_MIGRATION 0x0004
33#define NFS4_FH_VOL_RENAME 0x0008
Ben Cheng655a7c02013-10-16 16:09:24 -070034#define NFS4_OPEN_RESULT_CONFIRM 0x0002
35#define NFS4_OPEN_RESULT_LOCKTYPE_POSIX 0x0004
Christopher Ferris10a76e62022-06-08 13:31:52 -070036#define NFS4_OPEN_RESULT_PRESERVE_UNLINKED 0x0008
Christopher Ferris63fcca42024-09-26 01:12:10 +000037#define NFS4_OPEN_RESULT_NO_OPEN_STATEID 0x0010
Christopher Ferris6a9755d2017-01-13 14:09:31 -080038#define NFS4_OPEN_RESULT_MAY_NOTIFY_LOCK 0x0020
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define NFS4_SHARE_ACCESS_MASK 0x000F
Christopher Ferris6a9755d2017-01-13 14:09:31 -080040#define NFS4_SHARE_ACCESS_READ 0x0001
Ben Cheng655a7c02013-10-16 16:09:24 -070041#define NFS4_SHARE_ACCESS_WRITE 0x0002
42#define NFS4_SHARE_ACCESS_BOTH 0x0003
43#define NFS4_SHARE_DENY_READ 0x0001
Christopher Ferris6a9755d2017-01-13 14:09:31 -080044#define NFS4_SHARE_DENY_WRITE 0x0002
Ben Cheng655a7c02013-10-16 16:09:24 -070045#define NFS4_SHARE_DENY_BOTH 0x0003
46#define NFS4_SHARE_WANT_MASK 0xFF00
47#define NFS4_SHARE_WANT_NO_PREFERENCE 0x0000
Christopher Ferris6a9755d2017-01-13 14:09:31 -080048#define NFS4_SHARE_WANT_READ_DELEG 0x0100
Ben Cheng655a7c02013-10-16 16:09:24 -070049#define NFS4_SHARE_WANT_WRITE_DELEG 0x0200
50#define NFS4_SHARE_WANT_ANY_DELEG 0x0300
51#define NFS4_SHARE_WANT_NO_DELEG 0x0400
Christopher Ferris6a9755d2017-01-13 14:09:31 -080052#define NFS4_SHARE_WANT_CANCEL 0x0500
Ben Cheng655a7c02013-10-16 16:09:24 -070053#define NFS4_SHARE_WHEN_MASK 0xF0000
54#define NFS4_SHARE_SIGNAL_DELEG_WHEN_RESRC_AVAIL 0x10000
55#define NFS4_SHARE_PUSH_DELEG_WHEN_UNCONTENDED 0x20000
Christopher Ferris63fcca42024-09-26 01:12:10 +000056#define NFS4_SHARE_WANT_DELEG_TIMESTAMPS 0x100000
57#define NFS4_SHARE_WANT_OPEN_XOR_DELEGATION 0x200000
Christopher Ferris6a9755d2017-01-13 14:09:31 -080058#define NFS4_CDFC4_FORE 0x1
Ben Cheng655a7c02013-10-16 16:09:24 -070059#define NFS4_CDFC4_BACK 0x2
60#define NFS4_CDFC4_BOTH 0x3
61#define NFS4_CDFC4_FORE_OR_BOTH 0x3
Christopher Ferris6a9755d2017-01-13 14:09:31 -080062#define NFS4_CDFC4_BACK_OR_BOTH 0x7
Ben Cheng655a7c02013-10-16 16:09:24 -070063#define NFS4_CDFS4_FORE 0x1
64#define NFS4_CDFS4_BACK 0x2
65#define NFS4_CDFS4_BOTH 0x3
Christopher Ferris6a9755d2017-01-13 14:09:31 -080066#define NFS4_SET_TO_SERVER_TIME 0
Ben Cheng655a7c02013-10-16 16:09:24 -070067#define NFS4_SET_TO_CLIENT_TIME 1
68#define NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE 0
69#define NFS4_ACE_ACCESS_DENIED_ACE_TYPE 1
Christopher Ferris6a9755d2017-01-13 14:09:31 -080070#define NFS4_ACE_SYSTEM_AUDIT_ACE_TYPE 2
Ben Cheng655a7c02013-10-16 16:09:24 -070071#define NFS4_ACE_SYSTEM_ALARM_ACE_TYPE 3
72#define ACL4_SUPPORT_ALLOW_ACL 0x01
73#define ACL4_SUPPORT_DENY_ACL 0x02
Christopher Ferris6a9755d2017-01-13 14:09:31 -080074#define ACL4_SUPPORT_AUDIT_ACL 0x04
Ben Cheng655a7c02013-10-16 16:09:24 -070075#define ACL4_SUPPORT_ALARM_ACL 0x08
Christopher Ferris05d08e92016-02-04 13:16:38 -080076#define NFS4_ACL_AUTO_INHERIT 0x00000001
77#define NFS4_ACL_PROTECTED 0x00000002
Christopher Ferris6a9755d2017-01-13 14:09:31 -080078#define NFS4_ACL_DEFAULTED 0x00000004
Ben Cheng655a7c02013-10-16 16:09:24 -070079#define NFS4_ACE_FILE_INHERIT_ACE 0x00000001
80#define NFS4_ACE_DIRECTORY_INHERIT_ACE 0x00000002
81#define NFS4_ACE_NO_PROPAGATE_INHERIT_ACE 0x00000004
Christopher Ferris6a9755d2017-01-13 14:09:31 -080082#define NFS4_ACE_INHERIT_ONLY_ACE 0x00000008
Ben Cheng655a7c02013-10-16 16:09:24 -070083#define NFS4_ACE_SUCCESSFUL_ACCESS_ACE_FLAG 0x00000010
84#define NFS4_ACE_FAILED_ACCESS_ACE_FLAG 0x00000020
85#define NFS4_ACE_IDENTIFIER_GROUP 0x00000040
Christopher Ferris6a9755d2017-01-13 14:09:31 -080086#define NFS4_ACE_INHERITED_ACE 0x00000080
Ben Cheng655a7c02013-10-16 16:09:24 -070087#define NFS4_ACE_READ_DATA 0x00000001
88#define NFS4_ACE_LIST_DIRECTORY 0x00000001
89#define NFS4_ACE_WRITE_DATA 0x00000002
Christopher Ferris6a9755d2017-01-13 14:09:31 -080090#define NFS4_ACE_ADD_FILE 0x00000002
Ben Cheng655a7c02013-10-16 16:09:24 -070091#define NFS4_ACE_APPEND_DATA 0x00000004
92#define NFS4_ACE_ADD_SUBDIRECTORY 0x00000004
93#define NFS4_ACE_READ_NAMED_ATTRS 0x00000008
Christopher Ferris6a9755d2017-01-13 14:09:31 -080094#define NFS4_ACE_WRITE_NAMED_ATTRS 0x00000010
Ben Cheng655a7c02013-10-16 16:09:24 -070095#define NFS4_ACE_EXECUTE 0x00000020
96#define NFS4_ACE_DELETE_CHILD 0x00000040
97#define NFS4_ACE_READ_ATTRIBUTES 0x00000080
Christopher Ferris6a9755d2017-01-13 14:09:31 -080098#define NFS4_ACE_WRITE_ATTRIBUTES 0x00000100
Christopher Ferris05d08e92016-02-04 13:16:38 -080099#define NFS4_ACE_WRITE_RETENTION 0x00000200
100#define NFS4_ACE_WRITE_RETENTION_HOLD 0x00000400
Ben Cheng655a7c02013-10-16 16:09:24 -0700101#define NFS4_ACE_DELETE 0x00010000
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800102#define NFS4_ACE_READ_ACL 0x00020000
Ben Cheng655a7c02013-10-16 16:09:24 -0700103#define NFS4_ACE_WRITE_ACL 0x00040000
104#define NFS4_ACE_WRITE_OWNER 0x00080000
Ben Cheng655a7c02013-10-16 16:09:24 -0700105#define NFS4_ACE_SYNCHRONIZE 0x00100000
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800106#define NFS4_ACE_GENERIC_READ 0x00120081
Ben Cheng655a7c02013-10-16 16:09:24 -0700107#define NFS4_ACE_GENERIC_WRITE 0x00160106
108#define NFS4_ACE_GENERIC_EXECUTE 0x001200A0
Ben Cheng655a7c02013-10-16 16:09:24 -0700109#define NFS4_ACE_MASK_ALL 0x001F01FF
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800110#define EXCHGID4_FLAG_SUPP_MOVED_REFER 0x00000001
Ben Cheng655a7c02013-10-16 16:09:24 -0700111#define EXCHGID4_FLAG_SUPP_MOVED_MIGR 0x00000002
112#define EXCHGID4_FLAG_BIND_PRINC_STATEID 0x00000100
Ben Cheng655a7c02013-10-16 16:09:24 -0700113#define EXCHGID4_FLAG_USE_NON_PNFS 0x00010000
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800114#define EXCHGID4_FLAG_USE_PNFS_MDS 0x00020000
Ben Cheng655a7c02013-10-16 16:09:24 -0700115#define EXCHGID4_FLAG_USE_PNFS_DS 0x00040000
116#define EXCHGID4_FLAG_MASK_PNFS 0x00070000
Ben Cheng655a7c02013-10-16 16:09:24 -0700117#define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A 0x40000000
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800118#define EXCHGID4_FLAG_CONFIRMED_R 0x80000000
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800119#define EXCHGID4_FLAG_SUPP_FENCE_OPS 0x00000004
Ben Cheng655a7c02013-10-16 16:09:24 -0700120#define EXCHGID4_FLAG_MASK_A 0x40070103
121#define EXCHGID4_FLAG_MASK_R 0x80070103
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800122#define EXCHGID4_2_FLAG_MASK_R 0x80070107
Ben Cheng655a7c02013-10-16 16:09:24 -0700123#define SEQ4_STATUS_CB_PATH_DOWN 0x00000001
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800124#define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING 0x00000002
Ben Cheng655a7c02013-10-16 16:09:24 -0700125#define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED 0x00000004
126#define SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED 0x00000008
Ben Cheng655a7c02013-10-16 16:09:24 -0700127#define SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED 0x00000010
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800128#define SEQ4_STATUS_ADMIN_STATE_REVOKED 0x00000020
Ben Cheng655a7c02013-10-16 16:09:24 -0700129#define SEQ4_STATUS_RECALLABLE_STATE_REVOKED 0x00000040
130#define SEQ4_STATUS_LEASE_MOVED 0x00000080
Ben Cheng655a7c02013-10-16 16:09:24 -0700131#define SEQ4_STATUS_RESTART_RECLAIM_NEEDED 0x00000100
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800132#define SEQ4_STATUS_CB_PATH_DOWN_SESSION 0x00000200
Ben Cheng655a7c02013-10-16 16:09:24 -0700133#define SEQ4_STATUS_BACKCHANNEL_FAULT 0x00000400
134#define NFS4_SECINFO_STYLE4_CURRENT_FH 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700135#define NFS4_SECINFO_STYLE4_PARENT 1
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800136#define NFS4_MAX_UINT64 (~(__u64) 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700137#define NFS4_MAX_OPS 8
138#define NFS4_MAX_BACK_CHANNEL_OPS 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700139#endif