20 Jul, 2011

2 commits


17 Jul, 2011

1 commit


14 Jun, 2011

2 commits


08 Jun, 2011

4 commits

  • If we request a lock and then abort (e.g., ^C), we need to send a matching
    unlock request to the MDS to unwind our lock attempt to avoid indefinitely
    blocking other clients.

    Reported-by: Brian Chrisman
    Signed-off-by: Sage Weil

    Sage Weil
     
  • Getting ENOENT is equivalent to reading 0 bytes. Make that correction
    before setting up the hit_stripe and was_short flags.

    Fixes the following case:
    dd if=/dev/zero of=/mnt/fs_depot/dd3 bs=1 seek=1048576 count=0
    dd if=/mnt/fs_depot/dd3 of=/root/ddout1 skip=8 bs=500 count=2 iflag=direct

    Reported-by: Henry C Chang
    Signed-off-by: Sage Weil

    Sage Weil
     
  • If we get a short read from the OSD because the object is small, we need to
    zero the remainder of the buffer. For O_DIRECT reads, the attempted range
    is not trimmed to i_size by the VFS, so we were actually looping
    indefinitely.

    Fix by trimming by i_size, and the unconditionally zeroing the trailing
    range.

    Reported-by: Jeff Wu
    Signed-off-by: Sage Weil

    Sage Weil
     
  • We should use ihold whenever we already have a stable inode ref, even
    when we aren't holding i_lock. This avoids adding new and unnecessary
    locking dependencies.

    Signed-off-by: Sage Weil

    Sage Weil
     

25 May, 2011

3 commits

  • In e9964c10 we change cap flushing to do a delicate dance because some
    inodes on the cap_dirty list could be in a migrating state (got EXPORT but
    not IMPORT) in which we couldn't actually flush and move from
    dirty->flushing, breaking the while (!empty) { process first } loop
    structure. It worked for a single sync thread, but was not reentrant and
    triggered infinite loops when multiple syncers came along.

    Instead, move inodes with dirty to a separate cap_dirty_migrating list
    when in the limbo export-but-no-import state, allowing us to go back to
    the simple loop structure (which was reentrant). This is cleaner and more
    robust.

    Audited the cap_dirty users and this looks fine:
    list_empty(&ci->i_dirty_item) is still a reliable indicator of whether we
    have dirty caps (which list we're on is irrelevant) and list_del_init()
    calls still do the right thing.

    Signed-off-by: Sage Weil

    Sage Weil
     
  • If we get the inode from the MDS, we have a reference in req; don't do a
    fresh lookup.

    Signed-off-by: Sage Weil

    Sage Weil
     
  • If we are unable to locate an inode by ino, ask the MDS using the new
    LOOKUPINO command.

    Signed-off-by: Sage Weil

    Sage Weil
     

20 May, 2011

7 commits


12 May, 2011

3 commits


05 May, 2011

1 commit


04 May, 2011

2 commits


08 Apr, 2011

1 commit


31 Mar, 2011

2 commits


30 Mar, 2011

1 commit


29 Mar, 2011

1 commit

  • Fix the incorrect use of igrab() inside the i_lock in NFS and Ceph‥

    If we are already holding the i_lock, we have a reference to the
    inode so we can safely use ihold() to gain an extra reference. This
    avoids hangs due to lock recursion on the i_lock now that the
    inode_lock is gone and igrab() uses the i_lock itself.

    Signed-off-by: Dave Chinner
    Cc: Al Viro
    Cc: linux-fsdevel@vger.kernel.org
    Cc: Ryan Mallon
    Signed-off-by: Linus Torvalds

    Dave Chinner
     

26 Mar, 2011

1 commit

  • The release method for mds connections uses a backpointer to the
    mds_client, so we need to flush the workqueue of any pending work (and
    ceph_connection references) prior to freeing the mds_client. This fixes
    an oops easily triggered under UML by

    while true ; do mount ... ; umount ... ; done

    Also fix an outdated comment: the flush in ceph_destroy_client only flushes
    OSD connections out. This bug is basically an artifact of the ceph ->
    ceph+libceph conversion.

    Signed-off-by: Sage Weil

    Sage Weil
     

22 Mar, 2011

6 commits


16 Mar, 2011

1 commit

  • d_move puts the renamed dentry at the end of d_subdirs, screwing with our
    cached dentry directory offsets. We were just clearing I_COMPLETE to avoid
    any possibility of trouble. However, assigning the renamed dentry an
    offset at the end of the directory (to match it's new d_subdirs position)
    is sufficient to maintain correct behavior and hold onto I_COMPLETE.

    This is especially important for workloads like rsync, which renames files
    into place. Before, we would lose I_COMPLETE and do MDS lookups for each
    file. With this patch we only talk to the MDS on create and rename.

    Signed-off-by: Sage Weil

    Sage Weil
     

10 Mar, 2011

1 commit


05 Mar, 2011

1 commit