Whamcloud - gitweb
LU-2130 osp: wait until all the requests are processed
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Wed, 14 Nov 2012 19:12:11 +0000 (23:12 +0400)
committerOleg Drokin <green@whamcloud.com>
Sun, 18 Nov 2012 20:33:55 +0000 (15:33 -0500)
commite464b9bbac8e0e900777a4e8a655e156fb901c5a
tree3db42057916cd8dc960a6fd6902c69f937a7446f
parentb529a917a48cb0873f2898348b25a1074d7e9429
LU-2130 osp: wait until all the requests are processed

there is a window between osp_sync_interpret() and
osp_sync_request_commit_cb() where opd_syn_rpc_in_progress
is not zero while opd_syn_rpc_in_flight can be zero.
the assertion in osp_sync_thread() can hit this window or
osp_sync_request_commit_cb() can pin request at the point
where osp_sync_thread() has already stopped the processing
- this would be a deadlock.

with this patch osp_sync_thread() will be waiting until all
the requests are processed, checking the list of committed
requests in a while.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I409feb0bbb681e41bff1d41cb1232ef5ef1cbf37
Reviewed-on: http://review.whamcloud.com/4581
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osp/osp_sync.c