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

2 commits

  • * 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
     
  • A kset should not have its name set directly, so dynamically set the
    name at runtime.

    This is needed to remove the static array in the kobject structure which
    will be changed in a future patch.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

10 Oct, 2007

1 commit

  • Introduce a per-lockspace rwsem that's held in read mode by dlm_recv
    threads while working in the dlm. This allows dlm_recv activity to be
    suspended when the lockspace transitions to, from and between recovery
    cycles.

    The specific bug prompting this change is one where an in-progress
    recovery cycle is aborted by a new recovery cycle. While dlm_recv was
    processing a recovery message, the recovery cycle was aborted and
    dlm_recoverd began cleaning up. dlm_recv decremented recover_locks_count
    on an rsb after dlm_recoverd had reset it to zero. This is fixed by
    suspending dlm_recv (taking write lock on the rwsem) before aborting the
    current recovery.

    The transitions to/from normal and recovery modes are simplified by using
    this new ability to block dlm_recv. The switch from normal to recovery
    mode means dlm_recv goes from processing locking messages, to saving them
    for later, and vice versa. Races are avoided by blocking dlm_recv when
    setting the flag that switches between modes.

    Signed-off-by: David Teigland
    Signed-off-by: Steven Whitehouse

    David Teigland
     

09 Jul, 2007

6 commits

  • Mask off the recently added DLM_LSFL_FS flag when setting the exflags.
    This way all the nodes in the lockspace aren't required to have the FS
    flag set, since we later check that exflags matches among all nodes.

    Signed-off-by: Patrick Caulfield
    Signed-off-by: David Teigland
    Signed-off-by: Steven Whitehouse

    David Teigland
     
  • Add a new flag, DLM_LSFL_FS, to be used when a file system creates a lockspace.
    This flag causes the dlm to use GFP_NOFS for allocations instead of GFP_KERNEL.
    (This updated version of the patch uses gfp_t for ls_allocation.)

    Signed-Off-By: Patrick Caulfield
    Signed-Off-By: David Teigland
    Signed-off-by: Steven Whitehouse

    Patrick Caulfield
     
  • Joining the lockspace should wait for the initial round of inter-node
    config checks to complete before returning. This way, if there's a
    configuration mismatch between the joining node and the existing nodes,
    the join can fail and return an error to the application.

    Signed-off-by: David Teigland
    Signed-off-by: Steven Whitehouse

    David Teigland
     
  • Fix the error path when exiting new_lockspace(). It was kfree'ing the
    lockspace struct at the end, but that's only valid if it exits before
    kobject_register occured. After kobject_register we have to let the
    kobject do the freeing.

    Signed-off-by: David Teigland
    Signed-off-by: Steven Whitehouse

    David Teigland
     
  • New features: lock timeouts and time warnings. If the DLM_LKF_TIMEOUT
    flag is set, then the request/conversion will be canceled after waiting
    the specified number of centiseconds (specified per lock). This feature
    is only available for locks requested through libdlm (can be enabled for
    kernel dlm users if there's a use for it.)

    If the new DLM_LSFL_TIMEWARN flag is set when creating the lockspace, then
    a warning message will be sent to userspace (using genetlink) after a
    request/conversion has been waiting for a given number of centiseconds
    (configurable per node). The time warnings will be used in the future
    to do deadlock detection in userspace.

    Signed-off-by: David Teigland
    Signed-off-by: Steven Whitehouse

    David Teigland
     
  • Don't let dlm_scand run during recovery since it may try to do a resource
    directory removal while the directory nodes are changing.

    Signed-off-by: David Teigland
    Signed-off-by: Steven Whitehouse

    David Teigland
     

08 May, 2007

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (34 commits)
    [GFS2] Uncomment sprintf_symbol calling code
    [DLM] lowcomms style
    [GFS2] printk warning fixes
    [GFS2] Patch to fix mmap of stuffed files
    [GFS2] use lib/parser for parsing mount options
    [DLM] Lowcomms nodeid range & initialisation fixes
    [DLM] Fix dlm_lowcoms_stop hang
    [DLM] fix mode munging
    [GFS2] lockdump improvements
    [GFS2] Patch to detect corrupt number of dir entries in leaf and/or inode blocks
    [GFS2] bz 236008: Kernel gpf doing cat /debugfs/gfs2/xxx (lock dump)
    [DLM] fs/dlm/ast.c should #include "ast.h"
    [DLM] Consolidate transport protocols
    [DLM] Remove redundant assignment
    [GFS2] Fix bz 234168 (ignoring rgrp flags)
    [DLM] change lkid format
    [DLM] interface for purge (2/2)
    [DLM] add orphan purging code (1/2)
    [DLM] split create_message function
    [GFS2] Set drop_count to 0 (off) by default
    ...

    Linus Torvalds
     

03 May, 2007

1 commit