linux/include/linux/nfs4.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 *  include/linux/nfs4.h
 *
 *  NFSv4 protocol definitions.
 *
 *  Copyright (c) 2002 The Regents of the University of Michigan.
 *  All rights reserved.
 *
 *  Kendrick Smith <[email protected]>
 *  Andy Adamson   <[email protected]>
 */
#ifndef _LINUX_NFS4_H
#define _LINUX_NFS4_H

#include <linux/list.h>
#include <linux/uidgid.h>
#include <uapi/linux/nfs4.h>
#include <linux/sunrpc/msg_prot.h>

enum nfs4_acl_whotype {};

struct nfs4_ace {};

struct nfs4_acl {};

#define NFS4_MAXLABELLEN

struct nfs4_label {};

nfs4_verifier;

struct nfs4_stateid_struct {};

nfs4_stateid;

enum nfs_opnum4 {};

/*Defining first and last NFS4 operations implemented.
Needs to be updated if more operations are defined in future.*/

#define FIRST_NFS4_OP
#define LAST_NFS40_OP
#define LAST_NFS41_OP
#define LAST_NFS42_OP
#define LAST_NFS4_OP

enum nfsstat4 {};

/* error codes for internal client use */
#define NFS4ERR_RESET_TO_MDS
#define NFS4ERR_RESET_TO_PNFS

static inline bool seqid_mutating_err(u32 err)
{}

/*
 * Note: NF4BAD is not actually part of the protocol; it is just used
 * internally by nfsd.
 */
enum nfs_ftype4 {};

enum open_claim_type4 {};

enum opentype4 {};

enum createmode4 {};

enum limit_by4 {};

enum open_delegation_type4 {};

enum why_no_delegation4 {};

enum lock_type4 {};

/*
 * Symbol names and values are from RFC 7531 Section 2.
 * "XDR Description of NFSv4.0"
 */
enum {};

/*
 * Symbol names and values are from RFC 5662 Section 2.
 * "XDR Description of NFSv4.1"
 */
enum {};

/*
 * Symbol names and values are from RFC 7863 Section 2.
 * "XDR Description of NFSv4.2"
 */
enum {};

/*
 * Symbol names and values are from RFC 8275 Section 5.
 * "The mode_umask Attribute"
 */
enum {};

/*
 * Symbol names and values are from RFC 8276 Section 8.6.
 * "Numeric Values Assigned to Protocol Extensions"
 */
enum {};

enum {};

/*
 * The following internal definitions enable processing the above
 * attribute bits within 32-bit word boundaries.
 */

/* Mandatory Attributes */
#define FATTR4_WORD0_SUPPORTED_ATTRS
#define FATTR4_WORD0_TYPE
#define FATTR4_WORD0_FH_EXPIRE_TYPE
#define FATTR4_WORD0_CHANGE
#define FATTR4_WORD0_SIZE
#define FATTR4_WORD0_LINK_SUPPORT
#define FATTR4_WORD0_SYMLINK_SUPPORT
#define FATTR4_WORD0_NAMED_ATTR
#define FATTR4_WORD0_FSID
#define FATTR4_WORD0_UNIQUE_HANDLES
#define FATTR4_WORD0_LEASE_TIME
#define FATTR4_WORD0_RDATTR_ERROR
/* Mandatory in NFSv4.1 */
#define FATTR4_WORD2_SUPPATTR_EXCLCREAT

/* Recommended Attributes */
#define FATTR4_WORD0_ACL
#define FATTR4_WORD0_ACLSUPPORT
#define FATTR4_WORD0_ARCHIVE
#define FATTR4_WORD0_CANSETTIME
#define FATTR4_WORD0_CASE_INSENSITIVE
#define FATTR4_WORD0_CASE_PRESERVING
#define FATTR4_WORD0_CHOWN_RESTRICTED
#define FATTR4_WORD0_FILEHANDLE
#define FATTR4_WORD0_FILEID
#define FATTR4_WORD0_FILES_AVAIL
#define FATTR4_WORD0_FILES_FREE
#define FATTR4_WORD0_FILES_TOTAL
#define FATTR4_WORD0_FS_LOCATIONS
#define FATTR4_WORD0_HIDDEN
#define FATTR4_WORD0_HOMOGENEOUS
#define FATTR4_WORD0_MAXFILESIZE
#define FATTR4_WORD0_MAXLINK
#define FATTR4_WORD0_MAXNAME
#define FATTR4_WORD0_MAXREAD
#define FATTR4_WORD0_MAXWRITE

