07 Jun, 2014

1 commit


15 Feb, 2014

1 commit


16 Oct, 2013

1 commit

  • When dlm_release_lockspace(ls, 1) is invoked on a busy system
    immediately after the last dlm_unlock() AST has finished it can occur
    that lkb_idr_is_local() is invoked for the unlocked LKB since removal
    from ls_lkbidr only occurs after the AST has returned. If that happens
    dlm_release_lockspace(ls, 1) will return -EBUSY instead of releasing
    the lockspace. Fix this race condition by changing lkb_idr_is_local()
    such that it only returns true for LKB's that have not yet been
    unlocked.

    Signed-off-by: Bart Van Assche
    Signed-off-by: David Teigland

    Bart Van Assche
     

26 Jun, 2013

1 commit


28 Feb, 2013

1 commit

  • idr_destroy() can destroy idr by itself and idr_remove_all() is being
    deprecated.

    The conversion isn't completely trivial for recover_idr_clear() as it's
    the only place in kernel which makes legitimate use of idr_remove_all()
    w/o idr_destroy(). Replace it with idr_remove() call inside
    idr_for_each_entry() loop. It goes on top so that it matches the
    operation order in recover_idr_del().

    Signed-off-by: Tejun Heo
    Cc: Christine Caulfield
    Cc: David Teigland
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

09 Aug, 2012

1 commit

  • The in_recovery rw_semaphore has always been acquired and
    released by different threads by design. To work around
    the "BUG: bad unlock balance detected!" messages, adjust
    things so the dlm_recoverd thread always does both down_write
    and up_write.

    Signed-off-by: David Teigland

    David Teigland
     

17 Jul, 2012

3 commits

  • It was possible for a remove message on an old
    rsb to be sent after a lookup message on a new
    rsb, where the rsbs were for the same resource
    name. This could lead to a missing directory
    entry for the new rsb.

    It is fixed by keeping a copy of the resource
    name being removed until after the remove has
    been sent. A lookup checks if this in-progress
    remove matches the name it is looking up.

    Signed-off-by: David Teigland

    David Teigland
     
  • When a large number of resources are being recovered,
    a linear search of the recover_list takes a long time.
    Use an idr in place of a list.

    Signed-off-by: David Teigland

    David Teigland
     
  • Remove the dir hash table (dirtbl), and use
    the rsb hash table (rsbtbl) as the resource
    directory. It has always been an unnecessary
    duplication of information.

    This improves efficiency by using a single rsbtbl
    lookup in many cases where both rsbtbl and dirtbl
    lookups were needed previously.

    This eliminates the need to handle cases of rsbtbl
    and dirtbl being out of sync.

    In many cases there will be memory savings because
    the dir hash table no longer exists.

    Signed-off-by: David Teigland

    David Teigland
     

03 May, 2012

1 commit

  • The "nodir" mode (statically assign master nodes instead
    of using the resource directory) has always been highly
    experimental, and never seriously used. This commit
    fixes a number of problems, making nodir much more usable.

    - Major change to recovery: recover all locks and restart
    all in-progress operations after recovery. In some
    cases it's not possible to know which in-progess locks
    to recover, so recover all. (Most require recovery
    in nodir mode anyway since rehashing changes most
    master nodes.)

    - Change the way nodir mode is enabled, from a command
    line mount arg passed through gfs2, into a sysfs
    file managed by dlm_controld, consistent with the
    other config settings.

    - Allow recovering MSTCPY locks on an rsb that has not
    yet been turned into a master copy.

    - Ignore RCOM_LOCK and RCOM_LOCK_REPLY recovery messages
    from a previous, aborted recovery cycle. Base this
    on the local recovery status not being in the state
    where any nodes should be sending LOCK messages for the
    current recovery cycle.

    - Hold rsb lock around dlm_purge_mstcpy_locks() because it
    may run concurrently with dlm_recover_master_copy().

    - Maintain highbast on process-copy lkb's (in addition to
    the master as is usual), because the lkb can switch
    back and forth between being a master and being a
    process copy as the master node changes in recovery.

    - When recovering MSTCPY locks, flag rsb's that have
    non-empty convert or waiting queues for granting
    at the end of recovery. (Rename flag from LOCKS_PURGED
    to RECOVER_GRANT and similar for the recovery function,
    because it's not only resources with purged locks
    that need grant a grant attempt.)

    - Replace a couple of unnecessary assertion panics with
    error messages.

    Signed-off-by: David Teigland

    David Teigland
     

04 Jan, 2012

2 commits

  • These new callbacks notify the dlm user about lock recovery.
    GFS2, and possibly others, need to be aware of when the dlm
    will be doing lock recovery for a failed lockspace member.

    In the past, this coordination has been done between dlm and
    file system daemons in userspace, which then direct their
    kernel counterparts. These callbacks allow the same
    coordination directly, and more simply.

    Signed-off-by: David Teigland

    David Teigland
     
  • Slot numbers are assigned to nodes when they join the lockspace.
    The slot number chosen is the minimum unused value starting at 1.
    Once a node is assigned a slot, that slot number will not change
    while the node remains a lockspace member. If the node leaves
    and rejoins it can be assigned a new slot number.

    A new generation number is also added to a lockspace. It is
    set and incremented during each recovery along with the slot
    collection/assignment.

    The slot numbers will be passed to gfs2 which will use them as
    journal id's.

    Signed-off-by: David Teigland

    David Teigland
     

19 Nov, 2011

