Whamcloud - gitweb
LU-11025 mdt: don't save remote lock if op not from client 81/37281/8
authorLai Siyao <lai.siyao@whamcloud.com>
Sat, 4 Jan 2020 20:51:32 +0000 (04:51 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 7 May 2020 05:41:57 +0000 (05:41 +0000)
commite496dbf7ed9eb64d347ac203873713531a3fbe59
tree1127dbf868dc896b9329ed9d8e4ca7e2ec17480e
parente284bfbe78d008ebfaae14878893bc7200338f83
LU-11025 mdt: don't save remote lock if op not from client

Some operation may not be originated from client, e.g., directory
auto split, in this case ptlrpc_request is NULL, therefore we can't
get the transaction number from request and save remote lock. This
means upon remote lock cancel this distributed transaction may not
be committed yet, that is to say, commit-on-sharing won't be triggered
if subsequent operations depend on this operation. However this won't
cause any inconsistency normally, because upon one MDT failure, this
distributed transaction can be replayed from update logs in other
MDT, and as a side effect, it avoids continuous commit in directory
auto split.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: If7608cab96f36480654d5d7a0f5a0f1c4dfd12b2
Reviewed-on: https://review.whamcloud.com/37281
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/mdt/mdt_handler.c