Whamcloud - gitweb
LU-7702 ldlm: skip lock if export failed 20/18120/9
authorAlexander Boyko <alexander.boyko@seagate.com>
Wed, 15 Jun 2016 06:12:14 +0000 (14:12 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 27 Jun 2016 18:55:30 +0000 (18:55 +0000)
commit3be9beb00e7cca9d758b364a85537b0631dddc12
tree162c0f5d3ba92b8a0acb2a272a5c6a621992022a
parent3b7d27ea22faf1c6d0a37afa724fd9b5c3240322
LU-7702 ldlm: skip lock if export failed

This patch resolves IO vs eviction race.
After eviction failed export stayed at stale list,
a client had IO processing and reconnected during it.
A client sent brw rpc with last lock cookie and new connection.
The lock with failed export was found and assert was happened.
(ost_handler.c:1812:ost_prolong_lock_one())
ASSERTION( lock->l_export == opd->opd_exp ) failed:

1. Skip the lock at ldlm_handle2lock if lock export failed.
2. Validation of lock for IO was added at hpreq_check(). The lock
   searching is based on granted interval tree. If server doesn`t
   have a valid lock, it reply to client with ESTALE.
3. A lock prolong was moved at ldlm layer.

Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Seagate-bug-id: MRP-2787
Change-Id: I2177736564c3b8164f1ad3e4cc02dca1704a0e6e
Reviewed-on: http://review.whamcloud.com/18120
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_dlm.h
lustre/include/obd_support.h
lustre/ldlm/ldlm_extent.c
lustre/ldlm/ldlm_lock.c
lustre/ofd/ofd_dev.c
lustre/osc/osc_request.c
lustre/ptlrpc/service.c
lustre/tests/recovery-small.sh