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
          jhammond John Hammond added a comment -

          Patch landed to master.

          jhammond John Hammond added a comment - Patch landed to master.

          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.

          during replay we do not have any concurrency at the moment. literally all the replays are done within the context of special recovery thread, one by one.

          bzzz Alex Zhuravlev added a comment - during replay we do not have any concurrency at the moment. literally all the replays are done within the context of special recovery thread, one by one.

          People

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

            Dates

              Created:
              Updated:
              Resolved: