Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-11150

Use LCK_CR lock mode when send change layout intent to MDS

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Rank (Obsolete):
      9223372036854775807

      Description

      In current implementation, the client uses LCK_EX lock mode for layout lock when issue a layout change intent RPC to MDS. This will grant LCK_EX layout lock to the client. However, the latter restarting I/O will refresh layout, which only matches LCK_CR | LCK_CW | LCK_PR | LCK_PW mode of cached layout lock locally. it will result in reacquiring CR layout lock from MDS and cancel the previously granted EX layout lock to the client via lock blocking callback.
      This patch avoids the this kind of unnecessary lock conflict by using LCK_CR mode directly when issue the layout change intent RPC to MDS. And when MDS received this request, it will first take EX layout lock and change the layout at will according to the write intent, and release the EX layout lock. After that, return a CR layout lock together with layout informatiom to client for latter I/O.

        Attachments

          Activity

            People

            • Assignee:
              qian_wc Qian Yingjin
              Reporter:
              qian Qian Yingjin (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: