Whamcloud - gitweb
LU-948 clio: add a callback to cl_page_gang_lookup()
authorJinshan Xiong <jinshan.xiong@whamcloud.com>
Thu, 12 Jan 2012 00:03:41 +0000 (16:03 -0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 20 Jan 2012 19:22:11 +0000 (14:22 -0500)
commit7076eff5cd415472061a26c897469dd5b8174861
treefad292ffa1c5768b9b099aecbf7055c4c22a718f
parentd510b34d4a90b25d0816787c5f8eb9a85893f172
LU-948 clio: add a callback to cl_page_gang_lookup()

Add a callback to cl_page_gang_lookup() so that it will be easier to
fix this issue and be helpful for new IO engine.

If a read lock is being canceled, we used to grab page lock and then
check if they are covered by another lock, otherwise they will be
discarded. This is unnecessary because we can do this w/o grabbing
page lock.

With the above fix, when a read-ahead page is in IO during recovery,
and one of covering locks is being canceled by early cancel for
recovery, it will detect that this page is being covered by another
one, and then this page will be skipped w/o trying to grab page lock.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I22a3ea0790f5c0e01c12c29208b6d60c38058f12
Reviewed-on: http://review.whamcloud.com/1955
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/cl_object.h
lustre/obdclass/cl_internal.h
lustre/obdclass/cl_lock.c
lustre/obdclass/cl_page.c
lustre/osc/osc_lock.c