aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/afs.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2007-07-16 02:40:12 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 12:05:43 -0400
commite8d6c554126b830217c5e9f549e0e21f865a0a8a (patch)
treec43219c6ef4e6a9b4f0ac46d6bd8b675dc249a8b /fs/afs/afs.h
parentb0fed3140f57c435d2783b698c5090f325c22bad (diff)
AFS: implement file locking
Implement file locking for AFS. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/afs/afs.h')
-rw-r--r--fs/afs/afs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/afs/afs.h b/fs/afs/afs.h
index 24525794814..c548aa346f0 100644
--- a/fs/afs/afs.h
+++ b/fs/afs/afs.h
@@ -37,6 +37,13 @@ typedef enum {
37 AFS_FTYPE_SYMLINK = 3, 37 AFS_FTYPE_SYMLINK = 3,
38} afs_file_type_t; 38} afs_file_type_t;
39 39
40typedef enum {
41 AFS_LOCK_READ = 0, /* read lock request */
42 AFS_LOCK_WRITE = 1, /* write lock request */
43} afs_lock_type_t;
44
45#define AFS_LOCKWAIT (5 * 60) /* time until a lock times out (seconds) */
46
40/* 47/*
41 * AFS file identifier 48 * AFS file identifier
42 */ 49 */
@@ -120,6 +127,7 @@ struct afs_file_status {
120 struct afs_fid parent; /* parent dir ID for non-dirs only */ 127 struct afs_fid parent; /* parent dir ID for non-dirs only */
121 time_t mtime_client; /* last time client changed data */ 128 time_t mtime_client; /* last time client changed data */
122 time_t mtime_server; /* last time server changed data */ 129 time_t mtime_server; /* last time server changed data */
130 s32 lock_count; /* file lock count (0=UNLK -1=WRLCK +ve=#RDLCK */
123}; 131};
124 132
125/* 133/*