Whamcloud - gitweb
LU-1820 ptlrpc: fix put export for hp request
authorAlexander.Boyko <alexander_boyko@xyratex.com>
Sat, 30 Mar 2013 07:43:02 +0000 (11:43 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 22 Apr 2013 15:52:10 +0000 (11:52 -0400)
commitf2bf82058450a62e15aaf72fb44b2826d3b81c5d
tree494751e12e9291b5c142147c819c05d55aa966d0
parentd17fd58c07d102ffee8dfb64f300ef26532ffc98
LU-1820 ptlrpc: fix put export for hp request

Fix for ASSERTION(cfs_list_empty(&exp->exp_hp_rpcs)) failed.

The root cause is in target_handle_connect()
if (req->rq_export != NULL)
class_export_put(req->rq_export);

/* request takes one export refcount */
req->rq_export = class_export_get(export);

For previous export it release export reference, but
rq_exp_list still in exp_hp_rpcs queue, after connect
requests became hp requsts. ptltpc_server_handle_req put last
reference for export and export go to zombie list with non
empty exp_hp_rpcs.
This patch add rq_exp_list move to new export at
target_handle_connect(), and cleanup for
id I3d312c28481143b557d7987501c975c7e287885e.

Fixed export reference for request.  Before this patch, request
take one reference by class_conn2export() and take another reference
and increment export rpc counter by class_export_rpc_get(). One
export reference for request is enough.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-881
Change-Id: I6da198fe9b50e85b09f8fe74789e6c6f5bfd534d
Reviewed-on: http://review.whamcloud.com/5922
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_net.h
lustre/include/obd_class.h
lustre/ldlm/ldlm_lib.c
lustre/ptlrpc/service.c