Whamcloud - gitweb
LU-1061 agl: cl_locks_prune() waits for the last user
authorFan Yong <yong.fan@whamcloud.com>
Thu, 2 Feb 2012 11:17:41 +0000 (19:17 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 13 Feb 2012 17:29:27 +0000 (12:29 -0500)
commitf0d608786a27dfb8dddf06d6b086b491749557f1
tree8e1d49fb35a005020b2c76155d39420d6c5b56c1
parent4ce426ab33196ff04cc7016a2dc717e53d1b4a75
LU-1061 agl: cl_locks_prune() waits for the last user

The AGL sponsor holds user reference count on the cl_lock before
triggering AGL RPC. The user reference count on the cl_lock will
be released by AGL RPC reply upcall. Such AGL mechanism conflict
with cl_locks_prune(), which requires no lock is in active using
when the last iput() called.

So the cl_locks_prune() should wait for the last user reference
count to be released by the enqueue reply upcall.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I8998c0a247448b1b6c6e99995c9d956b1666279b
Reviewed-on: http://review.whamcloud.com/2079
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/cl_object.h
lustre/include/lustre_dlm.h
lustre/ldlm/ldlm_lock.c
lustre/obdclass/cl_lock.c
lustre/osc/osc_lock.c
lustre/osc/osc_request.c