1. 28 Jul, 2010 1 commit
  2. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      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.
      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
      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
      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
      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: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
  3. 04 Dec, 2009 2 commits
  4. 05 Sep, 2009 1 commit
  5. 30 Jul, 2009 1 commit
  6. 21 Jun, 2009 1 commit
  7. 09 Jun, 2009 1 commit
  8. 23 May, 2009 1 commit
    • Mike Christie's avatar
      [SCSI] iscsi: pass ep connect shost · 10eb0f01
      Mike Christie authored
      When we create the tcp/ip connection by calling ep_connect, we currently
      just go by the routing table info.
      I think there are two problems with this.
      1. Some drivers do not have access to a routing table. Some drivers like
      qla4xxx do not even know about other ports.
      2. If you have two initiator ports on the same subnet, the user may have
      set things up so that session1 was supposed to be run through port1. and
      session2 was supposed to be run through port2. It looks like we could
      end with both sessions going through one of the ports.
      Fixes for cxgb3i from Karen Xie.
      Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
  9. 15 May, 2009 1 commit
    • Andrew Vasquez's avatar
      [SCSI] fc-transport: Close state transition-window during rport deletion. · 9a1a69a1
      Andrew Vasquez authored
      Andrew Vasquez wrote:
      > fc-transport: Close state transition-window during rport deletion.
      > After an rport's state has transitioned to FC_PORTSTATE_BLOCKED,
      > but, prior to making the upcall to 'block' the scsi-target
      > associated with an rport, queued commands can recycle and
      > ultimately run out of retries causing failures to propagate to
      > upper-level drivers.  Close this transition-window by returning
      > the non-'retries' modifying DID_IMM_RETRY status for submitted
      > I/Os.
      The same can happen for iscsi when transitioning from logged in
      to failed and blocking the sdevs.
      This patch converts iscsi and fc's transitions back to use DID_IMM_RETRY
      instead of DID_TRANSPORT_DISRUPTED which has a limited number of retries
      that we do not want to use for handling this race.
      Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
      [Addition of iscsi and fc port online devloss case conversion by Mike Christie]
      Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
  10. 13 Mar, 2009 2 commits
  11. 06 Feb, 2009 1 commit
    • Pablo Neira Ayuso's avatar
      netlink: change return-value logic of netlink_broadcast() · ff491a73
      Pablo Neira Ayuso authored
      Currently, netlink_broadcast() reports errors to the caller if no
      messages at all were delivered:
      1) If, at least, one message has been delivered correctly, returns 0.
      2) Otherwise, if no messages at all were delivered due to skb_clone()
         failure, return -ENOBUFS.
      3) Otherwise, if there are no listeners, return -ESRCH.
      With this patch, the caller knows if the delivery of any of the
      messages to the listeners have failed:
      1) If it fails to deliver any message (for whatever reason), return
      2) Otherwise, if all messages were delivered OK, returns 0.
      3) Otherwise, if no listeners, return -ESRCH.
      In the current ctnetlink code and in Netfilter in general, we can add
      reliable logging and connection tracking event delivery by dropping the
      packets whose events were not successfully delivered over Netlink. Of
      course, this option would be settable via /proc as this approach reduces
      performance (in terms of filtered connections per seconds by a stateful
      firewall) but providing reliable logging and event delivery (for
      conntrackd) in return.
      This patch also changes some clients of netlink_broadcast() that
      may report ENOBUFS errors via printk. This error handling is not
      of any help. Instead, the userspace daemons that are listening to
      those netlink messages should resync themselves with the kernel-side
      if they hit ENOBUFS.
      BTW, netlink_broadcast() clients include those that call
      cn_netlink_send(), nlmsg_multicast() and genlmsg_multicast() since they
      internally call netlink_broadcast() and return its error value.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  12. 02 Jan, 2009 1 commit
  13. 13 Oct, 2008 3 commits
  14. 03 Oct, 2008 1 commit
    • James Smart's avatar
      [SCSI] scsi_host_lookup: error returns and NULL pointers · 315cb0ad
      James Smart authored
      This patch cleans up the behavior of scsi_host_lookup().
      The original implementation attempted to use the dual role of
      either returning a pointer value, or a negative error code.
      User's needed to use IS_ERR() to check the result. Additionally,
      the IS_ERR() macro never checks for when a NULL pointer was
      returned, so a NULL pointer actually passes with a success case.
      Note: scsi_host_get(), used by scsi_host_lookup(), can return
      a NULL pointer.
      Talk about a mudhole for the unitiated to step into....
      This patch converts scsi_host_lookup() to return either NULL
      or a valid pointer. The consumers were updated for the change.
      Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
  15. 21 Jul, 2008 2 commits
  16. 12 Jul, 2008 12 commits
  17. 19 Apr, 2008 1 commit
  18. 05 Mar, 2008 1 commit
  19. 27 Feb, 2008 1 commit
  20. 22 Feb, 2008 1 commit
  21. 07 Feb, 2008 4 commits