xref: /OK3568_Linux_fs/kernel/fs/afs/afs_fs.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */
2*4882a593Smuzhiyun /* AFS File Service definitions
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
5*4882a593Smuzhiyun  * Written by David Howells (dhowells@redhat.com)
6*4882a593Smuzhiyun  */
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun #ifndef AFS_FS_H
9*4882a593Smuzhiyun #define AFS_FS_H
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun #define AFS_FS_PORT		7000	/* AFS file server port */
12*4882a593Smuzhiyun #define FS_SERVICE		1	/* AFS File Service ID */
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun enum AFS_FS_Operations {
15*4882a593Smuzhiyun 	FSFETCHDATA		= 130,	/* AFS Fetch file data */
16*4882a593Smuzhiyun 	FSFETCHACL		= 131,	/* AFS Fetch file ACL */
17*4882a593Smuzhiyun 	FSFETCHSTATUS		= 132,	/* AFS Fetch file status */
18*4882a593Smuzhiyun 	FSSTOREDATA		= 133,	/* AFS Store file data */
19*4882a593Smuzhiyun 	FSSTOREACL		= 134,	/* AFS Store file ACL */
20*4882a593Smuzhiyun 	FSSTORESTATUS		= 135,	/* AFS Store file status */
21*4882a593Smuzhiyun 	FSREMOVEFILE		= 136,	/* AFS Remove a file */
22*4882a593Smuzhiyun 	FSCREATEFILE		= 137,	/* AFS Create a file */
23*4882a593Smuzhiyun 	FSRENAME		= 138,	/* AFS Rename or move a file or directory */
24*4882a593Smuzhiyun 	FSSYMLINK		= 139,	/* AFS Create a symbolic link */
25*4882a593Smuzhiyun 	FSLINK			= 140,	/* AFS Create a hard link */
26*4882a593Smuzhiyun 	FSMAKEDIR		= 141,	/* AFS Create a directory */
27*4882a593Smuzhiyun 	FSREMOVEDIR		= 142,	/* AFS Remove a directory */
28*4882a593Smuzhiyun 	FSGIVEUPCALLBACKS	= 147,	/* AFS Discard callback promises */
29*4882a593Smuzhiyun 	FSGETVOLUMEINFO		= 148,	/* AFS Get information about a volume */
30*4882a593Smuzhiyun 	FSGETVOLUMESTATUS	= 149,	/* AFS Get volume status information */
31*4882a593Smuzhiyun 	FSGETROOTVOLUME		= 151,	/* AFS Get root volume name */
32*4882a593Smuzhiyun 	FSBULKSTATUS		= 155,	/* AFS Fetch multiple file statuses */
33*4882a593Smuzhiyun 	FSSETLOCK		= 156,	/* AFS Request a file lock */
34*4882a593Smuzhiyun 	FSEXTENDLOCK		= 157,	/* AFS Extend a file lock */
35*4882a593Smuzhiyun 	FSRELEASELOCK		= 158,	/* AFS Release a file lock */
36*4882a593Smuzhiyun 	FSLOOKUP		= 161,	/* AFS lookup file in directory */
37*4882a593Smuzhiyun 	FSINLINEBULKSTATUS	= 65536, /* AFS Fetch multiple file statuses with inline errors */
38*4882a593Smuzhiyun 	FSFETCHDATA64		= 65537, /* AFS Fetch file data */
39*4882a593Smuzhiyun 	FSSTOREDATA64		= 65538, /* AFS Store file data */
40*4882a593Smuzhiyun 	FSGIVEUPALLCALLBACKS	= 65539, /* AFS Give up all outstanding callbacks on a server */
41*4882a593Smuzhiyun 	FSGETCAPABILITIES	= 65540, /* Probe and get the capabilities of a fileserver */
42*4882a593Smuzhiyun };
43*4882a593Smuzhiyun 
44*4882a593Smuzhiyun enum AFS_FS_Errors {
45*4882a593Smuzhiyun 	VRESTARTING	= -100,	/* Server is restarting */
46*4882a593Smuzhiyun 	VSALVAGE	= 101,	/* volume needs salvaging */
47*4882a593Smuzhiyun 	VNOVNODE	= 102,	/* no such file/dir (vnode) */
48*4882a593Smuzhiyun 	VNOVOL		= 103,	/* no such volume or volume unavailable */
49*4882a593Smuzhiyun 	VVOLEXISTS	= 104,	/* volume name already exists */
50*4882a593Smuzhiyun 	VNOSERVICE	= 105,	/* volume not currently in service */
51*4882a593Smuzhiyun 	VOFFLINE	= 106,	/* volume is currently offline (more info available [VVL-spec]) */
52*4882a593Smuzhiyun 	VONLINE		= 107,	/* volume is already online */
53*4882a593Smuzhiyun 	VDISKFULL	= 108,	/* disk partition is full */
54*4882a593Smuzhiyun 	VOVERQUOTA	= 109,	/* volume's maximum quota exceeded */
55*4882a593Smuzhiyun 	VBUSY		= 110,	/* volume is temporarily unavailable */
56*4882a593Smuzhiyun 	VMOVED		= 111,	/* volume moved to new server - ask this FS where */
57*4882a593Smuzhiyun 	VIO		= 112,	/* I/O error in volume */
58*4882a593Smuzhiyun 	VSALVAGING	= 113,	/* Volume is being salvaged */
59*4882a593Smuzhiyun 	VRESTRICTED	= 120,	/* Volume is restricted from using  */
60*4882a593Smuzhiyun };
61*4882a593Smuzhiyun 
62*4882a593Smuzhiyun #endif /* AFS_FS_H */
63