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

Change all obd_device flags to use atomic set/create/test_bit operations

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

      struct obd_device has a number of bitfields that are supposed to be protected by a spinlock.
      Implementation of this spinlock is very inconsistent and as updating a bitfield is not atomic this can lead to bitfields being involuntarily modified when two different fields are updated concurrently.

      Migrate all of the bitfields in obd_device into a DECLARE_BITMAP and use atomic set/clear/test functions to access them.
      Leave the locking as-is for now to reduce risk as that will require careful audit of where it is safe to remove and where it is not.

            rsahlberg@whamcloud.com Ronnie Sahlberg
            rsahlberg@whamcloud.com Ronnie Sahlberg
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: