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

lov_getref/putref incorrectly rely on a mutex protection

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • Lustre 2.1.0, Lustre 1.8.7
    • None
    • 3
    • 10446

    Description

      lov_getref has this code:

      static void lov_getref(struct obd_device *obd)
      {
              struct lov_obd *lov = &obd->u.lov;
      
              /* nobody gets through here until lov_putref is done */
              cfs_mutex_down(&lov->lov_lock);
              cfs_atomic_inc(&lov->lov_refcount);
              cfs_mutex_up(&lov->lov_lock);
              return;
      }
      

      I imagine Nathan tried to avoid some sort of a race while working on bug 9439, but in reality whatever was the race he imagined, it's still there.

      At the very least we need to just get rid of this locking here and in lov_putref() and also get rid of lov_lock() in total I suspect.

      Attachments

        Issue Links

          Activity

            People

              wc-triage WC Triage
              green Oleg Drokin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: