diff options
Diffstat (limited to 'fs/afs/server.h')
-rw-r--r-- | fs/afs/server.h | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/fs/afs/server.h b/fs/afs/server.h index c3d24115578f..e1a006829b5d 100644 --- a/fs/afs/server.h +++ b/fs/afs/server.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* server.h: AFS server record | 1 | /* AFS server record |
2 | * | 2 | * |
3 | * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved. | 3 | * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved. |
4 | * Written by David Howells (dhowells@redhat.com) | 4 | * Written by David Howells (dhowells@redhat.com) |
@@ -9,8 +9,8 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef _LINUX_AFS_SERVER_H | 12 | #ifndef AFS_SERVER_H |
13 | #define _LINUX_AFS_SERVER_H | 13 | #define AFS_SERVER_H |
14 | 14 | ||
15 | #include "types.h" | 15 | #include "types.h" |
16 | #include "kafstimod.h" | 16 | #include "kafstimod.h" |
@@ -19,12 +19,10 @@ | |||
19 | 19 | ||
20 | extern spinlock_t afs_server_peer_lock; | 20 | extern spinlock_t afs_server_peer_lock; |
21 | 21 | ||
22 | /*****************************************************************************/ | ||
23 | /* | 22 | /* |
24 | * AFS server record | 23 | * AFS server record |
25 | */ | 24 | */ |
26 | struct afs_server | 25 | struct afs_server { |
27 | { | ||
28 | atomic_t usage; | 26 | atomic_t usage; |
29 | struct afs_cell *cell; /* cell in which server resides */ | 27 | struct afs_cell *cell; /* cell in which server resides */ |
30 | struct list_head link; /* link in cell's server list */ | 28 | struct list_head link; /* link in cell's server list */ |
@@ -50,20 +48,19 @@ struct afs_server | |||
50 | spinlock_t cb_lock; /* access lock */ | 48 | spinlock_t cb_lock; /* access lock */ |
51 | }; | 49 | }; |
52 | 50 | ||
53 | extern int afs_server_lookup(struct afs_cell *cell, | 51 | extern int afs_server_lookup(struct afs_cell *, const struct in_addr *, |
54 | const struct in_addr *addr, | 52 | struct afs_server **); |
55 | struct afs_server **_server); | ||
56 | 53 | ||
57 | #define afs_get_server(S) do { atomic_inc(&(S)->usage); } while(0) | 54 | #define afs_get_server(S) do { atomic_inc(&(S)->usage); } while(0) |
58 | 55 | ||
59 | extern void afs_put_server(struct afs_server *server); | 56 | extern void afs_put_server(struct afs_server *); |
60 | extern void afs_server_do_timeout(struct afs_server *server); | 57 | extern void afs_server_do_timeout(struct afs_server *); |
61 | 58 | ||
62 | extern int afs_server_find_by_peer(const struct rxrpc_peer *peer, | 59 | extern int afs_server_find_by_peer(const struct rxrpc_peer *, |
63 | struct afs_server **_server); | 60 | struct afs_server **); |
64 | 61 | ||
65 | extern int afs_server_get_vlconn(struct afs_server *server, | 62 | extern int afs_server_get_vlconn(struct afs_server *, |
66 | struct rxrpc_connection **_conn); | 63 | struct rxrpc_connection **); |
67 | 64 | ||
68 | static inline | 65 | static inline |
69 | struct afs_server *afs_server_get_from_peer(struct rxrpc_peer *peer) | 66 | struct afs_server *afs_server_get_from_peer(struct rxrpc_peer *peer) |
@@ -79,12 +76,10 @@ struct afs_server *afs_server_get_from_peer(struct rxrpc_peer *peer) | |||
79 | return server; | 76 | return server; |
80 | } | 77 | } |
81 | 78 | ||
82 | /*****************************************************************************/ | ||
83 | /* | 79 | /* |
84 | * AFS server callslot grant record | 80 | * AFS server callslot grant record |
85 | */ | 81 | */ |
86 | struct afs_server_callslot | 82 | struct afs_server_callslot { |
87 | { | ||
88 | struct list_head link; /* link in server's list */ | 83 | struct list_head link; /* link in server's list */ |
89 | struct task_struct *task; /* process waiting to make call */ | 84 | struct task_struct *task; /* process waiting to make call */ |
90 | struct rxrpc_connection *conn; /* connection to use (or NULL on error) */ | 85 | struct rxrpc_connection *conn; /* connection to use (or NULL on error) */ |
@@ -93,10 +88,10 @@ struct afs_server_callslot | |||
93 | int errno; /* error number if nconn==-1 */ | 88 | int errno; /* error number if nconn==-1 */ |
94 | }; | 89 | }; |
95 | 90 | ||
96 | extern int afs_server_request_callslot(struct afs_server *server, | 91 | extern int afs_server_request_callslot(struct afs_server *, |
97 | struct afs_server_callslot *callslot); | 92 | struct afs_server_callslot *); |
98 | 93 | ||
99 | extern void afs_server_release_callslot(struct afs_server *server, | 94 | extern void afs_server_release_callslot(struct afs_server *, |
100 | struct afs_server_callslot *callslot); | 95 | struct afs_server_callslot *); |
101 | 96 | ||
102 | #endif /* _LINUX_AFS_SERVER_H */ | 97 | #endif /* AFS_SERVER_H */ |