Whamcloud - gitweb
LU-15527 dne: refactor commit-on-sharing for DNE
Commit-on-sharing for DNE is different from the original
commit-on-sharing:
* the original commit-on-sharing is to eliminate dependency between
operations from different clients.
* while commit-on-sharing for DNE is to eliminate dependency between
operations handled by different MDTs, so that upon multiple MDT
failures, an operaiton replay won't fail because its dependent
operation is not replayed by another MDT yet.
Current CoS for DNE implementation checks dependency in MDT layer, and
it decides by checking whether current operation is a distributed
transaction, if so, it will trigger CoS upon conflicting locks.
Actually this may miss some cases that should trigger CoS (even local
transaction should trigger CoS if it depends on a distributed
transaction), and on the other hand it may trigger extra CoS because
if two operations are handled by the same MDT, the dependency is
ensured because they will always be replayed by transaction number.
And to avoid mixing the code of two different CoS, the following
changes are made:
* add new ldlm lock mode LCK_TXN. On DNE system, downgrade PW/EX locks
to this mode after transaction stop.
* add li_initiator_id in struct ldlm_inodebits, which is the index of
MDT where the lock is enqueued, i.e. where operation is handled. If
another operation handled by a different MDT requests a conflicting
PW|EX mode lock against this TXN mode lock, it will trigger commit
to ensure the dependent operation is committed to disk (NB, it
doesn't trigger commit on all involved MDTs, but only the MDT where
the conflict happens, which is enough to allow replay succeed).
* remove LDLM_FL_COS_INCOMPAT and LDLM_FL_COS_ENABLED.
* MDT layer doesn't need to check such dependency any more, since lock
itself knows.
* updated sanityn 33c, 33d and 33e since fewer CoS are triggered now.
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Ib0149fcdc0178afd2c6894d211480f3c6c9284a0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/46641
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
24 files changed: