20 May, 2008

4 commits


30 Apr, 2008

1 commit


23 Apr, 2008

1 commit


22 Apr, 2008

6 commits

  • Add central definitions for max lockspace name length and max resource
    name length. The lack of central definitions has resulted in scattered
    private definitions which we can now clean up, including an unused one
    in dlm_device.h.

    Signed-off-by: David Teigland

    David Teigland
     
  • Move the code that handles cluster posix locks from gfs2 into the dlm
    so that it can be used by both gfs2 and ocfs2.

    Signed-off-by: David Teigland

    David Teigland
     
  • If a node is removed from a lockspace, and then added back before the
    dlm is notified of the removal, the dlm will not detect the removal
    and won't clear the old state from the node. This is fixed by using a
    list of added nodes so the membership recovery can detect when a newly
    added node is already in the member list.

    Signed-off-by: David Teigland

    David Teigland
     
  • When a NOQUEUE request fails, the rsb res_master field is unnecessarily
    reset to -1, instead of leaving the valid master setting in place. We
    want to save the looked-up master values while the rsb is on the "toss
    list" so that another lookup can be avoided if the rsb is soon reused.
    The fix is to simply leave res_master value alone.

    Signed-off-by: David Teigland

    David Teigland
     
  • dlm_print_rsb() can now become static.

    Signed-off-by: Adrian Bunk
    Signed-off-by: David Teigland

    Adrian Bunk
     
  • cluster_set is only called from the macro CLUSTER_ATTR which defines read/write
    access functions. Make the signedness match to avoid sparse warnings every time
    CLUSTER_ATTR is used (lines 149-159) all of the form:

    fs/dlm/config.c:149:1: warning: incorrect type in argument 3 (different signedness)
    fs/dlm/config.c:149:1: expected unsigned int *info_field
    fs/dlm/config.c:149:1: got int extern [toplevel] *

    Signed-off-by: Harvey Harrison
    Signed-off-by: David Teigland

    Harvey Harrison
     

19 Apr, 2008

1 commit


22 Feb, 2008

1 commit

  • The recent patch to validate data lengths in rcom_names messages
    failed to account for fake messages a node directs to itself before
    ever sending it. In this case we need to fill in the message length
    in the header for the validation code to use.

    Signed-off-by: David Teigland

    David Teigland
     

07 Feb, 2008

2 commits


06 Feb, 2008

1 commit


04 Feb, 2008

13 commits


31 Jan, 2008

10 commits

  • also change name_prefix from char pointer to char array.

    Signed-off-by: Denis Cheng
    Signed-off-by: David Teigland

    Denis Cheng
     
  • A couple small clean-ups. Remove unnecessary wrapper-functions in
    rcom.c, and remove unnecessary casting and an unnecessary ASSERT in
    util.c.

    Signed-off-by: David Teigland

    David Teigland
     
  • The 32/64 compatibility code in the DLM does not check the validity of
    the lock name length passed into it, so it can easily overwrite memory
    if the value is rubbish (as early versions of libdlm can cause with
    unlock calls, it doesn't zero the field).

    This patch restricts the length of the name to the amount of data
    actually passed into the call.

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

    Patrick Caulfeld
     
  • To prevent the master of an rsb from changing rapidly, an unused rsb is kept
    on the "toss list" for a period of time to be reused. The toss list was
    being cleared completely for each recovery, which is unnecessary. Much of
    the benefit of the toss list can be maintained if nodes keep rsb's in their
    toss list that they are the master of. These rsb's need to be included
    when the resource directory is rebuilt during recovery.

    Signed-off-by: David Teigland

    David Teigland
     
  • The invalid lockspace messages are normal and can appear relatively
    often. They should be suppressed without debugging enabled.

    Signed-off-by: David Teigland

    David Teigland
     
  • The dlm_put_lkb() can free the lkb and its associated ua structure,
    so we can't depend on using the ua struct after the put.

    Signed-off-by: David Teigland

    David Teigland
     
  • In a rare case we may need to repeat a local resource directory lookup
    due to a race with removing the rsb and removing the resdir record.
    We'll never need to do more than a single additional lookup, though,
    so the infinite loop around the lookup can be removed. In addition
    to being unnecessary, the infinite loop is dangerous since some other
    unknown condition may appear causing the loop to never break.

    Signed-off-by: David Teigland

    David Teigland
     
  • Non-forced unlocks should be rejected if the lock is waiting on the
    rsb_lookup list for another lock to establish the master node.

    Signed-off-by: David Teigland

    David Teigland
     
  • There was some hit and miss validation of messages that has now been
    cleaned up and unified. Before processing a message, the new
    validate_message() function checks that the lkb is the appropriate type,
    process-copy or master-copy, and that the message is from the correct
    nodeid for the the given lkb. Other checks and assertions on the
    lkb type and nodeid have been removed. The assertions were particularly
    bad since they would panic the machine instead of just ignoring the bad
    message.

    Although other recent patches have made processing old message unlikely,
    it still may be possible for an old message to be processed and caught
    by these checks.

    Signed-off-by: David Teigland

    David Teigland
     
  • Messages from nodes that are no longer members of the lockspace should be
    ignored. When nodes are removed from the lockspace, recovery can
    sometimes complete quickly enough that messages arrive from a removed node
    after recovery has completed. When processed, these messages would often
    cause an error message, and could in some cases change some state, causing
    problems.

    Signed-off-by: David Teigland

    David Teigland