Whamcloud - gitweb
LU-8650 mdt: enable REP-ACK for DNE 07/22807/4
authorLai Siyao <lai.siyao@intel.com>
Thu, 29 Sep 2016 12:48:47 +0000 (20:48 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 9 May 2017 03:44:14 +0000 (03:44 +0000)
commit6dc05f00218798e400433feeda7ad6f271b535d8
tree89e697b2f6db24dbb08b7fafbb5852189d741210
parentc156613b29be6fcee13d0df7008f0cd7847a5263
LU-8650 mdt: enable REP-ACK for DNE

LU-7903 reveals that REP-ACK is disabled in 2.8, this was
introduced in LU-3538 http://review.whamcloud.com/12530
which is to support DNE Commit-on-Sharing, but it disabled
REP-ACK, while Commit-on-Sharing doesn't take effect for
local operations (operation which involves only one MDT)
either, this may cause single MDT recovery fail.

To fix this, we need to enable REP-ACK, and also make sure
http://review.whamcloud.com/12530 work as designed:
1. save local locks upon unlock as before, but don't convert
   locks into COS mode.
2. reply_out_callback() wakes up ptlrpc_handle_rs(), if
   reply was committed, decref locks like before.
3. otherwise for uncommitted reply convert locks to COS mode,
   and later when it's committed, ptlrpc_commit_replies()
   wakes up ptlrpc_handle_rs() again, which will decref locks
   like before.

In short, local locks will be converted into COS mode upon
REP-ACK, and transaction commit will decref locks.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: Id21681017573b50e071dd8b5a4d65489843781a1
Reviewed-on: https://review.whamcloud.com/22807
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_net.h
lustre/ldlm/ldlm_lib.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_recovery.c
lustre/ptlrpc/service.c