Whamcloud - gitweb
b=17310
authoryury <yury>
Sat, 8 Nov 2008 10:32:30 +0000 (10:32 +0000)
committeryury <yury>
Sat, 8 Nov 2008 10:32:30 +0000 (10:32 +0000)
commit7eab5d6bff241dcf8dd02129cdf9c145789363e7
treeff491a848e293ff4db134dcb8ae812f181bf6715
parent45671edb2ded1e1a181fe0e6ef78eed0c42c816f
b=17310
r=shadow,johann

- make sure that no new inflight rpcs may come after ptlrpcd_deactivate_import() for both
synchronous and asynchronous sending. To do so we make sure that imp_inflight++ is done only when
permission is granted by ptlrpc_import_delay_req() which makes decision should req be sent,
deferred or killed as import is not in the state to send it in observable future. For async
sending, rpc is only counted inflight when its added to sending or delaying list instead of just
adding it to set for processing.

This fixes assert in ptlrpc_invalidate_import() and as number of other issues;

- synchronize imp_inflight and the presence on sending or delaying list for ptlrpc_queue_wait()
case. So that, now it is guaranteed that if imp_inflight != 0 we may always find hanging rpc either
in sending or in delaying list;

- make sure that in ptlrcp_queue_wait() we remove rpc from sending or delaying list and dec
inflight only after ptlrpc_unregister_reply() is done. This way we make sure that accounting is
correct. Rpc can't be returned to the pool or counted finished until lnet lets us go with finished
reply unlink;

- check for inflight and rq_list in pinger;

- comments, cleanups;
lustre/ptlrpc/client.c
lustre/ptlrpc/import.c
lustre/ptlrpc/pinger.c