1. 12 Sep, 2006 1 commit
    • Steven Whitehouse's avatar
      [GFS2] Rewrite of examine_bucket() · 24264434
      Steven Whitehouse authored
      The existing implementation of this function in glock.c was not
      very efficient as it relied upon keeping a cursor element upon the
      hash chain in question and moving it along. This new version improves
      upon this by using the current element as a cursor. This is possible
      since we only look at the "next" element in the list after we've
      taken the read_lock() subsequent to calling the examiner function.
      Obviously we have to eventually drop the ref count that we are then
      left with and we cannot do that while holding the read_lock, so we
      do that next time we drop the lock. That means either just before
      we examine another glock, or when the loop has terminated.
      
      The new implementation has several advantages: it uses only a
      read_lock() rather than a write_lock(), so it can run simnultaneously
      with other code, it doesn't need a "plug" element, so that it removes
      a test not only from this list iterator, but from all the other glock
      list iterators too. So it makes things faster and smaller.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      24264434
  2. 09 Sep, 2006 4 commits
  3. 08 Sep, 2006 4 commits
    • David Teigland's avatar
      [DLM] confirm master for recovered waiting requests · fa9f0e49
      David Teigland authored
      Fixing the following scenario:
      - A request is on the waiters list waiting for a reply from a remote node.
      - The request is the first one on the resource, so first_lkid is set.
      - The remote node fails causing recovery.
      - During recovery the requesting node becomes master.
      - The request is now processed locally instead of being a remote operation.
      - At this point we need to call confirm_master() on the resource since
        we're certain we're now the master node.  This will clear first_lkid.
      - We weren't calling confirm_master(), so first_lkid was not being cleared
        causing subsequent requests on that resource to get stuck.
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      fa9f0e49
    • Steven Whitehouse's avatar
      [GFS2] Move rwlocks in glock.c into their own array · 37b2fa6a
      Steven Whitehouse authored
      This splits the rwlocks guarding the hash chains of the glock hash
      table into their own array. This will reduce memory usage in some
      cases due to better alignment, although the real reason for doing it
      is to allow the two tables to be different sizes in future (i.e.
      the locks will be sized proportionally with the max number of CPUs
      and the hash chains sized proportinally with the size of physical memory)
      
      In order to allow this, the gl_bucket member of struct gfs2_glock has
      now become gl_hash, so we record the hash rather than a pointer to the
      bucket itself.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      37b2fa6a
    • Steven Whitehouse's avatar
      [GFS2] Use void * instead of typedef for locking module interface · 9b47c11d
      Steven Whitehouse authored
      As requested by Jan Engelhardt, this removes the typedefs in the
      locking module interface and replaces them with void *. Also
      since we are changing the interface, I've added a few consts
      as well.
      
      Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
      Cc: David Teigland <teigland@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      9b47c11d
    • Steven Whitehouse's avatar
      [GFS2] vfree should be kfree · a2c45807
      Steven Whitehouse authored
      This was missed in an earlier patch when changing over from vmalloc
      to kmalloc for the superblock.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      a2c45807
  4. 07 Sep, 2006 9 commits
  5. 05 Sep, 2006 9 commits
  6. 04 Sep, 2006 13 commits