26 Nov, 2008

1 commit

  • this warning:

    fs/dlm/netlink.c: In function ‘dlm_timeout_warn’:
    fs/dlm/netlink.c:131: warning: ‘send_skb’ may be used uninitialized in this function

    triggers because GCC does not recognize the (correct) error flow
    between prepare_data() and send_skb.

    Annotate it.

    Signed-off-by: Ingo Molnar
    Signed-off-by: David S. Miller

    Ingo Molnar
     

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
     

05 Sep, 2008

2 commits

  • sparc32:

    fs/dlm/config.c:397: error: expected identifier or '(' before '{' token
    fs/dlm/config.c: In function 'drop_node':
    fs/dlm/config.c:589: warning: initialization from incompatible pointer type
    fs/dlm/config.c:589: warning: initialization from incompatible pointer type
    fs/dlm/config.c: In function 'release_node':
    fs/dlm/config.c:601: warning: initialization from incompatible pointer type
    fs/dlm/config.c:601: warning: initialization from incompatible pointer type
    fs/dlm/config.c: In function 'show_node':
    fs/dlm/config.c:717: warning: initialization from incompatible pointer type
    fs/dlm/config.c:717: warning: initialization from incompatible pointer type
    fs/dlm/config.c: In function 'store_node':
    fs/dlm/config.c:726: warning: initialization from incompatible pointer type
    fs/dlm/config.c:726: warning: initialization from incompatible pointer type

    Cc: Christine Caulfield
    Signed-off-by: Andrew Morton
    Signed-off-by: David Teigland

    Andrew Morton
     
  • BLK from recent pushdown is not needed.

    Signed-off-by: David Teigland

    David Teigland
     

03 Sep, 2008

1 commit


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
     

14 Aug, 2008

2 commits

  • Add a dlm_ prefix to the struct names in config.c. This resolves a
    conflict with struct node in particular, when include/linux/node.h
    happens to be included.

    Reported-by: Andrew Morton
    Signed-off-by: David Teigland

    David Teigland
     
  • A couple of unlikely error conditions were missing a kfree on the error
    exit path.

    Reported-by: Juha Leppanen
    Signed-off-by: David Teigland

    David Teigland
     

29 Jul, 2008

1 commit


26 Jul, 2008

1 commit

  • Use a special error value FILE_LOCK_DEFERRED to mean that a locking
    operation returned asynchronously. This is returned by

    posix_lock_file() for sleeping locks to mean that the lock has been
    queued on the block list, and will be woken up when it might become
    available and needs to be retried (either fl_lmops->fl_notify() is
    called or fl_wait is woken up).

    f_op->lock() to mean either the above, or that the filesystem will
    call back with fl_lmops->fl_grant() when the result of the locking
    operation is known. The filesystem can do this for sleeping as well
    as non-sleeping locks.

    This is to make sure, that return values of -EAGAIN and -EINPROGRESS by
    filesystems are not mistaken to mean an asynchronous locking.

    This also makes error handling in fs/locks.c and lockd/svclock.c slightly
    cleaner.

    Signed-off-by: Miklos Szeredi
    Cc: Trond Myklebust
    Cc: "J. Bruce Fields"
    Cc: Matthew Wilcox
    Cc: David Teigland
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     

18 Jul, 2008

3 commits

  • The configfs operations ->make_item() and ->make_group() currently
    return a new item/group. A return of NULL signifies an error. Because
    of this, -ENOMEM is the only return code bubbled up the stack.

    Multiple folks have requested the ability to return specific error codes
    when these operations fail. This patch adds that ability by changing the
    ->make_item/group() ops to return ERR_PTR() values. These errors are
    bubbled up appropriately. NULL returns are changed to -ENOMEM for
    compatibility.

    Also updated are the in-kernel users of configfs.

    This is a rework of reverted commit 11c3b79218390a139f2d474ee1e983a672d5839a.

    Signed-off-by: Joel Becker

    Joel Becker
     
  • This reverts commit 11c3b79218390a139f2d474ee1e983a672d5839a. The code
    will move to PTR_ERR().

    Signed-off-by: Joel Becker

    Joel Becker
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
    [PATCH] ocfs2: fix oops in mmap_truncate testing
    configfs: call drop_link() to cleanup after create_link() failure
    configfs: Allow ->make_item() and ->make_group() to return detailed errors.
    configfs: Fix failing mkdir() making racing rmdir() fail
    configfs: Fix deadlock with racing rmdir() and rename()
    configfs: Make configfs_new_dirent() return error code instead of NULL
    configfs: Protect configfs_dirent s_links list mutations
    configfs: Introduce configfs_dirent_lock
    ocfs2: Don't snprintf() without a format.
    ocfs2: Fix CONFIG_OCFS2_DEBUG_FS #ifdefs
    ocfs2/net: Silence build warnings on sparc64
    ocfs2: Handle error during journal load
    ocfs2: Silence an error message in ocfs2_file_aio_read()
    ocfs2: use simple_read_from_buffer()
    ocfs2: fix printk format warnings with OCFS2_FS_STATS=n
    [PATCH 2/2] ocfs2: Instrument fs cluster locks
    [PATCH 1/2] ocfs2: Add CONFIG_OCFS2_FS_STATS config option

    Linus Torvalds
     

15 Jul, 2008

6 commits

  • Jonathan Corbet
     
  • The configfs operations ->make_item() and ->make_group() currently
    return a new item/group. A return of NULL signifies an error. Because
    of this, -ENOMEM is the only return code bubbled up the stack.

    Multiple folks have requested the ability to return specific error codes
    when these operations fail. This patch adds that ability by changing the
    ->make_item/group() ops to return an int.

    Also updated are the in-kernel users of configfs.

    Signed-off-by: Joel Becker

    Joel Becker
     
  • gcc 4.3.0 correctly emits the following warning.
    search_rsb_list does not *r_ret if no dlm_rsb is found
    and _search_rsb may pass the uninitialized value upstream
    on the error path when both calls to search_rsb_list
    return non-zero error.

    The fix sets *r_ret to NULL on search_rsb_list's not-found path.

    Signed-off-by: Benny Halevy
    Signed-off-by: David Teigland

    Benny Halevy
     
  • It seems that `sock' allocated by sock_create_kern in
    tcp_connect_to_sock() of dlm/fs/lowcomms.c is not released if
    dlm_nodeid_to_addr an error.

    Acked-by: Christine Caulfield
    Signed-off-by: Masatake YAMATO
    Signed-off-by: David Teigland

    Masatake YAMATO
     
  • The fix in commit 3650925893469ccb03dbcc6a440c5d363350f591 was addressing
    the case of a granted PR lock with waiting PR and CW locks. It's a
    special case that requires forcing a CW bast. However, that forced CW
    bast was incorrectly applying to a second condition where the granted
    lock was CW. So, the holder of a CW lock could receive an extraneous CW
    bast instead of a PR bast. This fix narrows the original special case to
    what was intended.

    Signed-off-by: David Teigland

    David Teigland
     
  • If `device_write' method is called via "dlm-control",
    file->private_data is NULL. (See ctl_device_open() in
    user.c. ) Through proc->flags is read.

    Signed-off-by: Masatake YAMATO
    Signed-off-by: David Teigland

    Masatake YAMATO
     

21 Jun, 2008

1 commit


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

1 commit

  • a) in device_write(): add sentinel NUL byte, making sure that lspace.name will
    be NUL-terminated
    b) in compat_input() be keep it simple about the amounts of data we are copying.

    Signed-off-by: Al Viro
    Signed-off-by: David Teigland

    Al Viro