Whamcloud - gitweb
LU-962 ptlrpc: feature to run callback in ptlrpcd context
authorJinshan Xiong <jinshan.xiong@whamcloud.com>
Wed, 4 Jan 2012 07:56:22 +0000 (23:56 -0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 10 Jan 2012 16:41:09 +0000 (11:41 -0500)
commit2064c2a7e616b172f72462884b23d899bfc040ff
tree05dd4d09ca4759a54c67cafb779820948b4be61d
parent2c90cdfc2de97cbe93d34c93e646a3dd9b230a75
LU-962 ptlrpc: feature to run callback in ptlrpcd context

In this patch, a feature is added to run a callback in ptlrpc
context. We need a ptlrpc work for this purpose. There are three
functions exported:
  1. ptlrpc_alloc_work() to allocate work;
  2. ptlrpc_run_work() to run an allocated work, this function can
     be executed many times;
  3. ptlrpc_destroy_work() to destroy the work;

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I2bce5a17003855468eab9075fb50ed02d7bcc208
Reviewed-on: http://review.whamcloud.com/1917
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_net.h
lustre/ptlrpc/client.c
lustre/ptlrpc/ptlrpcd.c