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

mdt_mfd_open() may call mdt_handle2mfd() w/o holding med_open_lock

Details

    • 3
    • 8110

    Description

      During replay mdt_mfd_open() calls mdt_handle2mfd() with out holding the med_open_lock. This seems like an potentially unsafe walk of the med_open_head list. It later takes the lock to unlink mfd, but it does not seem to check that it has won the possible race to unlink this mfd.

      Attachments

        Activity

          [LU-3273] mdt_mfd_open() may call mdt_handle2mfd() w/o holding med_open_lock
          pjones Peter Jones made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Reopened [ 4 ] New: Resolved [ 5 ]
          pjones Peter Jones made changes -
          Fix Version/s New: Lustre 2.4.2 [ 10605 ]
          pjones Peter Jones made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          jhammond John Hammond made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          jhammond John Hammond made changes -
          Fix Version/s New: Lustre 2.5.0 [ 10295 ]
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          jhammond John Hammond added a comment -

          Patch landed to master.

          jhammond John Hammond added a comment - Patch landed to master.
          pjones Peter Jones made changes -
          Assignee Original: WC Triage [ wc-triage ] New: John Hammond [ jhammond ]
          pjones Peter Jones made changes -
          Labels Original: mdt New: mdt patch

          I have submitted a patch to fix this bug here (http://review.whamcloud.com/#/c/7272/)

          spimpale Swapnil Pimpale (Inactive) added a comment - I have submitted a patch to fix this bug here ( http://review.whamcloud.com/#/c/7272/ )

          Alex, is it true that recovery is still single-threaded today? I thought I saw issues in the past where this assumption was incorrect? In any case, holding locks in the single-threaded case would not cause contention, and makes the code more correct for readers and for static code analysis tools.

          adilger Andreas Dilger added a comment - Alex, is it true that recovery is still single-threaded today? I thought I saw issues in the past where this assumption was incorrect? In any case, holding locks in the single-threaded case would not cause contention, and makes the code more correct for readers and for static code analysis tools.

          People

            jhammond John Hammond
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: