[NET_SCHED]: sch_htb/sch_hfsc: fix oops in qlen_notify
[linux-2.6/sactl.git] / fs / afs / types.h
blobb1a2367c7587f821e881d02d78296eeb31035b70
1 /* types.h: AFS types
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
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 /*****************************************************************************/
43 * AFS file identifier
45 struct afs_fid
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) */
52 /*****************************************************************************/
54 * AFS callback notification
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
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 */
72 #define AFSCBMAX 50
74 /*****************************************************************************/
76 * AFS volume information
78 struct afs_volume_info
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];
91 /*****************************************************************************/
93 * AFS file status information
95 struct afs_file_status
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 */
114 /*****************************************************************************/
116 * AFS volume synchronisation information
118 struct afs_volsync
120 time_t creation; /* volume creation time */
123 #endif /* __KERNEL__ */
125 #endif /* _LINUX_AFS_TYPES_H */