blob: f380f9ed1b286a7eedfb41fa5f7f8f9259abfdf3 [file] [log] [blame]
Mike Marshallf7ab0932015-07-17 10:38:11 -04001/*
2 * (C) 2001 Clemson University and The University of Chicago
3 *
4 * See COPYING in top-level directory.
5 */
6
Yi Liu8bb8aef2015-11-24 15:12:14 -05007#ifndef _ORANGEFS_DEV_PROTO_H
8#define _ORANGEFS_DEV_PROTO_H
Mike Marshallf7ab0932015-07-17 10:38:11 -04009
10/*
11 * types and constants shared between user space and kernel space for
12 * device interaction using a common protocol
13 */
14
15/*
Yi Liu8bb8aef2015-11-24 15:12:14 -050016 * valid orangefs kernel operation types
Mike Marshallf7ab0932015-07-17 10:38:11 -040017 */
Yi Liu8bb8aef2015-11-24 15:12:14 -050018#define ORANGEFS_VFS_OP_INVALID 0xFF000000
19#define ORANGEFS_VFS_OP_FILE_IO 0xFF000001
20#define ORANGEFS_VFS_OP_LOOKUP 0xFF000002
21#define ORANGEFS_VFS_OP_CREATE 0xFF000003
22#define ORANGEFS_VFS_OP_GETATTR 0xFF000004
23#define ORANGEFS_VFS_OP_REMOVE 0xFF000005
24#define ORANGEFS_VFS_OP_MKDIR 0xFF000006
25#define ORANGEFS_VFS_OP_READDIR 0xFF000007
26#define ORANGEFS_VFS_OP_SETATTR 0xFF000008
27#define ORANGEFS_VFS_OP_SYMLINK 0xFF000009
28#define ORANGEFS_VFS_OP_RENAME 0xFF00000A
29#define ORANGEFS_VFS_OP_STATFS 0xFF00000B
30#define ORANGEFS_VFS_OP_TRUNCATE 0xFF00000C
Martin Brandenburg6eaff8c2016-08-02 14:31:05 -040031#define ORANGEFS_VFS_OP_RA_FLUSH 0xFF00000D
Yi Liu8bb8aef2015-11-24 15:12:14 -050032#define ORANGEFS_VFS_OP_FS_MOUNT 0xFF00000E
33#define ORANGEFS_VFS_OP_FS_UMOUNT 0xFF00000F
34#define ORANGEFS_VFS_OP_GETXATTR 0xFF000010
35#define ORANGEFS_VFS_OP_SETXATTR 0xFF000011
36#define ORANGEFS_VFS_OP_LISTXATTR 0xFF000012
37#define ORANGEFS_VFS_OP_REMOVEXATTR 0xFF000013
38#define ORANGEFS_VFS_OP_PARAM 0xFF000014
39#define ORANGEFS_VFS_OP_PERF_COUNT 0xFF000015
40#define ORANGEFS_VFS_OP_CANCEL 0xFF00EE00
41#define ORANGEFS_VFS_OP_FSYNC 0xFF00EE01
42#define ORANGEFS_VFS_OP_FSKEY 0xFF00EE02
43#define ORANGEFS_VFS_OP_READDIRPLUS 0xFF00EE03
Martin Brandenburg482664d2016-08-12 12:02:31 -040044#define ORANGEFS_VFS_OP_FEATURES 0xFF00EE05 /* 2.9.6 */
45
46/* features is a 64-bit unsigned bitmask */
47#define ORANGEFS_FEATURE_READAHEAD 1
Mike Marshallf7ab0932015-07-17 10:38:11 -040048
49/*
50 * Misc constants. Please retain them as multiples of 8!
51 * Otherwise 32-64 bit interactions will be messed up :)
52 */
Mike Marshalleb68d032017-02-07 12:41:02 -050053#define ORANGEFS_MAX_DEBUG_STRING_LEN 0x00000800
Mike Marshallf7ab0932015-07-17 10:38:11 -040054
55/*
Martin Brandenburg7d221482016-01-04 15:05:28 -050056 * The maximum number of directory entries in a single request is 96.
57 * XXX: Why can this not be higher. The client-side code can handle up to 512.
58 * XXX: What happens if we expect more than the client can return?
59 */
60#define ORANGEFS_MAX_DIRENT_COUNT_READDIR 96
Mike Marshallf7ab0932015-07-17 10:38:11 -040061
62#include "upcall.h"
63#include "downcall.h"
64
Mike Marshallf7ab0932015-07-17 10:38:11 -040065#endif