blob: dc6609824965e2082379c3418f36537464a62d59 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Mike Marshallf7ab0932015-07-17 10:38:11 -04002/*
3 * (C) 2001 Clemson University and The University of Chicago
4 *
5 * See COPYING in top-level directory.
6 */
7
Yi Liu8bb8aef2015-11-24 15:12:14 -05008#ifndef _ORANGEFS_DEV_PROTO_H
9#define _ORANGEFS_DEV_PROTO_H
Mike Marshallf7ab0932015-07-17 10:38:11 -040010
11/*
12 * types and constants shared between user space and kernel space for
13 * device interaction using a common protocol
14 */
15
16/*
Yi Liu8bb8aef2015-11-24 15:12:14 -050017 * valid orangefs kernel operation types
Mike Marshallf7ab0932015-07-17 10:38:11 -040018 */
Yi Liu8bb8aef2015-11-24 15:12:14 -050019#define ORANGEFS_VFS_OP_INVALID 0xFF000000
20#define ORANGEFS_VFS_OP_FILE_IO 0xFF000001
21#define ORANGEFS_VFS_OP_LOOKUP 0xFF000002
22#define ORANGEFS_VFS_OP_CREATE 0xFF000003
23#define ORANGEFS_VFS_OP_GETATTR 0xFF000004
24#define ORANGEFS_VFS_OP_REMOVE 0xFF000005
25#define ORANGEFS_VFS_OP_MKDIR 0xFF000006
26#define ORANGEFS_VFS_OP_READDIR 0xFF000007
27#define ORANGEFS_VFS_OP_SETATTR 0xFF000008
28#define ORANGEFS_VFS_OP_SYMLINK 0xFF000009
29#define ORANGEFS_VFS_OP_RENAME 0xFF00000A
30#define ORANGEFS_VFS_OP_STATFS 0xFF00000B
31#define ORANGEFS_VFS_OP_TRUNCATE 0xFF00000C
Martin Brandenburg6eaff8c2016-08-02 14:31:05 -040032#define ORANGEFS_VFS_OP_RA_FLUSH 0xFF00000D
Yi Liu8bb8aef2015-11-24 15:12:14 -050033#define ORANGEFS_VFS_OP_FS_MOUNT 0xFF00000E
34#define ORANGEFS_VFS_OP_FS_UMOUNT 0xFF00000F
35#define ORANGEFS_VFS_OP_GETXATTR 0xFF000010
36#define ORANGEFS_VFS_OP_SETXATTR 0xFF000011
37#define ORANGEFS_VFS_OP_LISTXATTR 0xFF000012
38#define ORANGEFS_VFS_OP_REMOVEXATTR 0xFF000013
39#define ORANGEFS_VFS_OP_PARAM 0xFF000014
40#define ORANGEFS_VFS_OP_PERF_COUNT 0xFF000015
41#define ORANGEFS_VFS_OP_CANCEL 0xFF00EE00
42#define ORANGEFS_VFS_OP_FSYNC 0xFF00EE01
43#define ORANGEFS_VFS_OP_FSKEY 0xFF00EE02
44#define ORANGEFS_VFS_OP_READDIRPLUS 0xFF00EE03
Martin Brandenburg482664d2016-08-12 12:02:31 -040045#define ORANGEFS_VFS_OP_FEATURES 0xFF00EE05 /* 2.9.6 */
46
47/* features is a 64-bit unsigned bitmask */
48#define ORANGEFS_FEATURE_READAHEAD 1
Mike Marshallf7ab0932015-07-17 10:38:11 -040049
50/*
51 * Misc constants. Please retain them as multiples of 8!
52 * Otherwise 32-64 bit interactions will be messed up :)
53 */
Mike Marshalleb68d032017-02-07 12:41:02 -050054#define ORANGEFS_MAX_DEBUG_STRING_LEN 0x00000800
Mike Marshallf7ab0932015-07-17 10:38:11 -040055
Martin Brandenburg382f4582017-04-25 15:37:59 -040056#define ORANGEFS_MAX_DIRENT_COUNT_READDIR 512
Mike Marshallf7ab0932015-07-17 10:38:11 -040057
58#include "upcall.h"
59#include "downcall.h"
60
Mike Marshallf7ab0932015-07-17 10:38:11 -040061#endif