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

mdt unlink should lock parent before lookup child

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.9.0
    • Lustre 2.8.0
    • 3
    • 9223372036854775807

    Description

      In DNE Commit-on-Sharing implementation, mdt_reint_unlink() changed code to lookup child before lock parent, as is to find whether current operation is distributed, if so it needs to trigger commit of local changes to eliminate dependencies. But this may cause stale child used in later code. We should always follow lock-before-lookup semantic.

      Attachments

        Issue Links

          Activity

            [LU-8353] mdt unlink should lock parent before lookup child

            Patch landed to master for 2.9.0

            jgmitter Joseph Gmitter (Inactive) added a comment - Patch landed to master for 2.9.0

            I think it's one of the root causes for LU-7117, but it can pop up w/o 7117, w/o any recovery. basically we were doing lookups w/o LDLM lock and that can result in a corrupted namespace if another "unlink+create" can win race.

            bzzz Alex Zhuravlev added a comment - I think it's one of the root causes for LU-7117 , but it can pop up w/o 7117, w/o any recovery. basically we were doing lookups w/o LDLM lock and that can result in a corrupted namespace if another "unlink+create" can win race.

            Should this ticket be closed? Is it related to LU-7117 and should be linked there, or is this unrelated?

            adilger Andreas Dilger added a comment - Should this ticket be closed? Is it related to LU-7117 and should be linked there, or is this unrelated?

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/21088/
            Subject: LU-8353 mdt: mdt unlink should lock before lookup
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 5e5dabac9eca8bc6ea516fb3ad53b8d74fe80a37

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/21088/ Subject: LU-8353 mdt: mdt unlink should lock before lookup Project: fs/lustre-release Branch: master Current Patch Set: Commit: 5e5dabac9eca8bc6ea516fb3ad53b8d74fe80a37

            Lai Siyao (lai.siyao@intel.com) uploaded a new patch: http://review.whamcloud.com/21088
            Subject: LU-8353 mdt: mdt unlink should lock before lookup
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: cd90c77d1216c988126c86ec09de1b9242ab96e7

            gerrit Gerrit Updater added a comment - Lai Siyao (lai.siyao@intel.com) uploaded a new patch: http://review.whamcloud.com/21088 Subject: LU-8353 mdt: mdt unlink should lock before lookup Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: cd90c77d1216c988126c86ec09de1b9242ab96e7

            People

              laisiyao Lai Siyao
              laisiyao Lai Siyao
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: