Whamcloud - gitweb
LU-8005 osc: set lock data for readahead lock 53/19453/2
authorJinshan Xiong <jinshan.xiong@intel.com>
Mon, 11 Apr 2016 17:56:37 +0000 (10:56 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 2 May 2016 23:59:31 +0000 (23:59 +0000)
commit2b0479c0c959e44a4a3e850d36979fdbdf370d3a
treed6cb450a249254cd07a2e79dda6f0f44cb3b1e86
parent03eb7bb98d5d7f86b37cf4d3a8965ac71bd0693e
LU-8005 osc: set lock data for readahead lock

If osc_io_readahead() finds a lock that belongs to the previous
instance of osc_object, the lock data pointer will be null. It has
to instantiate with new instance otherwise those pages won't be
destroyed at lock cancel, and then finally hit the assertion in
osc_req_attr_set().

This patch revised dlmlock_at_pgoff() to call osc_match_base() to
find caching locks for readahead. And new osc_object will be set
to the lock if it doesn't have one yet.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I6e95499bf0c1e501f3f55d25e0c2b3fbc61ed0da
Reviewed-on: http://review.whamcloud.com/19453
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osc/osc_io.c
lustre/osc/osc_lock.c
lustre/osc/osc_request.c