1. 20 7月, 2011 1 次提交
  2. 12 5月, 2011 1 次提交
  3. 05 5月, 2011 1 次提交
  4. 22 3月, 2011 2 次提交
  5. 04 3月, 2011 1 次提交
  6. 20 2月, 2011 1 次提交
  7. 13 1月, 2011 1 次提交
    • S
      ceph: add dir_layout to inode · 6c0f3af7
      Sage Weil 提交于
      Add a ceph_dir_layout to the inode, and calculate dentry hash values based
      on the parent directory's specified dir_hash function.  This is needed
      because the old default Linux dcache hash function is extremely week and
      leads to a poor distribution of files among dir fragments.
      Signed-off-by: NSage Weil <sage@newdream.net>
      6c0f3af7
  8. 07 1月, 2011 1 次提交
  9. 08 11月, 2010 1 次提交
    • S
      ceph: fix rdcache_gen usage and invalidate · cd045cb4
      Sage Weil 提交于
      We used to use rdcache_gen to indicate whether we "might" have cached
      pages.  Now we just look at the mapping to determine that.  However, some
      old behavior remains from that transition.
      
      First, rdcache_gen == 0 no longer means we have no pages.  That can happen
      at any time (presumably when we carry FILE_CACHE).  We should not reset it
      to zero, and we should not check that it is zero.
      
      That means that the only purpose for rdcache_revoking is to resolve races
      between new issues of FILE_CACHE and an async invalidate.  If they are
      equal, we should invalidate.  On success, we decrement rdcache_revoking,
      so that it is no longer equal to rdcache_gen.  Similarly, if we success
      in doing a sync invalidate, set revoking = gen - 1.  (This is a small
      optimization to avoid doing unnecessary invalidate work and does not
      affect correctness.)
      Signed-off-by: NSage Weil <sage@newdream.net>
      cd045cb4
  10. 21 10月, 2010 2 次提交
    • S
      ceph: do not carry i_lock for readdir from dcache · efa4c120
      Sage Weil 提交于
      We were taking dcache_lock inside of i_lock, which introduces a dependency
      not found elsewhere in the kernel, complicationg the vfs locking
      scalability work.  Since we don't actually need it here anyway, remove
      it.
      
      We only need i_lock to test for the I_COMPLETE flag, so be careful to do
      so without dcache_lock held.
      Signed-off-by: NSage Weil <sage@newdream.net>
      efa4c120
    • Y
      ceph: factor out libceph from Ceph file system · 3d14c5d2
      Yehuda Sadeh 提交于
      This factors out protocol and low-level storage parts of ceph into a
      separate libceph module living in net/ceph and include/linux/ceph.  This
      is mostly a matter of moving files around.  However, a few key pieces
      of the interface change as well:
      
       - ceph_client becomes ceph_fs_client and ceph_client, where the latter
         captures the mon and osd clients, and the fs_client gets the mds client
         and file system specific pieces.
       - Mount option parsing and debugfs setup is correspondingly broken into
         two pieces.
       - The mon client gets a generic handler callback for otherwise unknown
         messages (mds map, in this case).
       - The basic supported/required feature bits can be expanded (and are by
         ceph_fs_client).
      
      No functional change, aside from some subtle error handling cases that got
      cleaned up in the refactoring process.
      Signed-off-by: NSage Weil <sage@newdream.net>
      3d14c5d2
  11. 17 9月, 2010 2 次提交
    • S
      ceph: only send one flushsnap per cap_snap per mds session · e835124c
      Sage Weil 提交于
      Sending multiple flushsnap messages is problematic because we ignore
      the response if the tid doesn't match, and the server may only respond to
      each one once.  It's also a waste.
      
      So, skip cap_snaps that are already on the flushing list, unless the caller
      tells us to resend (because we are reconnecting).
      Signed-off-by: NSage Weil <sage@newdream.net>
      e835124c
    • S
      ceph: fix cap_snap and realm split · ae00d4f3
      Sage Weil 提交于
      The cap_snap creation/queueing relies on both the current i_head_snapc
      _and_ the i_snap_realm pointers being correct, so that the new cap_snap
      can properly reference the old context and the new i_head_snapc can be
      updated to reference the new snaprealm's context.  To fix this, we:
      
       - move inodes completely to the new (split) realm so that i_snap_realm
         is correct, and
       - generate the new snapc's _before_ queueing the cap_snaps in
         ceph_update_snap_trace().
      Signed-off-by: NSage Weil <sage@newdream.net>
      ae00d4f3
  12. 25 8月, 2010 1 次提交
    • S
      ceph: maintain i_head_snapc when any caps are dirty, not just for data · 7d8cb26d
      Sage Weil 提交于
      We used to use i_head_snapc to keep track of which snapc the current epoch
      of dirty data was dirtied under.  It is used by queue_cap_snap to set up
      the cap_snap.  However, since we queue cap snaps for any dirty caps, not
      just for dirty file data, we need to keep a valid i_head_snapc anytime
      we have dirty|flushing caps.  This fixes a NULL pointer deref in
      queue_cap_snap when writing back dirty caps without data (e.g.,
      snaptest-authwb.sh).
      Signed-off-by: NSage Weil <sage@newdream.net>
      7d8cb26d
  13. 23 8月, 2010 1 次提交
    • S
      ceph: include dirty xattrs state in snapped caps · 4a625be4
      Sage Weil 提交于
      When we snapshot dirty metadata that needs to be written back to the MDS,
      include dirty xattr metadata.  Make the capsnap reference the encoded
      xattr blob so that it will be written back in the FLUSHSNAP op.
      
      Also fix the capsnap creation guard to include dirty auth or file bits,
      not just tests specific to dirty file data or file writes in progress
      (this fixes auth metadata writeback).
      Signed-off-by: NSage Weil <sage@newdream.net>
      4a625be4
  14. 04 8月, 2010 1 次提交
  15. 03 8月, 2010 2 次提交
  16. 02 8月, 2010 4 次提交
  17. 30 5月, 2010 1 次提交
  18. 28 5月, 2010 1 次提交
  19. 18 5月, 2010 4 次提交
  20. 04 5月, 2010 1 次提交
  21. 14 4月, 2010 1 次提交
    • S
      ceph: queue_cap_snap should always queue dirty context · fc837c8f
      Sage Weil 提交于
      This simplifies the calling convention, and fixes a bug where we queue a
      capsnap with a context other than i_head_snapc (the one that matches the
      dirty pages).  The result was a BUG at fs/ceph/caps.c:2178 on writeback
      completion when a capsnap matching the writeback snapc could not be found.
      Signed-off-by: NSage Weil <sage@newdream.net>
      fc837c8f
  22. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  23. 06 3月, 2010 1 次提交
  24. 05 3月, 2010 1 次提交
    • Y
      ceph: reset osd after relevant messages timed out · 422d2cb8
      Yehuda Sadeh 提交于
      This simplifies the process of timing out messages. We
      keep lru of current messages that are in flight. If a
      timeout has passed, we reset the osd connection, so that
      messages will be retransmitted.  This is a failsafe in case
      we hit some sort of problem sending out message to the OSD.
      Normally, we'll get notification via an updated osdmap if
      there are problems.
      
      If a request is older than the keepalive timeout, send a
      keepalive to ensure we detect any breaks in the TCP connection.
      Signed-off-by: NYehuda Sadeh <yehuda@hq.newdream.net>
      Signed-off-by: NSage Weil <sage@newdream.net>
      422d2cb8
  25. 02 3月, 2010 1 次提交
    • S
      ceph: fix flush_dirty_caps race with caps migration · e9964c10
      Sage Weil 提交于
      The flush_dirty_caps() used to loop over the first entry of the cap_dirty
      dirty list on the assumption that after calling ceph_check_caps() it would
      be removed from the list.  This isn't true for caps that are being
      migrated between MDSs, where we've received the EXPORT but not the IMPORT.
      
      Instead, do a safe list iteration, and pin the next inode on the list via
      the CEPH_I_NOFLUSH flag.
      Signed-off-by: NSage Weil <sage@newdream.net>
      e9964c10
  26. 24 2月, 2010 1 次提交
  27. 18 2月, 2010 2 次提交
    • S
      ceph: fix iterate_caps removal race · 7c1332b8
      Sage Weil 提交于
      We need to be able to iterate over all caps on a session with a
      possibly slow callback on each cap.  To allow this, we used to
      prevent cap reordering while we were iterating.  However, we were
      not safe from races with removal: removing the 'next' cap would
      make the next pointer from list_for_each_entry_safe be invalid,
      and cause a lock up or similar badness.
      
      Instead, we keep an iterator pointer in the session pointing to
      the current cap.  As before, we avoid reordering.  For removal,
      if the cap isn't the current cap we are iterating over, we are
      fine.  If it is, we clear cap->ci (to mark the cap as pending
      removal) but leave it in the session list.  In iterate_caps, we
      can safely finish removal and get the next cap pointer.
      
      While we're at it, clean up put_cap to not take a cap reservation
      context, as it was never used.
      Signed-off-by: NSage Weil <sage@newdream.net>
      7c1332b8
    • S
      ceph: clean up readdir caps reservation · 85ccce43
      Sage Weil 提交于
      Use a global counter for the minimum number of allocated caps instead of
      hard coding a check against readdir_max.  This takes into account multiple
      client instances, and avoids examining the superblock mount options when a
      cap is dropped.
      Signed-off-by: NSage Weil <sage@newdream.net>
      85ccce43
  28. 17 2月, 2010 1 次提交
  29. 12 2月, 2010 1 次提交