1. 09 7月, 2007 20 次提交
  2. 08 7月, 2007 1 次提交
    • A
      DLM must depend on SYSFS · 95511ad4
      Adrian Bunk 提交于
      The dependency of DLM on SYSFS got lost in
      commit 6ed7257b resulting in the
      following compile error with CONFIG_DLM=y, CONFIG_SYSFS=n:
      
      <--  snip  -->
      
      ...
        LD      .tmp_vmlinux1
      fs/built-in.o: In function `dlm_lockspace_init':
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/fs/dlm/lockspace.c:231: undefined reference to `kernel_subsys'
      fs/built-in.o: In function `configfs_init':
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/fs/configfs/mount.c:143: undefined reference to `kernel_subsys'
      make[1]: *** [.tmp_vmlinux1] Error 1
      
      <--  snip  -->
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      95511ad4
  3. 03 5月, 2007 1 次提交
  4. 01 5月, 2007 15 次提交
    • D
      [DLM] lowcomms style · 617e82e1
      David Teigland 提交于
      Replace some printk with log_print, and fix some simple cases of lines
      over 80.  Also, return -ENOTCONN if lowcomms_start fails due to no local
      IP address being available.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      617e82e1
    • P
      [DLM] Lowcomms nodeid range & initialisation fixes · 30d3a237
      Patrick Caulfield 提交于
      Fix a few range & initialization bugs in lowcomms.
      - max_nodeid is really the highest nodeid encountered, so all loops must include
      it in their iterations.
      - clean dlm_local_count & connection_idr so we can do a clean restart.
      - Remove a spurious BUG_ON
      Signed-Off-By: NPatrick Caulfield <pcaulfie@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      30d3a237
    • J
      [DLM] Fix dlm_lowcoms_stop hang · 2439fe50
      Josef Bacik 提交于
      When you attempt to release a lockspace in DLM, it will hang trying to down a
      semaphore that has already been downed.  The attached patch fixes the problem.
      Signed-off-by: NJosef Bacik <jwhiter@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Cc: Patrick Caulfield <pcaulfie@redhat.com>
      2439fe50
    • D
      [DLM] fix mode munging · 7d3c1feb
      David Teigland 提交于
      There are flags to enable two specialized features in the dlm:
      1. CONVDEADLK causes the dlm to resolve conversion deadlocks internally by
         changing the granted mode of locks to NL.
      2. ALTPR/ALTCW cause the dlm to change the requested mode of locks to PR
         or CW to grant them if the normal requested mode can't be granted.
      
      GFS direct i/o exercises both of these features, especially when mixed
      with buffered i/o.  The dlm has problems with them.
      
      The first problem is on the master node. If it demotes a lock as a part of
      converting it, the actual step of converting the lock isn't being done
      after the demotion, the lock is just left sitting on the granted queue
      with a granted mode of NL.  I think the mistaken assumption was that the
      call to grant_pending_locks() would grant it, but that function naturally
      doesn't look at locks on the granted queue.
      
      The second problem is on the process node.  If the master either demotes
      or gives an altmode, the munging of the gr/rq modes is never done in the
      process copy of the lock, leaving the master/process copies out of sync.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      7d3c1feb
    • A
      [DLM] fs/dlm/ast.c should #include "ast.h" · 8fa1de38
      Adrian Bunk 提交于
      Every file should include the headers containing the prototypes for
      it's global functions.
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      8fa1de38
    • P
      [DLM] Consolidate transport protocols · 6ed7257b
      Patrick Caulfield 提交于
      This patch consolidates the TCP & SCTP protocols for the DLM into a single file
      and makes it switchable at run-time (well, at least before the DLM actually
      starts up!)
      
      For RHEL5 this patch requires Neil Horman's patch that expands the in-kernel
      socket API but that has already been twice ACKed so it should be OK.
      
      The patch adds a new lowcomms.c file that replaces the existing lowcomms-sctp.c
      & lowcomms-tcp.c files.
      Signed-off-By: NPatrick Caulfield <pcaulfie@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      6ed7257b
    • P
      [DLM] Remove redundant assignment · fc7c44f0
      Patrick Caulfield 提交于
      This patch removes a redundant (and incorrect) assignment from compat_output
      Signed-Off-By: NPatrick Caulfield <pcaulfie@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      fc7c44f0
    • D
      [DLM] change lkid format · ce03f12b
      David Teigland 提交于
      A lock id is a uint32 and is used as an opaque reference to the lock.  For
      userland apps, the lkid is passed up, through libdlm, as the return value
      from a write() on the dlm device.  This created a problem when the high
      bit was 1, making the lkid look like an error.  This is fixed by changing
      how the lkid is composed.  The low 16 bits identified the hash bucket for
      the lock and the high 16 bits were a per-bucket counter (which eventually
      hit 0x8000 causing the problem).  These are simply swapped around; the
      number of hash table buckets is far below 0x8000, making all lkid's
      positive when viewed as signed.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      ce03f12b
    • D
      [DLM] interface for purge (2/2) · 72c2be77
      David Teigland 提交于
      Add code to accept purge commands from userland.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      72c2be77
    • D
      [DLM] add orphan purging code (1/2) · 8499137d
      David Teigland 提交于
      Add code for purging orphan locks.  A process can also purge all of its
      own non-orphan locks by passing a pid of zero.  Code already exists for
      processes to create persistent locks that become orphans when the process
      exits, but the complimentary capability for another process to then purge
      these orphans has been missing.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      8499137d
    • D
      [DLM] split create_message function · 7e4dac33
      David Teigland 提交于
      This splits the current create_message() function into two parts so that
      later patches can call the new lower-level _create_message() function when
      they don't have an rsb struct.  No functional change in this patch.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      7e4dac33
    • D
      [DLM] overlapping cancel and unlock · ef0c2bb0
      David Teigland 提交于
      Full cancel and force-unlock support.  In the past, cancel and force-unlock
      wouldn't work if there was another operation in progress on the lock.  Now,
      both cancel and unlock-force can overlap an operation on a lock, meaning there
      may be 2 or 3 operations in progress on a lock in parallel.  This support is
      important not only because cancel and force-unlock are explicit operations
      that an app can use, but both are used implicitly when a process exits while
      holding locks.
      
      Summary of changes:
      
      - add-to and remove-from waiters functions were rewritten to handle situations
        with more than one remote operation outstanding on a lock
      
      - validate_unlock_args detects when an overlapping cancel/unlock-force
        can be sent and when it needs to be delayed until a request/lookup
        reply is received
      
      - processing request/lookup replies detects when cancel/unlock-force
        occured during the op, and carries out the delayed cancel/unlock-force
      
      - manipulation of the "waiters" (remote operation) state of a lock moved under
        the standard rsb mutex that protects all the other lock state
      
      - the two recovery routines related to locks on the waiters list changed
        according to the way lkb's are now locked before accessing waiters state
      
      - waiters recovery detects when lkb's being recovered have overlapping
        cancel/unlock-force, and may not recover such locks
      
      - revert_lock (cancel) returns a value to distinguish cases where it did
        nothing vs cases where it actually did a cancel; the cancel completion ast
        should only be done when cancel did something
      
      - orphaned locks put on new list so they can be found later for purging
      
      - cancel must be called on a lock when making it an orphan
      
      - flag user locks (ENDOFLIFE) at the end of their useful life (to the
        application) so we can return an error for any further cancel/unlock-force
      
      - we weren't setting COMP/BAST ast flags if one was already set, so we'd lose
        either a completion or blocking ast
      
      - clear an unread bast on a lock that's become unlocked
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      ef0c2bb0
    • P
      [DLM] fix coverity-spotted stupidity · 03206727
      Patrick Caulfield 提交于
      Replacement patch to remove redundant code rather than moving it around.
      Signed-Off-By: NPatrick Caulfield <pcaulfie@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      03206727
    • P
      [DLM] Don't delete misc device if lockspace removal fails · 254da030
      Patrick Caulfield 提交于
      Currently if the lockspace removal fails the misc device associated with a
      lockspace is left deleted. After that there is no way to access the orphaned
      lockspace from userland.
      
      This patch recreates the misc device if th dlm_release_lockspace fails. I
      believe this is better than attempting to remove the lockspace first because
      that leaves an unattached device lying around. The potential gap in which there
      is no access to the lockspace between removing the misc device and recreating it
      is acceptable ... after all the application is trying to remove it, and only new
      users of the lockspace will be affected.
      Signed-Off-By: NPatrick Caulfield <pcaulfie@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      254da030
    • P
      [DLM] Fix uninitialised variable in receiving · 89adc934
      Patrick Caulfield 提交于
      The length of the second element of the kvec array was not initialised before
      being added to the first one. This could cause invalid lengths to be passed to
      kernel_recvmsg
      Signed-Off-By: NPatrick Caulfield <pcaulfie@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      89adc934
  5. 08 3月, 2007 1 次提交
  6. 13 2月, 2007 1 次提交
  7. 12 2月, 2007 1 次提交