14 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    ceph: ensure prealloc_blob is in place when removing xattr
    rbd: initialize snap_rwsem in rbd_add()
    ceph: enable/disable dentry complete flags via mount option
    vfs: export symbol d_find_any_alias()
    ceph: always initialize the dentry in open_root_dentry()
    libceph: remove useless return value for osd_client __send_request()
    ceph: avoid iput() while holding spinlock in ceph_dir_fsync
    ceph: avoid useless dget/dput in encode_fh
    ceph: dereference pointer after checking for NULL
    crush: fix force for non-root TAKE
    ceph: remove unnecessary d_fsdata conditional checks
    ceph: Use kmemdup rather than duplicating its implementation

    Fix up conflicts in fs/ceph/super.c (d_alloc_root() failure handling vs
    always initialize the dentry in open_root_dentry)

    Linus Torvalds
     

13 Jan, 2012

2 commits

  • In __ceph_build_xattrs_blob(), if a ceph inode's extended attributes
    are marked dirty, all attributes recorded in its rb_tree index are
    formatted into a "blob" buffer. The target buffer is recorded in
    ceph_inode->i_xattrs.prealloc_blob, and it is expected to exist and
    be of sufficient size to hold the attributes.

    The extended attributes are marked dirty in two cases: when a new
    attribute is added to the inode; or when one is removed. In the
    former case work is done to ensure the prealloc_blob buffer is
    properly set up, but in the latter it is not.

    Change the logic in ceph_removexattr() so it matches what is
    done in ceph_setxattr(). Note that this is done in a way that
    keeps the two blocks of code nearly identical, in anticipation
    of a subsequent patch that encapsulates some of this logic into
    one or more helper routines.

    Signed-off-by: Alex Elder
    Signed-off-by: Sage Weil

    Alex Elder
     
  • Enable/disable use of the dentry dir 'complete' flag via a mount option.
    This lets the admin control whether ceph uses the dcache to satisfy
    negative lookups or readdir when it has the entire directory contents in
    its cache.

    This is purely a performance optimization; correctness is guaranteed
    whether it is enabled or not.

    Reviewed-by: Christoph Hellwig
    Signed-off-by: Sage Weil

    Sage Weil
     

12 Jan, 2012

1 commit

  • When open_root_dentry() gets a dentry via d_obtain_alias() it does
    not get initialized. If the dentry obtained came from the cache,
    this is OK. But if not, the result is an improperly initialized
    dentry.

    To fix this, call ceph_init_dentry() regardless of which path
    produced the dentry. That function returns immediately for a dentry
    that is already initialized, it is safe to use either way.

    (Credit to Sage, who suggested this fix.)

    Signed-off-by: Alex Elder

    Alex Elder
     

11 Jan, 2012

4 commits


10 Jan, 2012

1 commit


07 Jan, 2012

1 commit


04 Jan, 2012

6 commits


30 Dec, 2011

1 commit

  • Ceph attempts to use the dcache to satisfy negative lookups and readdir
    when the entire directory contents are in cache. Disable this behavior
    until lingering bugs in this code are shaken out; we'll re-enable these
    hooks once things are fully stable.

    Signed-off-by: Sage Weil

    Sage Weil
     

14 Dec, 2011

2 commits


08 Dec, 2011

1 commit

  • We have been using i_lock to protect all kinds of data structures in the
    ceph_inode_info struct, including lists of inodes that we need to iterate
    over while avoiding races with inode destruction. That requires grabbing
    a reference to the inode with the list lock protected, but igrab() now
    takes i_lock to check the inode flags.

    Changing the list lock ordering would be a painful process.

    However, using a ceph-specific i_ceph_lock in the ceph inode instead of
    i_lock is a simple mechanical change and avoids the ordering constraints
    imposed by igrab().

    Reported-by: Amon Ott
    Signed-off-by: Sage Weil

    Sage Weil
     

03 Dec, 2011

1 commit


12 Nov, 2011

1 commit

  • Set up d_fsdata on the root dentry. This fixes a NULL pointer dereference
    in ceph_d_prune on umount. It also means we can eventually strip out all
    of the conditional checks on d_fsdata because it is now set unconditionally
    (prior to setting up the d_ops).

    Fix the ceph_d_prune debug print while we're here.

    Signed-off-by: Sage Weil

    Sage Weil
     

06 Nov, 2011

4 commits

  • If we queue a work item that calls iput(), make sure we ihold() before
    attempting to queue work. Otherwise our queued work might miraculously run
    before we notice the queue_work() succeeded and call ihold(), allowing the
    inode to be destroyed.

    That is, instead of

    if (queue_work(...))
    ihold();

    we need to do

    ihold();
    if (!queue_work(...))
    iput();

    Reported-by: Amon Ott
    Signed-off-by: Sage Weil

    Sage Weil
     
  • Quiet the sparse noise:

    warning: symbol 'create_fs_client' was not declared. Should it be static?
    warning: symbol 'destroy_fs_client' was not declared. Should it be static?

    Signed-off-by: H Hartley Sweeten
    Cc: Sage Weil
    ceph-devel@vger.kernel.org
    Signed-off-by: Sage Weil

    H Hartley Sweeten
     
  • Quiet the following sparse noise:

    warning: symbol 'get_nonsnap_parent' was not declared. Should it be static?
    warning: symbol 'done_closing_sessions' was not declared. Should it be static?

    Local functions don't need external visability. Make them static.

    Signed-off-by: H Hartley Sweeten
    Cc: Sage Weil
    Signed-off-by: Sage Weil

    H Hartley Sweeten
     
  • We used to use a flag on the directory inode to track whether the dcache
    contents for a directory were a complete cached copy. Switch to a dentry
    flag CEPH_D_COMPLETE that is safely updated by ->d_prune().

    Signed-off-by: Sage Weil

    Sage Weil
     

04 Nov, 2011

1 commit


02 Nov, 2011

1 commit


26 Oct, 2011

11 commits


10 Sep, 2011

1 commit