1. 18 5月, 2010 1 次提交
  2. 12 5月, 2010 2 次提交
  3. 04 5月, 2010 2 次提交
  4. 14 4月, 2010 1 次提交
    • S
      ceph: use separate class for ceph sockets' sk_lock · a6a5349d
      Sage Weil 提交于
      Use a separate class for ceph sockets to prevent lockdep confusion.
      Because ceph sockets only get passed kernel pointers, there is no
      dependency from sk_lock -> mmap_sem.  If we share the same class as other
      sockets, lockdep detects a circular dependency from
      
      	mmap_sem (page fault) -> fs mutex -> sk_lock -> mmap_sem
      
      because dependencies are noted from both ceph and user contexts.  Using
      a separate class prevents the sk_lock(ceph) -> mmap_sem dependency and
      makes lockdep happy.
      Signed-off-by: NSage Weil <sage@newdream.net>
      a6a5349d
  5. 03 4月, 2010 1 次提交
  6. 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
  7. 23 3月, 2010 2 次提交
    • S
      ceph: avoid reopening osd connections when address hasn't changed · 87b315a5
      Sage Weil 提交于
      We get a fault callback on _every_ tcp connection fault.  Normally, we
      want to reopen the connection when that happens.  If the address we have
      is bad, however, and connection attempts always result in a connection
      refused or similar error, explicitly closing and reopening the msgr
      connection just prevents the messenger's backoff logic from kicking in.
      The result can be a console full of
      
      [ 3974.417106] ceph: osd11 10.3.14.138:6800 connection failed
      [ 3974.423295] ceph: osd11 10.3.14.138:6800 connection failed
      [ 3974.429709] ceph: osd11 10.3.14.138:6800 connection failed
      
      Instead, if we get a fault, and have outstanding requests, but the osd
      address hasn't changed and the connection never successfully connected in
      the first place, do nothing to the osd connection.  The messenger layer
      will back off and retry periodically, because we never connected and thus
      the lossy bit is not set.
      
      Instead, touch each request's r_stamp so that handle_timeout can tell the
      request is still alive and kicking.
      Signed-off-by: NSage Weil <sage@newdream.net>
      87b315a5
    • S
      ceph: fix connection fault con_work reentrancy problem · 3c3f2e32
      Sage Weil 提交于
      The messenger fault was clearing the BUSY bit, for reasons unclear.  This
      made it possible for the con->ops->fault function to reopen the connection,
      and requeue work in the workqueue--even though the current thread was
      already in con_work.
      
      This avoids a problem where the client busy loops with connection failures
      on an unreachable OSD, but doesn't address the root cause of that problem.
      Signed-off-by: NSage Weil <sage@newdream.net>
      3c3f2e32
  8. 21 3月, 2010 1 次提交
    • S
      ceph: fix authenticator timeout · 63733a0f
      Sage Weil 提交于
      We were failing to reconnect to services due to an old authenticator, even
      though we had the new ticket, because we weren't properly retrying the
      connect handshake, because we were calling an old/incorrect helper that
      left in_base_pos incorrect.  The result was a failure to reconnect to the
      OSD or MDS (with an authentication error) if the MDS restarted after the
      service had been up a few hours (long enough for the original authenticator
      to be invalid).  This was only a problem if the AUTH_X authentication was
      enabled.
      
      Now that the 'negotiate' and 'connect' stages are fully separated, we
      should use the prepare_read_connect() helper instead, and remove the
      obsolete one.
      Signed-off-by: NSage Weil <sage@newdream.net>
      63733a0f
  9. 02 3月, 2010 2 次提交
  10. 26 2月, 2010 2 次提交
  11. 24 2月, 2010 1 次提交
  12. 17 2月, 2010 2 次提交
    • S
      ceph: cancel delayed work when closing connection · 91e45ce3
      Sage Weil 提交于
      This ensures that if/when we reopen the connection, we can requeue work on
      the connection immediately, without waiting for an old timer to expire.
      Queue new delayed work inside con->mutex to avoid any race.
      
      This fixes problems with clients failing to reconnect to the MDS due to
      the client_reconnect message arriving too late (due to waiting for an old
      delayed work timeout to expire).
      Signed-off-by: NSage Weil <sage@newdream.net>
      91e45ce3
    • S
      ceph: allow connection to be reopened by fault callback · e2663ab6
      Sage Weil 提交于
      Fix the messenger to allow a ceph_con_open() during the fault callback.
      Previously the work wasn't getting queued on the connection because the
      fault path avoids requeued work (normally spurious).  Loop on reopening by
      checking for the OPENING state bit.
      
      This fixes OSD reconnects when a TCP connection drops.
      Signed-off-by: NSage Weil <sage@newdream.net>
      e2663ab6
  13. 14 2月, 2010 1 次提交
  14. 11 2月, 2010 1 次提交
  15. 30 1月, 2010 1 次提交
  16. 26 1月, 2010 4 次提交
  17. 15 1月, 2010 1 次提交
  18. 24 12月, 2009 4 次提交
    • S
      ceph: support ceph_pagelist for message payload · 58bb3b37
      Sage Weil 提交于
      The ceph_pagelist is a simple list of whole pages, strung together via
      their lru list_head.  It facilitates encoding to a "buffer" of unknown
      size.  Allow its use in place of the ceph_msg page vector.
      
      This will be used to fix the huge buffer preallocation woes of MDS
      reconnection.
      Signed-off-by: NSage Weil <sage@newdream.net>
      58bb3b37
    • S
      ceph: add feature bits to connection handshake (protocol change) · 04a419f9
      Sage Weil 提交于
      Define supported and required feature set.  Fail connection if the server
      requires features we do not support (TAG_FEATURES), or if the server does
      not support features we require.
      Signed-off-by: NSage Weil <sage@newdream.net>
      04a419f9
    • S
      ceph: control access to page vector for incoming data · 350b1c32
      Sage Weil 提交于
      When we issue an OSD read, we specify a vector of pages that the data is to
      be read into.  The request may be sent multiple times, to multiple OSDs, if
      the osdmap changes, which means we can get more than one reply.
      
      Only read data into the page vector if the reply is coming from the
      OSD we last sent the request to.  Keep track of which connection is using
      the vector by taking a reference.  If another connection was already
      using the vector before and a new reply comes in on the right connection,
      revoke the pages from the other connection.
      Signed-off-by: NSage Weil <sage@newdream.net>
      350b1c32
    • S
      ceph: use connection mutex to protect read and write stages · ec302645
      Sage Weil 提交于
      Use a single mutex (previously out_mutex) to protect both read and write
      activity from concurrent ceph_con_* calls.  Drop the mutex when doing
      callbacks to avoid nested locking (the callback may need to call something
      like ceph_con_close).
      Signed-off-by: NSage Weil <sage@newdream.net>
      ec302645
  19. 22 12月, 2009 7 次提交
  20. 08 12月, 2009 2 次提交
  21. 21 11月, 2009 1 次提交