aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/vnode.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /fs/afs/vnode.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'fs/afs/vnode.h')
-rw-r--r--fs/afs/vnode.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/fs/afs/vnode.h b/fs/afs/vnode.h
new file mode 100644
index 000000000000..b86a97102e8b
--- /dev/null
+++ b/fs/afs/vnode.h
@@ -0,0 +1,94 @@
1/* vnode.h: AFS vnode record
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 */
11
12#ifndef _LINUX_AFS_VNODE_H
13#define _LINUX_AFS_VNODE_H
14
15#include <linux/fs.h>
16#include "server.h"
17#include "kafstimod.h"
18#include "cache.h"
19
20#ifdef __KERNEL__
21
22struct afs_rxfs_fetch_descriptor;
23
24/*****************************************************************************/
25/*
26 * vnode catalogue entry
27 */
28struct afs_cache_vnode
29{
30 afs_vnodeid_t vnode_id; /* vnode ID */
31 unsigned vnode_unique; /* vnode ID uniquifier */
32 afs_dataversion_t data_version; /* data version */
33};
34
35#ifdef AFS_CACHING_SUPPORT
36extern struct cachefs_index_def afs_vnode_cache_index_def;
37#endif
38
39/*****************************************************************************/
40/*
41 * AFS inode private data
42 */
43struct afs_vnode
44{
45 struct inode vfs_inode; /* the VFS's inode record */
46
47 struct afs_volume *volume; /* volume on which vnode resides */
48 struct afs_fid fid; /* the file identifier for this inode */
49 struct afs_file_status status; /* AFS status info for this file */
50#ifdef AFS_CACHING_SUPPORT
51 struct cachefs_cookie *cache; /* caching cookie */
52#endif
53
54 wait_queue_head_t update_waitq; /* status fetch waitqueue */
55 unsigned update_cnt; /* number of outstanding ops that will update the
56 * status */
57 spinlock_t lock; /* waitqueue/flags lock */
58 unsigned flags;
59#define AFS_VNODE_CHANGED 0x00000001 /* set if vnode reported changed by callback */
60#define AFS_VNODE_DELETED 0x00000002 /* set if vnode deleted on server */
61#define AFS_VNODE_MOUNTPOINT 0x00000004 /* set if vnode is a mountpoint symlink */
62
63 /* outstanding callback notification on this file */
64 struct afs_server *cb_server; /* server that made the current promise */
65 struct list_head cb_link; /* link in server's promises list */
66 struct list_head cb_hash_link; /* link in master callback hash */
67 struct afs_timer cb_timeout; /* timeout on promise */
68 unsigned cb_version; /* callback version */
69 unsigned cb_expiry; /* callback expiry time */
70 afs_callback_type_t cb_type; /* type of callback */
71};
72
73static inline struct afs_vnode *AFS_FS_I(struct inode *inode)
74{
75 return container_of(inode,struct afs_vnode,vfs_inode);
76}
77
78static inline struct inode *AFS_VNODE_TO_I(struct afs_vnode *vnode)
79{
80 return &vnode->vfs_inode;
81}
82
83extern int afs_vnode_fetch_status(struct afs_vnode *vnode);
84
85extern int afs_vnode_fetch_data(struct afs_vnode *vnode,
86 struct afs_rxfs_fetch_descriptor *desc);
87
88extern int afs_vnode_give_up_callback(struct afs_vnode *vnode);
89
90extern struct afs_timer_ops afs_vnode_cb_timed_out_ops;
91
92#endif /* __KERNEL__ */
93
94#endif /* _LINUX_AFS_VNODE_H */