Pull one more egcs 1.1.2 workaround.
[linux-2.6/linux-mips.git] / fs / afs / vnode.h
blobafee9628f1f02779a03ce5090ec9391c1d8708c8
1 /* vnode.h: AFS vnode record
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_VNODE_H
13 #define _LINUX_AFS_VNODE_H
15 #include <linux/fs.h>
16 #include <linux/version.h>
17 #include "server.h"
18 #include "kafstimod.h"
20 #ifdef __KERNEL__
22 struct afs_rxfs_fetch_descriptor;
24 /*****************************************************************************/
26 * AFS inode private data
28 struct afs_vnode
30 struct inode vfs_inode; /* the VFS's inode record */
32 afs_volume_t *volume; /* volume on which vnode resides */
33 afs_fid_t fid; /* the file identifier for this inode */
34 afs_file_status_t status; /* AFS status info for this file */
35 unsigned nix; /* vnode index in cache */
37 wait_queue_head_t update_waitq; /* status fetch waitqueue */
38 unsigned update_cnt; /* number of outstanding ops that will update the
39 * status */
40 spinlock_t lock; /* waitqueue/flags lock */
41 unsigned flags;
42 #define AFS_VNODE_CHANGED 0x00000001 /* set if vnode reported changed by callback */
43 #define AFS_VNODE_DELETED 0x00000002 /* set if vnode deleted on server */
44 #define AFS_VNODE_MOUNTPOINT 0x00000004 /* set if vnode is a mountpoint symlink */
46 /* outstanding callback notification on this file */
47 afs_server_t *cb_server; /* server that made the current promise */
48 struct list_head cb_link; /* link in server's promises list */
49 struct list_head cb_hash_link; /* link in master callback hash */
50 afs_timer_t cb_timeout; /* timeout on promise */
51 unsigned cb_version; /* callback version */
52 unsigned cb_expiry; /* callback expiry time */
53 afs_callback_type_t cb_type; /* type of callback */
56 static inline afs_vnode_t *AFS_FS_I(struct inode *inode)
58 return container_of(inode,afs_vnode_t,vfs_inode);
61 static inline struct inode *AFS_VNODE_TO_I(afs_vnode_t *vnode)
63 return &vnode->vfs_inode;
66 extern int afs_vnode_fetch_status(afs_vnode_t *vnode);
68 extern int afs_vnode_fetch_data(afs_vnode_t *vnode, struct afs_rxfs_fetch_descriptor *desc);
70 extern int afs_vnode_give_up_callback(afs_vnode_t *vnode);
72 extern struct afs_timer_ops afs_vnode_cb_timed_out_ops;
74 #endif /* __KERNEL__ */
76 #endif /* _LINUX_AFS_VNODE_H */