[AF_RXRPC]: Make the in-kernel AFS filesystem use AF_RXRPC.
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / fs / afs / afs.h
blobb9d2d2ceaf437f62944ec6f0067949f6b1e8d37a
1 /* AFS common types
3 * Copyright (C) 2002, 2007 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 AFS_H
13 #define AFS_H
15 #include <linux/in.h>
17 typedef unsigned afs_volid_t;
18 typedef unsigned afs_vnodeid_t;
19 typedef unsigned long long afs_dataversion_t;
21 typedef enum {
22 AFSVL_RWVOL, /* read/write volume */
23 AFSVL_ROVOL, /* read-only volume */
24 AFSVL_BACKVOL, /* backup volume */
25 } __attribute__((packed)) afs_voltype_t;
27 typedef enum {
28 AFS_FTYPE_INVALID = 0,
29 AFS_FTYPE_FILE = 1,
30 AFS_FTYPE_DIR = 2,
31 AFS_FTYPE_SYMLINK = 3,
32 } afs_file_type_t;
35 * AFS file identifier
37 struct afs_fid {
38 afs_volid_t vid; /* volume ID */
39 afs_vnodeid_t vnode; /* file index within volume */
40 unsigned unique; /* unique ID number (file index version) */
44 * AFS callback notification
46 typedef enum {
47 AFSCM_CB_UNTYPED = 0, /* no type set on CB break */
48 AFSCM_CB_EXCLUSIVE = 1, /* CB exclusive to CM [not implemented] */
49 AFSCM_CB_SHARED = 2, /* CB shared by other CM's */
50 AFSCM_CB_DROPPED = 3, /* CB promise cancelled by file server */
51 } afs_callback_type_t;
53 struct afs_callback {
54 struct afs_fid fid; /* file identifier */
55 unsigned version; /* callback version */
56 unsigned expiry; /* time at which expires */
57 afs_callback_type_t type; /* type of callback */
60 #define AFSCBMAX 50 /* maximum callbacks transferred per bulk op */
63 * AFS volume information
65 struct afs_volume_info {
66 afs_volid_t vid; /* volume ID */
67 afs_voltype_t type; /* type of this volume */
68 afs_volid_t type_vids[5]; /* volume ID's for possible types for this vol */
70 /* list of fileservers serving this volume */
71 size_t nservers; /* number of entries used in servers[] */
72 struct {
73 struct in_addr addr; /* fileserver address */
74 } servers[8];
78 * AFS file status information
80 struct afs_file_status {
81 unsigned if_version; /* interface version */
82 #define AFS_FSTATUS_VERSION 1
84 afs_file_type_t type; /* file type */
85 unsigned nlink; /* link count */
86 size_t size; /* file size */
87 afs_dataversion_t data_version; /* current data version */
88 unsigned author; /* author ID */
89 unsigned owner; /* owner ID */
90 unsigned caller_access; /* access rights for authenticated caller */
91 unsigned anon_access; /* access rights for unauthenticated caller */
92 umode_t mode; /* UNIX mode */
93 struct afs_fid parent; /* parent file ID */
94 time_t mtime_client; /* last time client changed data */
95 time_t mtime_server; /* last time server changed data */
99 * AFS volume synchronisation information
101 struct afs_volsync {
102 time_t creation; /* volume creation time */
105 #endif /* AFS_H */