Whamcloud - gitweb
LU-17003 dne: remove REP-ACK support in DNE system 51/51851/3
authorLai Siyao <lai.siyao@whamcloud.com>
Mon, 10 Jul 2023 22:49:50 +0000 (18:49 -0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 24 Aug 2023 04:35:31 +0000 (04:35 +0000)
commit3209d206927d771d2ce7d71a1a75aecce4d0b356
tree15dff5704975bbd5d8d7f48ce440cb3252c7e698
parent33bd9d4068c9d9b5f01b94346f0eaf976198c861
LU-17003 dne: remove REP-ACK support in DNE system

DNE system doesn't need to support REP-ACK. In the old implementation,
write locks are kept in PW|EX mode after transaction stop, and will
be downgraded to TXN mode till REP-ACK, and then not released until
transaction commit.

While in the period between transaction stop and REP-ACK, any read
lock request will be on hold till downgrade, with this change, this
read lock request will succeed immediately.  During this period, any
write lock request may involve extra commit, since mdt_blocking_ast()
does not know whether transaction has stopped, so it needs to trigger
commit-on-sharing immediately, and also set 'sync' flag in the lock.
If transaction is not stopped yet, later when it's stopped, it will
trigger another commit-on-sharing since the 'sync' flag is set.

With this change, mdt_blocking_ast() only needs to set 'sync' flag if
its mode is PW|EX, and trigger commit-on-sharing once upon unlock.
This refuces the number of transaction commits and may improve
performance in some corner cases.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I159a0ad619afd10e97be3dc175a6b4ed77b31142
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51851
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/lustre_net.h
lustre/ldlm/ldlm_lib.c
lustre/ldlm/ldlm_lock.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_recovery.c
lustre/ptlrpc/layout.c
lustre/ptlrpc/service.c