#define FATTR4_WORD1_MIMETYPE
#define FATTR4_WORD1_MODE
#define FATTR4_WORD1_NO_TRUNC
#define FATTR4_WORD1_NUMLINKS
#define FATTR4_WORD1_OWNER
#define FATTR4_WORD1_OWNER_GROUP
#define FATTR4_WORD1_QUOTA_HARD
#define FATTR4_WORD1_QUOTA_SOFT
#define FATTR4_WORD1_QUOTA_USED
#define FATTR4_WORD1_RAWDEV
#define FATTR4_WORD1_SPACE_AVAIL
#define FATTR4_WORD1_SPACE_FREE
#define FATTR4_WORD1_SPACE_TOTAL
#define FATTR4_WORD1_SPACE_USED
#define FATTR4_WORD1_SYSTEM
#define FATTR4_WORD1_TIME_ACCESS
#define FATTR4_WORD1_TIME_ACCESS_SET
#define FATTR4_WORD1_TIME_BACKUP
#define FATTR4_WORD1_TIME_CREATE
#define FATTR4_WORD1_TIME_DELTA
#define FATTR4_WORD1_TIME_METADATA
#define FATTR4_WORD1_TIME_MODIFY
#define FATTR4_WORD1_TIME_MODIFY_SET
#define FATTR4_WORD1_MOUNTED_ON_FILEID
#define FATTR4_WORD1_DACL
#define FATTR4_WORD1_SACL
#define FATTR4_WORD1_FS_LAYOUT_TYPES

#define FATTR4_WORD2_LAYOUT_TYPES
#define FATTR4_WORD2_LAYOUT_BLKSIZE
#define FATTR4_WORD2_MDSTHRESHOLD
#define FATTR4_WORD2_CLONE_BLKSIZE
#define FATTR4_WORD2_CHANGE_ATTR_TYPE
#define FATTR4_WORD2_SECURITY_LABEL
#define FATTR4_WORD2_MODE_UMASK
#define FATTR4_WORD2_XATTR_SUPPORT
#define FATTR4_WORD2_TIME_DELEG_ACCESS
#define FATTR4_WORD2_TIME_DELEG_MODIFY
#define FATTR4_WORD2_OPEN_ARGUMENTS

/* MDS threshold bitmap bits */
#define THRESHOLD_RD
#define THRESHOLD_WR
#define THRESHOLD_RD_IO
#define THRESHOLD_WR_IO

#define NFSPROC4_NULL
#define NFSPROC4_COMPOUND
#define NFS4_VERSION
#define NFS4_MINOR_VERSION

#define NFS4_DEBUG

/*
 * Index of predefined Linux client operations
 *
 * To ensure that /proc/net/rpc/nfs remains correctly ordered, please
 * append only to this enum when adding new client operations.
 */

enum {};

/* nfs41 types */
struct nfs4_sessionid {};

/* Create Session Flags */
#define SESSION4_PERSIST
#define SESSION4_BACK_CHAN
#define SESSION4_RDMA

#define SESSION4_FLAG_MASK_A

enum state_protect_how4 {};

/* GET_DIR_DELEGATION non-fatal status codes */
enum gddrnf4_status {};

enum pnfs_layouttype {};

/* used for both layout return and recall */
enum pnfs_layoutreturn_type {};

enum pnfs_iomode {};

enum pnfs_notify_deviceid_type4 {};

enum pnfs_block_volume_type {};

enum pnfs_block_extent_state {};

/* on the wire size of a block layout extent */
#define PNFS_BLOCK_EXTENT_SIZE

/* on the wire size of a scsi commit range */
#define PNFS_SCSI_RANGE_SIZE

enum scsi_code_set {};

enum scsi_designator_type {};

#define NFL4_UFLG_MASK
#define NFL4_UFLG_DENSE
#define NFL4_UFLG_COMMIT_THRU_MDS
#define NFL4_UFLG_STRIPE_UNIT_SIZE_MASK

/* Encoded in the loh_body field of type layouthint4 */
enum filelayout_hint_care4 {};

#define NFS4_DEVICEID4_SIZE

struct nfs4_deviceid {};

enum data_content4 {};

enum pnfs_update_layout_reason {};

#define NFS4_OP_MAP_NUM_LONGS
#define NFS4_OP_MAP_NUM_WORDS
struct nfs4_op_map {};

struct nfs42_netaddr {};

enum netloc_type4 {};

struct nl4_server {};

enum nfs4_change_attr_type {};

/*
 * Options for setxattr. These match the flags for setxattr(2).
 */
enum nfs4_setxattr_options {};

enum {};

enum nfs_cb_opnum4 {};

#endif