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, 27 Jul 2012 23:08:29 +0000 (19:08 -0400)
commit89ca6ce422fcc165d9d237528c65653e7802fe06
tree2d442c75d0a20d2ee9bde475d7cf93e325b6cb4c
parent7cd8b93461905334d227f3e6203b2862965f411f
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