Whamcloud - gitweb
LU-3321 osc: add weight function for DLM lock 94/7894/16
authorJinshan Xiong <jinshan.xiong@intel.com>
Wed, 6 Nov 2013 04:42:40 +0000 (20:42 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 2 Dec 2013 15:49:09 +0000 (15:49 +0000)
commit154fb1f7ce222a9b85cd8537aa1a0da9e25723fc
tree10ca640a41fbc19329bf3352043a64e1b06ec2da
parent4fcbd1af9ec3b1e5f6424d925f43f0cb2910c3ec
LU-3321 osc: add weight function for DLM lock

Use weigh_ast to decide if a lock covers any pages.
In recovery, weigh_ast will be used to decide if a DLM read lock
covers any locked pages, or it will be canceled instead being
recovered.

The problem with the original implementation is that it attached
each osc_page to an osc_lock also changed lock state to add every
pages for readahead.

Bugzilla-bug-Id: b=16774

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I34efb0db52574c8cf5a7165d80ed527c80ba4031
Reviewed-on: http://review.whamcloud.com/7894
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ldlm/ldlm_request.c
lustre/osc/osc_cl_internal.h
lustre/osc/osc_internal.h
lustre/osc/osc_lock.c
lustre/osc/osc_page.c
lustre/osc/osc_request.c