Lines Matching full:server
56 * outstanding server count.
59 struct afs_server *server, bool fast) in afs_schedule_fs_probe() argument
66 atj = server->probed_at; in afs_schedule_fs_probe()
77 static void afs_finished_fs_probe(struct afs_net *net, struct afs_server *server, in afs_finished_fs_probe() argument
84 list_add_tail(&server->probe_link, &net->fs_probe_slow); in afs_finished_fs_probe()
86 server->rtt = UINT_MAX; in afs_finished_fs_probe()
87 clear_bit(AFS_SERVER_FL_RESPONDING, &server->flags); in afs_finished_fs_probe()
88 list_add_tail(&server->probe_link, &net->fs_probe_fast); in afs_finished_fs_probe()
93 afs_schedule_fs_probe(net, server, !responded); in afs_finished_fs_probe()
99 static void afs_done_one_fs_probe(struct afs_net *net, struct afs_server *server, in afs_done_one_fs_probe() argument
105 afs_finished_fs_probe(net, server, estate); in afs_done_one_fs_probe()
107 wake_up_all(&server->probe_wq); in afs_done_one_fs_probe()
115 struct afs_server *server, in afs_fs_probe_not_done() argument
122 spin_lock(&server->probe_lock); in afs_fs_probe_not_done()
130 spin_unlock(&server->probe_lock); in afs_fs_probe_not_done()
131 return afs_done_one_fs_probe(net, server, estate); in afs_fs_probe_not_done()
143 struct afs_server *server = call->server; in afs_fileserver_probe_result() local
148 _enter("%pU,%u", &server->uuid, index); in afs_fileserver_probe_result()
152 spin_lock(&server->probe_lock); in afs_fileserver_probe_result()
196 set_bit(AFS_SERVER_FL_IS_YFS, &server->flags); in afs_fileserver_probe_result()
197 server->service_id = call->service_id; in afs_fileserver_probe_result()
201 clear_bit(AFS_SERVER_FL_IS_YFS, &server->flags); in afs_fileserver_probe_result()
202 server->service_id = call->service_id; in afs_fileserver_probe_result()
206 set_bit(AFS_SERVER_FL_HAS_FS64, &server->flags); in afs_fileserver_probe_result()
208 clear_bit(AFS_SERVER_FL_HAS_FS64, &server->flags); in afs_fileserver_probe_result()
214 server->rtt = rtt_us; in afs_fileserver_probe_result()
221 set_bit(AFS_SERVER_FL_RESPONDING, &server->flags); in afs_fileserver_probe_result()
223 spin_unlock(&server->probe_lock); in afs_fileserver_probe_result()
225 trace_afs_fs_probe(server, false, estate, index, call->error, call->abort_code, rtt_us); in afs_fileserver_probe_result()
227 estate->probe_seq, &server->uuid, index, in afs_fileserver_probe_result()
231 return afs_done_one_fs_probe(call->net, server, estate); in afs_fileserver_probe_result()
238 void afs_fs_probe_fileserver(struct afs_net *net, struct afs_server *server, in afs_fs_probe_fileserver() argument
245 _enter("%pU", &server->uuid); in afs_fs_probe_fileserver()
252 estate->server_id = server->debug_id; in afs_fs_probe_fileserver()
255 write_lock(&server->fs_lock); in afs_fs_probe_fileserver()
257 old = rcu_dereference_protected(server->endpoint_state, in afs_fs_probe_fileserver()
258 lockdep_is_held(&server->fs_lock)); in afs_fs_probe_fileserver()
263 estate->probe_seq = ++server->probe_counter; in afs_fs_probe_fileserver()
266 rcu_assign_pointer(server->endpoint_state, estate); in afs_fs_probe_fileserver()
268 write_unlock(&server->fs_lock); in afs_fs_probe_fileserver()
275 server->probed_at = jiffies; in afs_fs_probe_fileserver()
290 trace_afs_fs_probe(server, true, estate, index, 0, 0, 0); in afs_fs_probe_fileserver()
291 if (!afs_fs_get_capabilities(net, server, estate, index, key)) in afs_fs_probe_fileserver()
292 afs_fs_probe_not_done(net, server, estate, index); in afs_fs_probe_fileserver()
324 add_wait_queue(&slist->servers[i].server->probe_wq, &states[i].probe_waiter); in afs_wait_for_fs_probes()
353 remove_wait_queue(&slist->servers[i].server->probe_wq, &states[i].probe_waiter); in afs_wait_for_fs_probes()
373 * Dispatch a probe to a server.
375 static void afs_dispatch_fs_probe(struct afs_net *net, struct afs_server *server) in afs_dispatch_fs_probe() argument
383 list_del_init(&server->probe_link); in afs_dispatch_fs_probe()
385 afs_get_server(server, afs_server_trace_get_probe); in afs_dispatch_fs_probe()
388 afs_fs_probe_fileserver(net, server, NULL, key); in afs_dispatch_fs_probe()
389 afs_put_server(net, server, afs_server_trace_put_probe); in afs_dispatch_fs_probe()
393 * Probe a server immediately without waiting for its due time to come
396 void afs_probe_fileserver(struct afs_net *net, struct afs_server *server) in afs_probe_fileserver() argument
399 if (!list_empty(&server->probe_link)) in afs_probe_fileserver()
400 return afs_dispatch_fs_probe(net, server); in afs_probe_fileserver()
410 struct afs_server *fast, *slow, *server; in afs_fs_probe_dispatcher() local
430 fast = slow = server = NULL; in afs_fs_probe_dispatcher()
455 server = fast ?: slow; in afs_fs_probe_dispatcher()
456 if (server) in afs_fs_probe_dispatcher()
457 _debug("probe %pU", &server->uuid); in afs_fs_probe_dispatcher()
459 if (server && (first_pass || !need_resched())) { in afs_fs_probe_dispatcher()
460 afs_dispatch_fs_probe(net, server); in afs_fs_probe_dispatcher()
467 if (server) { in afs_fs_probe_dispatcher()
484 int afs_wait_for_one_fs_probe(struct afs_server *server, struct afs_endpoint_state *estate, in afs_wait_for_one_fs_probe() argument
495 prepare_to_wait_event(&server->probe_wq, &wait, in afs_wait_for_one_fs_probe()
506 finish_wait(&server->probe_wq, &wait); in afs_wait_for_one_fs_probe()