18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * (C) 2001 Clemson University and The University of Chicago
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * See COPYING in top-level directory.
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef _ORANGEFS_DEV_PROTO_H
98c2ecf20Sopenharmony_ci#define _ORANGEFS_DEV_PROTO_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci/*
128c2ecf20Sopenharmony_ci * types and constants shared between user space and kernel space for
138c2ecf20Sopenharmony_ci * device interaction using a common protocol
148c2ecf20Sopenharmony_ci */
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci/*
178c2ecf20Sopenharmony_ci * valid orangefs kernel operation types
188c2ecf20Sopenharmony_ci */
198c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_INVALID           0xFF000000
208c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_FILE_IO        0xFF000001
218c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_LOOKUP         0xFF000002
228c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_CREATE         0xFF000003
238c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_GETATTR        0xFF000004
248c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_REMOVE         0xFF000005
258c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_MKDIR          0xFF000006
268c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_READDIR        0xFF000007
278c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_SETATTR        0xFF000008
288c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_SYMLINK        0xFF000009
298c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_RENAME         0xFF00000A
308c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_STATFS         0xFF00000B
318c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_TRUNCATE       0xFF00000C
328c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_RA_FLUSH       0xFF00000D
338c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_FS_MOUNT       0xFF00000E
348c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_FS_UMOUNT      0xFF00000F
358c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_GETXATTR       0xFF000010
368c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_SETXATTR          0xFF000011
378c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_LISTXATTR         0xFF000012
388c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_REMOVEXATTR       0xFF000013
398c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_PARAM          0xFF000014
408c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_PERF_COUNT     0xFF000015
418c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_CANCEL            0xFF00EE00
428c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_FSYNC          0xFF00EE01
438c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_FSKEY             0xFF00EE02
448c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_READDIRPLUS       0xFF00EE03
458c2ecf20Sopenharmony_ci#define ORANGEFS_VFS_OP_FEATURES	0xFF00EE05 /* 2.9.6 */
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci/* features is a 64-bit unsigned bitmask */
488c2ecf20Sopenharmony_ci#define ORANGEFS_FEATURE_READAHEAD 1
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci/*
518c2ecf20Sopenharmony_ci * Misc constants. Please retain them as multiples of 8!
528c2ecf20Sopenharmony_ci * Otherwise 32-64 bit interactions will be messed up :)
538c2ecf20Sopenharmony_ci */
548c2ecf20Sopenharmony_ci#define ORANGEFS_MAX_DEBUG_STRING_LEN	0x00000800
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci#define ORANGEFS_MAX_DIRENT_COUNT_READDIR 512
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci#include "upcall.h"
598c2ecf20Sopenharmony_ci#include "downcall.h"
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci#endif
62