ia64/linux-2.6.18-xen.hg

view fs/afs/types.h @ 524:7f8b544237bf

netfront: Allow netfront in domain 0.

This is useful if your physical network device is in a utility domain.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Apr 15 15:18:58 2008 +0100 (2008-04-15)
parents 831230e53067
children
line source
1 /* types.h: AFS types
2 *
3 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
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.
10 */
12 #ifndef _LINUX_AFS_TYPES_H
13 #define _LINUX_AFS_TYPES_H
15 #ifdef __KERNEL__
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 enum {
24 AFSVL_RWVOL, /* read/write volume */
25 AFSVL_ROVOL, /* read-only volume */
26 AFSVL_BACKVOL, /* backup volume */
27 } __attribute__((packed)) afs_voltype_t;
29 typedef enum {
30 AFS_FTYPE_INVALID = 0,
31 AFS_FTYPE_FILE = 1,
32 AFS_FTYPE_DIR = 2,
33 AFS_FTYPE_SYMLINK = 3,
34 } afs_file_type_t;
36 #ifdef __KERNEL__
38 struct afs_cell;
39 struct afs_vnode;
41 /*****************************************************************************/
42 /*
43 * AFS file identifier
44 */
45 struct afs_fid
46 {
47 afs_volid_t vid; /* volume ID */
48 afs_vnodeid_t vnode; /* file index within volume */
49 unsigned unique; /* unique ID number (file index version) */
50 };
52 /*****************************************************************************/
53 /*
54 * AFS callback notification
55 */
56 typedef enum {
57 AFSCM_CB_UNTYPED = 0, /* no type set on CB break */
58 AFSCM_CB_EXCLUSIVE = 1, /* CB exclusive to CM [not implemented] */
59 AFSCM_CB_SHARED = 2, /* CB shared by other CM's */
60 AFSCM_CB_DROPPED = 3, /* CB promise cancelled by file server */
61 } afs_callback_type_t;
63 struct afs_callback
64 {
65 struct afs_server *server; /* server that made the promise */
66 struct afs_fid fid; /* file identifier */
67 unsigned version; /* callback version */
68 unsigned expiry; /* time at which expires */
69 afs_callback_type_t type; /* type of callback */
70 };
72 #define AFSCBMAX 50
74 /*****************************************************************************/
75 /*
76 * AFS volume information
77 */
78 struct afs_volume_info
79 {
80 afs_volid_t vid; /* volume ID */
81 afs_voltype_t type; /* type of this volume */
82 afs_volid_t type_vids[5]; /* volume ID's for possible types for this vol */
84 /* list of fileservers serving this volume */
85 size_t nservers; /* number of entries used in servers[] */
86 struct {
87 struct in_addr addr; /* fileserver address */
88 } servers[8];
89 };
91 /*****************************************************************************/
92 /*
93 * AFS file status information
94 */
95 struct afs_file_status
96 {
97 unsigned if_version; /* interface version */
98 #define AFS_FSTATUS_VERSION 1
100 afs_file_type_t type; /* file type */
101 unsigned nlink; /* link count */
102 size_t size; /* file size */
103 afs_dataversion_t version; /* current data version */
104 unsigned author; /* author ID */
105 unsigned owner; /* owner ID */
106 unsigned caller_access; /* access rights for authenticated caller */
107 unsigned anon_access; /* access rights for unauthenticated caller */
108 umode_t mode; /* UNIX mode */
109 struct afs_fid parent; /* parent file ID */
110 time_t mtime_client; /* last time client changed data */
111 time_t mtime_server; /* last time server changed data */
112 };
114 /*****************************************************************************/
115 /*
116 * AFS volume synchronisation information
117 */
118 struct afs_volsync
119 {
120 time_t creation; /* volume creation time */
121 };
123 #endif /* __KERNEL__ */
125 #endif /* _LINUX_AFS_TYPES_H */