Coda Distributed File System
venusioctl.h
Go to the documentation of this file.
1/* BLURB lgpl
2
3 Coda File System
4 Release 6
5
6 Copyright (c) 1987-2003 Carnegie Mellon University
7 Additional copyrights listed below
8
9This code is distributed "AS IS" without warranty of any kind under
10the terms of the GNU Library General Public Licence Version 2, as
11shown in the file LICENSE. The technical and financial contributors to
12Coda are listed in the file CREDITS.
13
14 Additional copyrights
15
16#*/
17
18/*
19 IBM COPYRIGHT NOTICE
20
21 Copyright (C) 1986
22 International Business Machines Corporation
23 All Rights Reserved
24
25This file contains some code identical to or derived from the 1986
26version of the Andrew File System ("AFS"), which is owned by the IBM
27Corporation. This code is provided "AS IS" and IBM does not warrant
28that it is free of infringement of any intellectual rights of any
29third party. IBM disclaims liability of any kind for any damages
30whatsoever resulting directly or indirectly from use of this software
31or of any derivative work. Carnegie Mellon University has obtained
32permission to modify, distribute and sublicense this code, which is
33based on Version 2 of AFS and does not contain the features and
34enhancements that are part of Version 3 of AFS. Version 3 of AFS is
35commercially available and supported by Transarc Corporation,
36Pittsburgh, PA.
37
38*/
39
40/*
41 *
42 * Definitions of Venus-specific ioctls
43 *
44 */
45
46#ifndef _VENUS_IOCTL_H_
47#define _VENUS_IOCTL_H_ 1
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52
53#include <pioctl.h> /* new identity of sys/viceioctl.h */
54
55#ifdef __cplusplus
56}
57#endif
58
59#define CFS_PIOBUFSIZE \
60 2048 /* max size of in,out data in pioctls (Satya, 1/03) */
61
62/* Definitions of Venus-specific ioctls */
63
64/* IOCTLS to Venus. Apply these to open file decriptors. */
65/* these seem to collide with the pioctl ones. */
66#define _VIOCCLOSEWAIT (1) /* Force close to wait for store */
67#define _VIOCABORT (2) /* Abort close on this fd */
68#define _VIOCIGETCELL (3) /* ioctl to get cell name */
69
70/* PIOCTLS to Venus. Apply these to path names with pioctl. */
71/* These need to be wrapped in _VICEIOCTL() to make a usable value */
72#define _VIOCSETAL (1) /* Set access control list */
73#define _VIOCGETAL (2) /* Get access control list */
74#define _VIOCSETTOK (3) /* Set authentication tokens */
75#define _VIOCGETVOLSTAT (4) /* Get volume status */
76#define _VIOCSETVOLSTAT (5) /* Set volume status */
77#define _VIOCFLUSH (6) /* Invalidate cache entry */
78#define _VIOCSTAT (7) /* Get file status */
79#define _VIOCGETTOK (8) /* Get authentication tokens */
80#define _VIOCUNLOG (9) /* Invalidate tokens */
81#define _VIOCCKSERV (10) /* Check that servers are up */
82#define _VIOCCKBACK (11) /* Check backup volume mappings */
83#define _VIOCCKCONN (12) /* Check connections for a user */
84#define _VIOCWHEREIS (14) /* Find out where a volume is located */
85#define _VIOCPREFETCH (15) /* Prefetch a file */
86#define _VIOCNOP (16) /* Do nothing (more performance) */
87#define _VIOCENGROUP (17) /* Enable group access for a group */
88#define _VIOCDISGROUP (18) /* Disable group access */
89#define _VIOCLISTGROUPS (19) /* List enabled and disabled groups */
90#define _VIOCACCESS (20) /* Access using PRS_FS bits */
91#define _VIOCUNPAG (21) /* Invalidate pag */
92#define _VIOCGETWD (22) /* Get wdir quickly */
93#define _VIOCWAITFOREVER (23) /* Wait for dead servers forever */
94#define _VIOCSETCACHESIZE (24) /* Set venus cache size in 1k units */
95#define _VIOCFLUSHCB (25) /* Flush callback only */
96#define _VIOCNEWCELL (26) /* Configure new cell */
97#define _VIOCGETCELL (27) /* Get cell info */
98#define _VIOC_AFS_DELETE_MT_PT (28) /* [AFS] Delete mount point */
99#define _VIOC_AFS_STAT_MT_PT (29) /* [AFS] Stat mount point */
100#define _VIOC_FILE_CELL_NAME (30) /* Get cell in which file lives */
101#define _VIOC_GET_WS_CELL (31) /* Get cell in which workstation lives */
102#define _VIOC_AFS_MARINER_HOST (32) /* [AFS] Get/set mariner host */
103#define _VIOC_GET_PRIMARY_CELL (33) /* Get primary cell for caller */
104#define _VIOC_VENUSLOG (34) /* Enable/Disable venus logging */
105#define _VIOC_GETCELLSTATUS (35) /* get cell status info */
106#define _VIOC_SETCELLSTATUS (36) /* set corresponding info */
107#define _VIOC_FLUSHVOLUME (37) /* flush whole volume's data */
108#define _VIOC_LISTCACHE_VOLUME (39) /* list volume's cached status */
109#define _VIOC_LOOKASIDE \
110 (40) /* Add or remove cache lookaside databases (Satya, 1/2003) */
111#define _VIOC_EXPANDOBJECT \
112 (41) /* Turn fso into fake directory to expose underlying replicas */
113#define _VIOC_COLLAPSEOBJECT (42) /* Collapse an expanded fso */
114
115/* These were defined with numbers that wrapped around the 8-bit size of the nr
116 * component in the ioctl */
117#define _VIOC_SYNCCACHE (140) /* reintegrate now ! */
118#define _VIOC_REDIR (141) /* redirect to a staging server */
119#define _VIOC_ADD_MT_PT (142) /* Add mount point */
120
121#define CFS_IOCTL_BASE 192
122
123#define _VIOC_ENABLEREPAIR \
124 (CFS_IOCTL_BASE + 0) /* Enable repair for vol/pag combo */
125#define _VIOC_DISABLEREPAIR \
126 (CFS_IOCTL_BASE + 1) /* Disable repair for vol/pag combo */
127#define _VIOC_REPAIR (CFS_IOCTL_BASE + 2) /* Repair an object */
128
129#define _VIOC_GETSERVERSTATS (CFS_IOCTL_BASE + 3) /* Get host statistics */
130#define _VIOC_GETVENUSSTATS (CFS_IOCTL_BASE + 4) /* Get Venus statistics */
131#define _VIOC_GETFID (CFS_IOCTL_BASE + 5) /* Get ViceFid */
132
133#define _VIOC_FLUSHCACHE (CFS_IOCTL_BASE + 6) /* Flush entire FSO cache */
134
135#define _VIOC_SETVV (CFS_IOCTL_BASE + 7) /* Overwrite a version vector */
136
137#define _VIOC_HDB_ADD (CFS_IOCTL_BASE + 8) /* Add hoard entry. */
138#define _VIOC_HDB_DELETE (CFS_IOCTL_BASE + 9) /* Delete hoard entry. */
139#define _VIOC_HDB_MODIFY (CFS_IOCTL_BASE + 10) /* Modify hoard entry. */
140#define _VIOC_HDB_CLEAR (CFS_IOCTL_BASE + 11) /* Clear hoard database. */
141#define _VIOC_HDB_LIST (CFS_IOCTL_BASE + 12) /* List hoard database. */
142
143#define _VIOC_WAITFOREVER \
144 (CFS_IOCTL_BASE + 13) /* Control waitforever behavior. */
145
146#define _VIOC_HDB_WALK (CFS_IOCTL_BASE + 14) /* Walk hoard database. */
147#define _VIOC_CLEARPRIORITIES \
148 (CFS_IOCTL_BASE + 15) /* Clear short-term priorities. */
149
150#define _VIOC_GETPATH (CFS_IOCTL_BASE + 16) /* Map Fid to vol-relative path. */
151
152/*#define _VIOC_COMPRESS (CFS_IOCTL_BASE + 17) * Compress an object. */
153/*#define _VIOC_UNCOMPRESS (CFS_IOCTL_BASE + 18) * Uncompress an object. */
154
155#define _VIOC_CHECKPOINTML (CFS_IOCTL_BASE + 19) /* Checkpoint a volume's ML. */
156#define _VIOC_PURGEML (CFS_IOCTL_BASE + 20) /* Purge a volume's ML. */
157
158#define _VIOC_BEGINRECORDING \
159 (CFS_IOCTL_BASE + 21) /* Begin recording references. */
160#define _VIOC_ENDRECORDING (CFS_IOCTL_BASE + 22) /* End recording references. */
161#define _VIOC_TRUNCATELOG (CFS_IOCTL_BASE + 23) /* Truncate the log */
162#define _VIOC_DISCONNECT (CFS_IOCTL_BASE + 24) /* Partition from all servers */
163#define _VIOC_RECONNECT (CFS_IOCTL_BASE + 25) /* Heal previous partition */
164/*#define _VIOC_SLOW (CFS_IOCTL_BASE + 26) * Slow the network down */
165#define _VIOC_GETPFID (CFS_IOCTL_BASE + 27) /* Get fid of object's parent */
166#define _VIOC_WD \
167 (CFS_IOCTL_BASE + 28) /* set write-disconnect parameters for a volume */
168/* #define _VIOC_ENDML (CFS_IOCTL_BASE + 29) */
169
170#define _VIOC_HDB_VERIFY \
171 (CFS_IOCTL_BASE + 30) /* Compare hoard database to cache contents */
172/*#define _VIOC_BWHINT (CFS_IOCTL_BASE + 31) * Give a bandwidth hint */
173
174#define _VIOC_HDB_ENABLE (CFS_IOCTL_BASE + 32) /* Enable hoard walks */
175#define _VIOC_HDB_DISABLE (CFS_IOCTL_BASE + 33) /* Disable hoard walks */
176
177#define _VIOC_ENABLEASR (CFS_IOCTL_BASE + 34) /* Enable ASRs for a volume */
178#define _VIOC_DISABLEASR (CFS_IOCTL_BASE + 35) /* Disable ASRs for a volume */
179#define _VIOC_FLUSHASR \
180 (CFS_IOCTL_BASE + 36) /* Flush timestamp of last ASR invocation */
181
182#define _VIOC_REP_BEGIN \
183 (CFS_IOCTL_BASE + 37) /* Begin a local/global repair session */
184#define _VIOC_REP_END \
185 (CFS_IOCTL_BASE + 38) /* End a local/global repair session */
186#define _VIOC_REP_CHECK \
187 (CFS_IOCTL_BASE + 39) /* check the current local mutation */
188#define _VIOC_REP_PRESERVE \
189 (CFS_IOCTL_BASE + 40) /* Preserve current local mutation */
190#define _VIOC_REP_DISCARD \
191 (CFS_IOCTL_BASE + 41) /* Discard current local mutation */
192#define _VIOC_REP_REMOVE \
193 (CFS_IOCTL_BASE + 42) /* remove rest of the local mutations */
194#define _VIOC_SET_LOCAL_VIEW \
195 (CFS_IOCTL_BASE + 43) /* Set local repair session view */
196#define _VIOC_SET_GLOBAL_VIEW \
197 (CFS_IOCTL_BASE + 44) /* Set global repair session view */
198#define _VIOC_SET_MIXED_VIEW \
199 (CFS_IOCTL_BASE + 45) /* Set mixed repair session view */
200#define _VIOC_WD_ALL \
201 (CFS_IOCTL_BASE + 46) /* set write-disconnect parameters on all volumes */
202#define _VIOC_SYNCCACHE_ALL \
203 (CFS_IOCTL_BASE + 47) /* force reintegrate all volumes */
204/*#define _VIOC_STRONG (CFS_IOCTL_BASE + 48) * Force strong connectivity */
205/*#define _VIOC_ADAPTIVE (CFS_IOCTL_BASE + 49) * Allow bandwidth adaptation driven connectivity */
206#define _VIOC_LISTCACHE (CFS_IOCTL_BASE + 50) /* List cache status */
207#define _VIOC_GET_MT_PT \
208 (CFS_IOCTL_BASE + 51) /* Get mount point path from volume id */
209
210/* The following change is made in order to reduce the number of
211 * command codes for the local/global repair interface. We now use
212 * only one pioctl command code for the interface the actual repair
213 * command are passed as an additional parameter, as defined as
214 * follows. This new command VIOC_REP_CMD and its associated
215 * constants are intended to replace the previous 9 commands such as
216 * VIOC_REP_BEGIN etc. that are used for local/global repair. We let
217 * the old command to exist for now in order to reduce the occasions
218 * of inconvenience of the imcompatibility between venus and tools
219 * such as cfs and repair. We will later perform one major pioctl
220 * interface cleanup later, and that will require every user to pick
221 * up the right venus and the right tools. */
222#define _VIOC_REP_CMD \
223 (CFS_IOCTL_BASE + 52) /* new local-global repair command */
224#define REP_CMD_BEGIN 1
225#define REP_CMD_END 2
226#define REP_CMD_CHECK 3
227#define REP_CMD_PRESERVE 4
228#define REP_CMD_PRESERVE_ALL 5
229#define REP_CMD_DISCARD 6
230#define REP_CMD_DISCARD_ALL 7
231#define REP_CMD_LIST 8
232#define REP_CMD_LOCAL_VIEW 9
233#define REP_CMD_GLOBAL_VIEW 10
234#define REP_CMD_MIXED_VIEW 11
235
236#define _VIOC_UNLOADKERNEL \
237 (CFS_IOCTL_BASE + 53) /* Unload kernel module, only Win9x so far */
238
239#define _VIOC_ZLIMIT \
240 (CFS_IOCTL_BASE + 54) /* Set red & yellow zone limits (Satya, 2017-01-02) */
241
242/* we really can't/shouldn't go beyond 255 (CFS_IOCTL_BASE + 63) because the nr
243 * component in an ioctl is only an 8-bit value.
244 * The following ioctls probably ended up either clobbering the ioctl number,
245 * or they wrapped around and collided with some low numbers. */
246#if 0
247#define _VIOC_SYNCCACHE (CFS_IOCTL_BASE + 204) /* reintegrate now ! */
248#define _VIOC_REDIR (CFS_IOCTL_BASE + 205) /* redirect to a staging server */
249#define _VIOC_ADD_MT_PT (CFS_IOCTL_BASE + 206) /* Add mount point */
250#endif
251
252#endif /* _VENUS_IOCTL_H_ */