Whamcloud - gitweb
b=17310
authoryury <yury>
Sat, 8 Nov 2008 10:43:33 +0000 (10:43 +0000)
committeryury <yury>
Sat, 8 Nov 2008 10:43:33 +0000 (10:43 +0000)
commitd9c49e2021ef2da4e65af943a9770fad1fa5e6cf
tree649723f2baf8028b13930ad93022322b9bf1297a
parent6b24eda5520a6ad9073062d5a09ffde937a8edbf
b=17310
r=johann,shadow

- 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/pinger.c