3 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
12 #ifndef _LINUX_AFS_TYPES_H
13 #define _LINUX_AFS_TYPES_H
16 #include <rxrpc/types.h>
17 #endif /* __KERNEL__ */
19 typedef unsigned afs_volid_t
;
20 typedef unsigned afs_vnodeid_t
;
21 typedef unsigned long long afs_dataversion_t
;
23 typedef struct afs_async_op afs_async_op_t
;
24 typedef struct afs_callback afs_callback_t
;
25 typedef struct afs_cell afs_cell_t
;
26 typedef struct afs_fid afs_fid_t
;
27 typedef struct afs_file_status afs_file_status_t
;
28 typedef struct afs_server afs_server_t
;
29 typedef struct afs_timer afs_timer_t
;
30 typedef struct afs_vlocation afs_vlocation_t
;
31 typedef struct afs_vnode afs_vnode_t
;
32 typedef struct afs_volsync afs_volsync_t
;
33 typedef struct afs_volume afs_volume_t
;
34 typedef struct afs_volume_info afs_volume_info_t
;
36 typedef struct afsc_cache afsc_cache_t
;
37 typedef struct afsc_cache_cell afsc_cache_cell_t
;
38 typedef struct afsc_cache_vldb afsc_cache_vldb_t
;
39 typedef struct afsc_cell_record afsc_cell_record_t
;
40 typedef struct afsc_inode afsc_inode_t
;
41 typedef struct afsc_io afsc_io_t
;
42 typedef struct afsc_io_subop afsc_io_subop_t
;
43 typedef struct afsc_io_queue afsc_io_queue_t
;
44 typedef struct afsc_super_block afsc_super_block_t
;
45 typedef struct afsc_vldb_record afsc_vldb_record_t
;
46 typedef struct afsc_vnode_catalogue afsc_vnode_catalogue_t
;
47 typedef struct afsc_vnode_meta afsc_vnode_meta_t
;
49 typedef struct afsvl_dbentry afsvl_dbentry_t
;
52 AFSVL_RWVOL
, /* read/write volume */
53 AFSVL_ROVOL
, /* read-only volume */
54 AFSVL_BACKVOL
, /* backup volume */
57 extern const char *afs_voltypes
[];
60 AFS_FTYPE_INVALID
= 0,
63 AFS_FTYPE_SYMLINK
= 3,
68 /*****************************************************************************/
74 afs_volid_t vid
; /* volume ID */
75 afs_vnodeid_t vnode
; /* file index within volume */
76 unsigned unique
; /* unique ID number (file index version) */
79 /*****************************************************************************/
81 * AFS callback notification
84 AFSCM_CB_UNTYPED
= 0, /* no type set on CB break */
85 AFSCM_CB_EXCLUSIVE
= 1, /* CB exclusive to CM [not implemented] */
86 AFSCM_CB_SHARED
= 2, /* CB shared by other CM's */
87 AFSCM_CB_DROPPED
= 3, /* CB promise cancelled by file server */
88 } afs_callback_type_t
;
92 afs_server_t
*server
; /* server that made the promise */
93 afs_fid_t fid
; /* file identifier */
94 unsigned version
; /* callback version */
95 unsigned expiry
; /* time at which expires */
96 afs_callback_type_t type
; /* type of callback */
101 /*****************************************************************************/
103 * AFS volume information
105 struct afs_volume_info
107 afs_volid_t vid
; /* volume ID */
108 afs_voltype_t type
; /* type of this volume */
109 afs_volid_t type_vids
[5]; /* volume ID's for possible types for this vol */
111 /* list of fileservers serving this volume */
112 size_t nservers
; /* number of entries used in servers[] */
114 struct in_addr addr
; /* fileserver address */
118 /*****************************************************************************/
120 * AFS file status information
122 struct afs_file_status
124 unsigned if_version
; /* interface version */
125 #define AFS_FSTATUS_VERSION 1
127 afs_file_type_t type
; /* file type */
128 unsigned nlink
; /* link count */
129 size_t size
; /* file size */
130 afs_dataversion_t version
; /* current data version */
131 unsigned author
; /* author ID */
132 unsigned owner
; /* owner ID */
133 unsigned caller_access
; /* access rights for authenticated caller */
134 unsigned anon_access
; /* access rights for unauthenticated caller */
135 umode_t mode
; /* UNIX mode */
136 afs_fid_t parent
; /* parent file ID */
137 time_t mtime_client
; /* last time client changed data */
138 time_t mtime_server
; /* last time server changed data */
141 /*****************************************************************************/
143 * AFS volume synchronisation information
147 time_t creation
; /* volume creation time */
150 #endif /* __KERNEL__ */
152 #endif /* _LINUX_AFS_TYPES_H */