Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
MDT should take a CR layout lock against the file object first to check whether the file is already PCC-RO cached. If so, return immediately; Otherwise, take an EX lock on the file to update the FLR PCC-RO state accordingly. By this check, it can avoid heavy lock contention and unnecessary revocation of the layout lock granted to the other clients when multiple processes from many clients perform read-only attach on a shared file simultaneously.
It also adds the layout intent write (LAYOUT_INTENT_PCCRO_SET and LAYOUT_INTENT_PCCRO_CLEAR) with FMODE_WRITE flag, so that the conflict lock can be revoked via the ELC strategy, avoiding unnecessary lock traffic.