Whamcloud - gitweb
b=17310
authoryury <yury>
Sat, 8 Nov 2008 13:31:43 +0000 (13:31 +0000)
committeryury <yury>
Sat, 8 Nov 2008 13:31:43 +0000 (13:31 +0000)
commit435d827fe553cf0659088297b716dc44f6c69384
tree0641ee542b69ae5edb75667a13b3af8e839cb5b2
parent3a25a5e0f4d00e9dd31eb3257861dc18a12f02ad
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 im_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/pinger.c