1 commit

  • Change the linked lists to rb_tree's in the rsb
    hash table to speed up searches. Slow rsb searches
    were having a large impact on gfs2 performance due
    to the large number of dlm locks gfs2 uses.

    Signed-off-by: Bob Peterson
    Signed-off-by: David Teigland

    Bob Peterson
     

16 Jul, 2011

1 commit

  • Instead of creating our own kthread (dlm_astd) to deliver
    callbacks for all lockspaces, use a per-lockspace workqueue
    to deliver the callbacks. This eliminates complications and
    slowdowns from many lockspaces sharing the same thread.

    Signed-off-by: David Teigland

    David Teigland
     

13 Jul, 2011

1 commit

  • By pre-allocating rsb structs before searching the hash
    table, they can be inserted immediately. This avoids
    always having to repeat the search when adding the struct
    to hash list.

    This also adds space to the rsb struct for a max resource
    name, so an rsb allocation can be used by any request.
    The constant size also allows us to finally use a slab
    for the rsb structs.

    Signed-off-by: David Teigland

    David Teigland
     

11 Jul, 2011

1 commit


02 Jul, 2011

1 commit


02 Apr, 2011

1 commit


08 Mar, 2010

1 commit

  • Constify struct sysfs_ops.

    This is part of the ops structure constification
    effort started by Arjan van de Ven et al.

    Benefits of this constification:

    * prevents modification of data that is shared
    (referenced) by many other structure instances
    at runtime

    * detects/prevents accidental (but not intentional)
    modification attempts on archs that enforce
    read-only kernel data at runtime

    * potentially better optimized code as the compiler
    can assume that the const data cannot be changed

    * the compiler/linker move const data into .rodata
    and therefore exclude them from false sharing

    Signed-off-by: Emese Revfy
    Acked-by: David Teigland
    Acked-by: Matt Domsch
    Acked-by: Maciej Sosnowski
    Acked-by: Hans J. Koch
    Acked-by: Pekka Enberg
    Acked-by: Jens Axboe
    Acked-by: Stephen Hemminger
    Signed-off-by: Greg Kroah-Hartman

    Emese Revfy
     

27 Feb, 2010

1 commit


01 Dec, 2009

1 commit

  • Replace all GFP_KERNEL and ls_allocation with GFP_NOFS.
    ls_allocation would be GFP_KERNEL for userland lockspaces
    and GFP_NOFS for file system lockspaces.

    It was discovered that any lockspaces on the system can
    affect all others by triggering memory reclaim in the
    file system which could in turn call back into the dlm
    to acquire locks, deadlocking dlm threads that were
    shared by all lockspaces, like dlm_recv.

    Signed-off-by: David Teigland

    David Teigland
     

07 May, 2009

2 commits


29 Jan, 2009

1 commit


09 Jan, 2009

1 commit


14 Nov, 2008

1 commit

  • Fixes a regression from commit 0f8e0d9a317406612700426fad3efab0b7bbc467,
    "dlm: allow multiple lockspace creates".

    An extraneous 'else' slipped into a code fragment being moved from
    release_lockspace() to dlm_release_lockspace(). The result of the
    unwanted 'else' is that dlm threads and structures are not stopped
    and cleaned up when the final dlm lockspace is removed. Trying to
    create a new lockspace again afterward will fail with
    "kmem_cache_create: duplicate cache dlm_conn" because the cache
    was not previously destroyed.

    Signed-off-by: David Teigland

    David Teigland
     

29 Aug, 2008

3 commits

  • The dlm_scand thread needs to lock the list of lockspaces
    when going through it.

    Signed-off-by: David Teigland

    David Teigland
     
  • If dlm_controld (the userspace daemon that controls the setup and
    recovery of the dlm) fails, the kernel should shut down the lockspaces
    in the kernel rather than leaving them running. This is detected by
    having dlm_controld hold a misc device open while running, and if
    the kernel detects a close while the daemon is still needed, it stops
    the lockspaces in the kernel.

    Knowing that the userspace daemon isn't running also allows the
    lockspace create/remove routines to avoid waiting on the daemon
    for join/leave operations.

    Signed-off-by: David Teigland

    David Teigland
     
  • Add a count for lockspace create and release so that create can
    be called multiple times to use the lockspace from different places.
    Also add the new flag DLM_LSFL_NEWEXCL to create a lockspace with
    the previous behavior of returning -EEXIST if the lockspace already
    exists.

    Signed-off-by: David Teigland

    David Teigland
     

30 Apr, 2008

1 commit


07 Feb, 2008

1 commit


30 Jan, 2008

2 commits


25 Jan, 2008

6 commits


13 Oct, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (75 commits)
    PM: merge device power-management source files
    sysfs: add copyrights
    kobject: update the copyrights
    kset: add some kerneldoc to help describe what these strange things are
    Driver core: rename ktype_edd and ktype_efivar
    Driver core: rename ktype_driver
    Driver core: rename ktype_device
    Driver core: rename ktype_class
    driver core: remove subsystem_init()
    sysfs: move sysfs file poll implementation to sysfs_open_dirent
    sysfs: implement sysfs_open_dirent
    sysfs: move sysfs_dirent->s_children into sysfs_dirent->s_dir
    sysfs: make sysfs_root a regular directory dirent
    sysfs: open code sysfs_attach_dentry()
    sysfs: make s_elem an anonymous union
    sysfs: make bin attr open get active reference of parent too
    sysfs: kill unnecessary NULL pointer check in sysfs_release()
    sysfs: kill unnecessary sysfs_get() in open paths
    sysfs: reposition sysfs_dirent->s_mode.
    sysfs: kill sysfs_update_file()
    ...

    Linus Torvalds