OpenAFS
OpenAFS distributed network file system
|
DECL_PIOCTL is a macro defined to contain the following parameters for functions: More...
Functions | |
DECL_PIOCTL (PGetFID) | |
VIOCGETFID (22) - Get file ID quickly. | |
int | dummy_PSetAcl (char *ain, char *aout) |
VIOCSETAL (1) - Set access control list. | |
DECL_PIOCTL (PStoreBehind) | |
VIOC_STOREBEHIND (47) Adjust store asynchrony. | |
DECL_PIOCTL (PGCPAGs) | |
VIOC_GCPAGS (48) - Disable automatic PAG gc'ing. | |
DECL_PIOCTL (PGetAcl) | |
VIOCGETAL (2) - Get access control list. | |
DECL_PIOCTL (PNoop) | |
PNoop returns success. | |
DECL_PIOCTL (PBogus) | |
PBogus returns fail. | |
DECL_PIOCTL (PGetFileCell) | |
VIOC_FILE_CELL_NAME (30) - Get cell in which file lives. | |
DECL_PIOCTL (PGetWSCell) | |
VIOC_GET_WS_CELL (31) - Get cell in which workstation lives. | |
DECL_PIOCTL (PGetUserCell) | |
VIOC_GET_PRIMARY_CELL (33) - Get primary cell for caller. | |
DECL_PIOCTL (PSetTokens) | |
VIOCSETTOK (3) - Set authentication tokens. | |
DECL_PIOCTL (PGetVolumeStatus) | |
VIOCGETVOLSTAT (4) - Get volume status. | |
DECL_PIOCTL (PSetVolumeStatus) | |
VIOCSETVOLSTAT (5) - Set volume status. | |
DECL_PIOCTL (PFlush) | |
VIOCFLUSH (6) - Invalidate cache entry. | |
DECL_PIOCTL (PNewStatMount) | |
VIOC_AFS_STAT_MT_PT (29) - Stat mount point. | |
DECL_PIOCTL (PGetTokens) | |
VIOCGETTOK (8) - Get authentication tokens. | |
DECL_PIOCTL (PUnlog) | |
VIOCUNLOG (9) - Invalidate tokens. | |
DECL_PIOCTL (PMariner) | |
VIOC_AFS_MARINER_HOST (32) - Get/set mariner (cache manager monitor) host. | |
DECL_PIOCTL (PCheckServers) | |
VIOCCKSERV (10) - Check that servers are up. | |
DECL_PIOCTL (PCheckVolNames) | |
VIOCCKBACK (11) - Check backup volume mappings. | |
DECL_PIOCTL (PCheckAuth) | |
VIOCCKCONN (12) - Check connections for a user. | |
DECL_PIOCTL (PFindVolume) | |
VIOCWHEREIS (14) - Find out where a volume is located. | |
DECL_PIOCTL (PViceAccess) | |
VIOCACCESS (20) - Access using PRS_FS bits. | |
DECL_PIOCTL (PGetPAG) | |
VIOC_GETPAG (13) - Get PAG value. | |
DECL_PIOCTL (PSetCacheSize) | |
VIOCSETCACHESIZE (24) - Set venus cache size in 1000 units. | |
DECL_PIOCTL (PGetCacheSize) | |
VIOCGETCACHEPARMS (40) - Get cache stats. | |
DECL_PIOCTL (PRemoveCallBack) | |
VIOCFLUSHCB (25) - Flush callback only. | |
DECL_PIOCTL (PNewCell) | |
VIOCNEWCELL (26) - Configure new cell. | |
DECL_PIOCTL (PListCells) | |
VIOCGETCELL (27) - Get cell info. | |
DECL_PIOCTL (PRemoveMount) | |
VIOC_AFS_DELETE_MT_PT (28) - Delete mount point. | |
DECL_PIOCTL (PGetCellStatus) | |
VIOC_GETCELLSTATUS (35) - Get cell status info. | |
DECL_PIOCTL (PSetCellStatus) | |
VIOC_SETCELLSTATUS (36) - Set corresponding info. | |
DECL_PIOCTL (PFlushVolumeData) | |
VIOC_FLUSHVOLUME (37) - Flush whole volume's data. | |
DECL_PIOCTL (PGetVnodeXStatus) | |
VIOCGETVCXSTATUS (41) - gets vnode x status. | |
DECL_PIOCTL (PSetSysName) | |
VIOC_AFS_SYSNAME (38) - Change value. | |
DECL_PIOCTL (PExportAfs) | |
VIOC_EXPORTAFS (39) - Export afs to nfs clients. | |
DECL_PIOCTL (PGag) | |
VIOC_GAG (44) - Silence Cache Manager. | |
DECL_PIOCTL (PTwiddleRx) | |
VIOC_TWIDDLE (45) - Adjust RX knobs. | |
DECL_PIOCTL (PGetInitParams) | |
VIOC_GETINITPARAMS (49) - Get initial cache manager parameters. | |
DECL_PIOCTL (PGetRxkcrypt) | |
VIOC_GETRXKCRYPT (55) - Get rxkad encryption flag. | |
DECL_PIOCTL (PSetRxkcrypt) | |
VIOC_SETRXKCRYPT (56) - Set rxkad encryption flag. | |
DECL_PIOCTL (PGetCPrefs) | |
VIOC_GETCPREFS (50) - Get client interface. | |
DECL_PIOCTL (PSetCPrefs) | |
VIOC_SETCPREFS (51) - Set client interface. | |
DECL_PIOCTL (PFlushMount) | |
VIOC_AFS_FLUSHMOUNT (52) - Flush mount symlink data. | |
DECL_PIOCTL (PRxStatProc) | |
VIOC_RXSTAT_PROC (53) - Control process RX statistics. | |
DECL_PIOCTL (PRxStatPeer) | |
VIOC_RXSTAT_PEER (54) - Control peer RX statistics. |
DECL_PIOCTL is a macro defined to contain the following parameters for functions:
[in] | avc | the AFS vcache structure in use by pioctl |
[in] | afun | not in use |
[in] | areq | the AFS vrequest structure |
[in] | ain | an afs_pdata block describing the data received from the caller |
[in] | aout | an afs_pdata block describing a pre-allocated block for output |
[in] | acred | UNIX credentials structure underlying the operation |
DECL_PIOCTL | ( | PGetFID | ) |
VIOCGETFID (22) - Get file ID quickly.
[in] | ain | not in use |
[out] | aout | fid of requested file |
EINVAL | Error if some of the initial arguments aren't set |
DECL_PIOCTL | ( | PRxStatPeer | ) |
VIOC_RXSTAT_PEER (54) - Control peer RX statistics.
[in] | ain | the flags that control which statistics to use |
[out] | aout | not in use |
EACCES | Error if the user doesn't have super-user credentials |
EINVAL | Error if the flag input is too long |
DECL_PIOCTL | ( | PRxStatProc | ) |
VIOC_RXSTAT_PROC (53) - Control process RX statistics.
[in] | ain | the flags that control which stats to use |
[out] | aout | not in use |
EACCES | Error if the user doesn't have super-user credentials |
EINVAL | Error if the flag input is too long |
DECL_PIOCTL | ( | PFlushMount | ) |
VIOC_AFS_FLUSHMOUNT (52) - Flush mount symlink data.
[in] | ain | the last part of a path to a mount point, which tells us what to flush |
[out] | aout | not in use |
EINVAL | Error if some of the initial arguments aren't set |
ENOTDIR | Error if the initial argument for the mount point isn't a directory |
ENOENT | Error if the dcache entry isn't set |
DECL_PIOCTL | ( | PSetCPrefs | ) |
VIOC_SETCPREFS (51) - Set client interface.
[in] | ain | the interfaces you want set |
[out] | aout | not in use |
EIO | Error if the afs daemon hasn't started yet |
EINVAL | Error if the input is too large for the struct |
ENOMEM | Error if there are too many servers |
DECL_PIOCTL | ( | PGetCPrefs | ) |
VIOC_GETCPREFS (50) - Get client interface.
[in] | ain | sprefrequest input |
[out] | aout | spref information |
EIO | Error if the afs daemon hasn't started yet |
EINVAL | Error if some of the standard args aren't set |
DECL_PIOCTL | ( | PSetRxkcrypt | ) |
VIOC_SETRXKCRYPT (56) - Set rxkad encryption flag.
[in] | ain | the argument whether or not things should be encrypted |
[out] | aout | not in use |
EPERM | Error if the user doesn't have super-user credentials |
EINVAL | Error if the input is too big, or if the input is outside the bounds of what it can be set to |
may need to be modified at a later date to take into account other values for cryptall (beyond true or false)
DECL_PIOCTL | ( | PGetRxkcrypt | ) |
VIOC_GETRXKCRYPT (55) - Get rxkad encryption flag.
[in] | ain | not in use |
[out] | aout | value of cryptall |
DECL_PIOCTL | ( | PGetInitParams | ) |
VIOC_GETINITPARAMS (49) - Get initial cache manager parameters.
[in] | ain | not in use |
[out] | aout | initial cache manager params |
E2BIG | Error if the initial parameters are bigger than some PIGGYSIZE |
DECL_PIOCTL | ( | PTwiddleRx | ) |
VIOC_TWIDDLE (45) - Adjust RX knobs.
[in] | ain | the previous settings of the 'knobs' |
[out] | aout | not in use |
EACCES | Error if the user doesn't have super-user credentials |
DECL_PIOCTL | ( | PGag | ) |
VIOC_GAG (44) - Silence Cache Manager.
[in] | ain | the flags to either gag or de-gag the cache manager |
[out] | aout | not in use |
EACCES | Error if the user doesn't have super-user credentials |
DECL_PIOCTL | ( | PExportAfs | ) |
VIOC_EXPORTAFS (39) - Export afs to nfs clients.
[in] | ain | an integer containing the desired exportee flags |
[out] | aout | an integer containing the current exporter flags |
ENODEV | Error if the exporter doesn't exist |
EACCES | Error if the user doesn't have super-user credentials |
Legacy code obtained from IBM.
DECL_PIOCTL | ( | PSetSysName | ) |
VIOC_AFS_SYSNAME (38) - Change value.
[in] | ain | new value for |
[out] | aout | count, entry, list (debug values?) |
EINVAL | Error if afsd isn't running, the new sysname is too large, the new sysname causes issues (starts with a . or ..), there is no PAG set in the credentials, or the user of a PAG can't be found |
EACCES | Error if the user doesn't have super-user credentials |
We require root for local sysname changes, but not for remote (since we don't really believe remote uids anyway) outname[] shouldn't really be needed- this is left as an exercise for the reader.
DECL_PIOCTL | ( | PGetVnodeXStatus | ) |
VIOCGETVCXSTATUS (41) - gets vnode x status.
[in] | ain | not in use (avc used) |
[out] | aout | vcxstat: the file id, the data version, any lock, the parent vnode, the parent unique id, the trunc position, the callback, cbExpires, what access is being made, what files are open, any users executing/writing, the flock count, the states, the move stat |
EINVAL | Error if some of the initial default arguments aren't set |
EACCES | Error if access to check the mode bits is denied |
DECL_PIOCTL | ( | PFlushVolumeData | ) |
VIOC_FLUSHVOLUME (37) - Flush whole volume's data.
[in] | ain | not in use (args in avc) |
[out] | aout | not in use |
EINVAL | Error if some of the standard args aren't set |
EIO | Error if the afs daemon hasn't started yet |
Does not flush a file that a user has open and is using, because it will be re-created on next write. Also purges the dnlc, because things are screwed up.
DECL_PIOCTL | ( | PGCPAGs | ) |
VIOC_GCPAGS (48) - Disable automatic PAG gc'ing.
[in] | ain | not in use |
[out] | aout | not in use |
EACCES | Error if the user doesn't have super-user credentials |
DECL_PIOCTL | ( | PGetCellStatus | ) |
VIOC_GETCELLSTATUS (35) - Get cell status info.
[in] | ain | The cell you want status information on |
[out] | aout | cell state (as a struct) |
EIO | Error if the afs daemon hasn't started yet |
ENOENT | Error if the cell doesn't exist |
DECL_PIOCTL | ( | PRemoveMount | ) |
VIOC_AFS_DELETE_MT_PT (28) - Delete mount point.
[in] | ain | the name of the file in this dir to remove |
[out] | aout | not in use |
EINVAL | Error if some of the standard args aren't set |
ENOTDIR | Error if the argument to remove is not a directory |
ENOENT | Error if there is no cache to remove the mount point from or if a vcache doesn't exist |
DECL_PIOCTL | ( | PListCells | ) |
VIOCGETCELL (27) - Get cell info.
[in] | ain | The cell index of a specific cell |
[out] | aout | list of servers in the cell |
EIO | Error if the afs daemon hasn't started yet |
EDOM | Error if there is no cell asked about |
DECL_PIOCTL | ( | PNewCell | ) |
VIOCNEWCELL (26) - Configure new cell.
[in] | ain | the name of the cell, the hosts that will be a part of the cell, whether or not it's linked with another cell, the other cell it's linked with, the file server port, and the volume server port |
[out] | aout | not in use |
EIO | Error if the afs daemon hasn't started yet |
EACCES | Error if the user doesn't have super-user cedentials |
EINVAL | Error if some 'magic' var doesn't have a certain bit set |
DECL_PIOCTL | ( | PRemoveCallBack | ) |
VIOCFLUSHCB (25) - Flush callback only.
[in] | ain | not in use |
[out] | aout | not in use |
EINVAL | Error if some of the standard args aren't set |
0 | 0 returned if the volume is set to read-only |
DECL_PIOCTL | ( | PGetCacheSize | ) |
VIOCGETCACHEPARMS (40) - Get cache stats.
[in] | ain | afs index flags |
[out] | aout | cache blocks, blocks used, blocks files (in an array) |
DECL_PIOCTL | ( | PSetCacheSize | ) |
VIOCSETCACHESIZE (24) - Set venus cache size in 1000 units.
[in] | ain | the size the venus cache should be set to |
[out] | aout | not in use |
EACCES | Error if the user doesn't have super-user credentials |
EROFS | Error if the cache is set to be in memory |
recompute the general cache parameters for every single block allocated
DECL_PIOCTL | ( | PGetPAG | ) |
VIOC_GETPAG (13) - Get PAG value.
[in] | ain | not in use |
[out] | aout | PAG value or NOPAG |
DECL_PIOCTL | ( | PViceAccess | ) |
VIOCACCESS (20) - Access using PRS_FS bits.
[in] | ain | PRS_FS bits |
[out] | aout | not in use |
EINVAL | Error if some of the initial arguments aren't set |
EACCES | Error if access is denied |
DECL_PIOCTL | ( | PFindVolume | ) |
VIOCWHEREIS (14) - Find out where a volume is located.
[in] | ain | not in use |
[out] | aout | volume location |
EINVAL | Error if some of the default arguments don't exist |
ENODEV | Error if there is no such volume |
check each of the servers specified
DECL_PIOCTL | ( | PCheckAuth | ) |
VIOCCKCONN (12) - Check connections for a user.
[in] | ain | not in use |
[out] | aout | not in use |
EACCESS | Error if no user is specififed, the user has no tokens set, or if the user's tokens are bad |
Check the connections to all the servers specified
DECL_PIOCTL | ( | PCheckVolNames | ) |
VIOCCKBACK (11) - Check backup volume mappings.
[in] | ain | not in use |
[out] | aout | not in use |
EIO | Error if the afs daemon hasn't started yet |
DECL_PIOCTL | ( | PCheckServers | ) |
VIOCCKSERV (10) - Check that servers are up.
[in] | ain | name of the cell |
[out] | aout | current down server list |
EIO | Error if the afs daemon hasn't started yet |
EACCES | Error if the user doesn't have super-user credentials |
ENOENT | Error if we are unable to obtain the cell |
DECL_PIOCTL | ( | PMariner | ) |
VIOC_AFS_MARINER_HOST (32) - Get/set mariner (cache manager monitor) host.
[in] | ain | host address to be set |
[out] | aout | old host address |
Errors turn off mariner
DECL_PIOCTL | ( | PUnlog | ) |
VIOCUNLOG (9) - Invalidate tokens.
[in] | ain | not in use |
[out] | aout | not in use |
EIO | Error if the afs daemon hasn't been started yet |
sets the token's time to 0, which then causes it to be removed Unlog is the same as un-pag in OpenAFS
DECL_PIOCTL | ( | PGetFileCell | ) |
VIOC_FILE_CELL_NAME (30) - Get cell in which file lives.
[in] | ain | not in use (avc used to pass in file id) |
[out] | aout | cell name |
EINVAL | Error if some of the standard args aren't set |
ESRCH | Error if the file isn't part of a cell |
DECL_PIOCTL | ( | PNewStatMount | ) |
VIOC_AFS_STAT_MT_PT (29) - Stat mount point.
[in] | ain | the last component in a path, related to mountpoint that we're looking for information about |
[out] | aout | volume, cell, link data |
EINVAL | Error if some of the standard args aren't set |
ENOTDIR | Error if the 'mount point' argument isn't a directory |
EIO | Error if the link data can't be accessed |
DECL_PIOCTL | ( | PFlush | ) |
VIOCFLUSH (6) - Invalidate cache entry.
[in] | ain | not in use |
[out] | aout | not in use |
EINVAL | Error if some of the standard args aren't set |
DECL_PIOCTL | ( | PSetVolumeStatus | ) |
VIOCSETVOLSTAT (5) - Set volume status.
[in] | ain | values to set the status at, offline message, message of the day, volume name, minimum quota, maximum quota |
[out] | aout | status of a volume, offlines messages, minimum quota, maximumm quota |
EINVAL | Error if some of the standard args aren't set |
EROFS | Error if the volume is read only, or a backup volume |
ENODEV | Error if the volume can't be accessed |
E2BIG | Error if the volume name, offline message, and motd are too big |
DECL_PIOCTL | ( | PGetVolumeStatus | ) |
VIOCGETVOLSTAT (4) - Get volume status.
[in] | ain | not in use |
[out] | aout | status of the volume |
EINVAL | Error if some of the standard args aren't set |
DECL_PIOCTL | ( | PSetTokens | ) |
VIOCSETTOK (3) - Set authentication tokens.
[in] | ain | the krb tickets from which to set the afs tokens |
[out] | aout | not in use |
EINVAL | Error if the ticket is either too long or too short |
EIO | Error if the AFS initState is below 101 |
ESRCH | Error if the cell for which the Token is being set can't be found |
DECL_PIOCTL | ( | PGetUserCell | ) |
VIOC_GET_PRIMARY_CELL (33) - Get primary cell for caller.
[in] | ain | not in use (user id found via areq) |
[out] | aout | cell name |
ESRCH | Error if the user id doesn't have a primary cell specified |
DECL_PIOCTL | ( | PGetWSCell | ) |
VIOC_GET_WS_CELL (31) - Get cell in which workstation lives.
[in] | ain | not in use |
[out] | aout | cell name |
EIO | Error if the afs daemon hasn't started yet |
ESRCH | Error if the machine isn't part of a cell, for whatever reason |
DECL_PIOCTL | ( | PGetTokens | ) |
VIOCGETTOK (8) - Get authentication tokens.
[in] | ain | cellid to return tokens for |
[out] | aout | token |
EIO | Error if the afs daemon hasn't started yet |
EDOM | Error if the input parameter is out of the bounds of the available tokens |
ENOTCONN | Error if there aren't tokens for this cell |
"it's a weird interface (from comments in the code)"
DECL_PIOCTL | ( | PBogus | ) |
PBogus returns fail.
Used for functions which are not implemented or are no longer in use.
EINVAL | Always returns this value |
Functions involved in this: 0 (?); 4 (?); 6 (?); 7 (VIOCSTAT); 8 (?); 13 (VIOCGETTIME) -- used to be quick check time; 15 (VIOCPREFETCH) -- prefetch is now special-cased; see pioctl code!; 16 (VIOCNOP) -- used to be testing code; 19 (VIOCLISTGROUPS) -- used to be list group; 23 (VIOCWAITFOREVER) -- used to be waitforever; 57 (VIOC_FPRIOSTATUS) -- arla: set file prio; 58 (VIOC_FHGET) -- arla: fallback getfh; 59 (VIOC_FHOPEN) -- arla: fallback fhopen; 60 (VIOC_XFSDEBUG) -- arla: controls xfsdebug; 61 (VIOC_ARLADEBUG) -- arla: controls arla debug; 62 (VIOC_AVIATOR) -- arla: debug interface; 63 (VIOC_XFSDEBUG_PRINT) -- arla: print xfs status; 64 (VIOC_CALCULATE_CACHE) -- arla: force cache check; 65 (VIOC_BREAKCELLBACK) -- arla: break callback; 68 (?) -- arla: fetch stats;
DECL_PIOCTL | ( | PNoop | ) |
PNoop returns success.
Used for functions which are not implemented or are no longer in use.
Always | returns success |
Functions involved in this: 17 (VIOCENGROUP) -- used to be enable group; 18 (VIOCDISGROUP) -- used to be disable group; 2 (?) -- get/set cache-bypass size threshold
DECL_PIOCTL | ( | PGetAcl | ) |
VIOCGETAL (2) - Get access control list.
[in] | ain | not in use |
[out] | aout | the ACL |
EINVAL | Error if some of the standard args aren't set |
ERANGE | Error if the vnode of the file id is too large |
-1 | Error if getting the ACL failed |
There is a hack to tell which type of ACL is being returned, checks the top 2-bytes of the input size to judge what type of ACL it is, only for dfs xlator ACLs
DECL_PIOCTL | ( | PSetCellStatus | ) |
VIOC_SETCELLSTATUS (36) - Set corresponding info.
[in] | ain | The cell you want to set information about, and the values you want to set |
[out] | aout | not in use |
EIO | Error if the afs daemon hasn't started yet |
EACCES | Error if the user doesn't have super-user credentials |
DECL_PIOCTL | ( | PStoreBehind | ) |
VIOC_STOREBEHIND (47) Adjust store asynchrony.
[in] | ain | sbstruct (store behind structure) input |
[out] | aout | resulting sbstruct |
EPERM | Error if the user doesn't have super-user credentials |
EACCES | Error if there isn't enough access to not check the mode bits |
int dummy_PSetAcl | ( | char * | ain, |
char * | aout | ||
) |
VIOCSETAL (1) - Set access control list.
[in] | ain | the ACL being set |
[out] | aout | the ACL being set returned |
EINVAL | Error if some of the standard args aren't set |