1. 17 6月, 2010 1 次提交
  2. 11 4月, 2010 2 次提交
  3. 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
  4. 28 3月, 2010 1 次提交
  5. 09 3月, 2010 1 次提交
    • G
      [SCSI] scsi_transport_fc: Fix synchronization issue while deleting vport · 0d9dc7c8
      Gal Rosen 提交于
      The issue occur while deleting 60 virtual ports through the sys
      interface /sys/class/fc_vports/vport-X/vport_delete. It happen while in
      a mistake each request sent twice for the same vport. This interface is
      asynchronous, entering the delete request into a work queue, allowing
      more than one request to enter to the delete work queue. The result is a
      NULL pointer. The first request already delete the vport, while the
      second request got a pointer to the vport before the device destroyed.
      Re-create vport later cause system freeze.
      
      Solution: Check vport flags before entering the request to the work queue.
      
      [jejb: fixed int<->long problem on spinlock flags variable]
      Signed-off-by: NGal Rosen <galr@storwize.com>
      Acked-by: NJames Smart <james.smart@emulex.com>
      Cc: Stable Tree <stable@kernel.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      0d9dc7c8
  6. 19 1月, 2010 1 次提交
    • H
      [SCSI] scsi_transport_fc: Remove capping from dev_loss_tmo · f2818663
      Hannes Reinecke 提交于
      Currently dev_loss_tmo is capped by SCSI_DEVICE_BLOCK_MAX_TIMEOUT.
      This causes problem with multipathing when the 'no_path_retry' setting
      exceeds the dev_loss_tmo setting, as then the system might run into
      a deadlock when all paths have been removed temporarily for longer
      than dev_loss_tmo.
      The principal reasons for the capping has been that we should
      not allow a remote port to remain in status 'blocked' indefinitely,
      so the capping is there to ensure that the port status is being reset
      eventually.
      However, the fast_io_fail_tmo will also move the remote port out of
      the 'blocked' state, so for any HBA driver implementing both the
      capping should really be on the fast_io_fail_tmo, and not on the
      dev_loss_tmo.
      This patch implements just that, ie the fast_io_fail_tmo is capped
      to SCSI_DEVICE_BLOCK_TIMEOUT and the capping is removed from
      dev_loss_tmo when fast_io_fail_tmo is set.
      This allows us to synchronize the dev_loss_tmo setting to the
      'no_path_retry' setting from multipathing thus avoiding the deadlock.
      Signed-off-by: NHannes Reinecke <hare@suse.de>
      Acked-by: NJames Smart  <james.smart@emulex.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      f2818663
  7. 18 1月, 2010 1 次提交
  8. 10 12月, 2009 1 次提交
  9. 05 12月, 2009 2 次提交
  10. 07 11月, 2009 1 次提交
    • B
      [SCSI] scsi_transport_fc: Fix WARN message for FC passthru failure paths · 61ec33eb
      Brian King 提交于
      There are three error paths in the FC passthru code where
      job->reply->reply_payload_rcv_len does not get initialized,
      resulting in the WARN_ON in fc_bsg_jobdone going off. This patch
      fixes this. An example of one of the WARN_ON messages seen:
      
      Badness at drivers/scsi/scsi_transport_fc.c:3424
      NIP: d000000000bf21ac LR: d000000000bf2684 CTR: c0000000003f753c
      REGS: c00000004eb03430 TRAP: 0700   Not tainted  (2.6.32-rc4-git)
      MSR: 8000000000029032 <EE,ME,CE,IR,DR>  CR: 24008444  XER: 00000012
      TASK = c00000004c3fc9c0[3243] 'fcping' THREAD: c00000004eb00000 CPU: 0
      GPR00: 0000000000000001 c00000004eb036b0 d000000000c01da0 000000004bf17fc0
      GPR04: c00000004cd256a0 c00000007e011ce0 c00000007e011d00 c00000004e718000
      GPR08: c00000004cd256a0 c00000004eb03ad0 c00000004cd25a90 0000000000000020
      GPR12: d000000000bf7848 c000000000b62600 0000000000000060 fffffffffffffff4
      GPR16: ffffffffffffffd6 c00000004c7a3060 ffffffff80000003 c00000004b0f0310
      GPR20: c00000004e71b180 c00000004c7a3060 0000000000000004 0000000000000000
      GPR24: c00000004e71b000 c00000004c7a3000 c00000004b0f0000 c00000004e718000
      GPR28: c00000004cd256a0 c00000004cd25a90 d000000000c01db0 c00000004e01d680
      NIP [d000000000bf21ac] .fc_bsg_jobdone+0x64/0x9c [scsi_transport_fc]
      LR [d000000000bf2684] .fc_bsg_request_handler+0x4a0/0x564 [scsi_transport_fc]
      Call Trace:
      [c00000004eb036b0] [c0000000003f755c] .get_device+0x20/0x38 (unreliable)
      [c00000004eb03720] [d000000000bf2684] .fc_bsg_request_handler+0x4a0/0x564 [scsi_transport_fc]
      [c00000004eb03820] [c0000000002c9b5c] .__generic_unplug_device+0x58/0x70
      [c00000004eb038a0] [c0000000002ce9fc] .blk_execute_rq_nowait+0x70/0xf4
      [c00000004eb03930] [c0000000002ceb2c] .blk_execute_rq+0xac/0x100
      [c00000004eb03a60] [c0000000002d51b4] .bsg_ioctl+0x1fc/0x264
      [c00000004eb03c10] [c00000000018a89c] .vfs_ioctl+0x54/0xec
      [c00000004eb03ca0] [c00000000018b01c] .do_vfs_ioctl+0x640/0x6a8
      [c00000004eb03d80] [c00000000018b0fc] .SyS_ioctl+0x78/0xbc
      [c00000004eb03e30] [c0000000000085b4] syscall_exit+0x0/0x40
      Instruction dump:
      8003004c 2fa80000 90090104 38000000 900a0108 419e0038 e9230040 81680108
      80690004 7f835840 7c101026 5400f7fe <0b000000> 7d605b78 7f8b1840 409d0008
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Acked-By: NJames Smart <james.smart@emulex.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      61ec33eb
  11. 30 10月, 2009 1 次提交
    • M
      [SCSI] scsi_transport_fc: remove invalid BUG_ON · 8798a694
      Michael Reed 提交于
      I was doing some large lun count testing with 2.6.31 and hit
      a BUG_ON() in fc_timeout_deleted_rport(), and it seems like it
      should have been just a matter of time before someone did.
      
      It seems invalid to set port_state under lock, then expect it to
      remain set after releasing the lock.  Another thread called
      fc_remote_port_add() when the lock was released, changing the
      port_state.
      
      This patch removes the BUG_ON and moves the test of the
      port_state to inside the host_lock.  It's been running for
      several weeks now with no ill effect.
      Signed-off-by: NMichael Reed <mdr@sgi.com>
      Acked-by: NJames Smart <james.smart@emulex.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      8798a694
  12. 02 10月, 2009 1 次提交
  13. 23 8月, 2009 2 次提交
  14. 26 6月, 2009 1 次提交
    • C
      [SCSI] FC transport: Locking fix for common-code FC pass-through patch · 39562e78
      Christof Schmitt 提交于
      Fix this:
      ------------[ cut here ]------------
      Badness at block/blk-core.c:244
      CPU: 0 Tainted: G        W  2.6.31-rc1-00004-gd3a263a8 #3
      Process zfcp_wq (pid: 901, task: 000000002fb7a038, ksp: 000000002f02bc78)
      Krnl PSW : 0704300180000000 00000000002141ba (blk_remove_plug+0xb2/0xb8)
                 R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:3 PM:0 EA:3
      Krnl GPRS: 0000000000000001 0000000000000001 0000000022811440 0000000022811798
                 000000000027ff4e 0000000000000000 0000000000000000 000000002f00f000
                 070000000006a0f4 000000002af70000 000000002af2a800 00000000228d1c00
                 0000000022811440 000000000050c708 000000002f02bca8 000000002f02bc80
      Krnl Code: 00000000002141b0: b9140022		lgfr	%r2,%r2
                 00000000002141b4: 07fe		bcr	15,%r14
                 00000000002141b6: a7f40001		brc	15,2141b8
                >00000000002141ba: a7f4ffbe		brc	15,214136
                 00000000002141be: 0707		bcr	0,%r7
                 00000000002141c0: ebaff0680024	stmg %r10,%r15,104(%r15)
                 00000000002141c6: c0d00017c2a9	larl	%r13,50c718
                 00000000002141cc: a7f13fc0		tmll	%r15,16320
      Call Trace:
      ([<000000000050e7d8>] C.272.16122+0x88/0x110)
       [<00000000002141ec>] __blk_run_queue+0x2c/0x154
       [<000000000028013a>] fc_remote_port_add+0x85e/0x95c
       [<000000000037596e>] zfcp_scsi_rport_work+0xe6/0x148
       [<000000000006908c>] worker_thread+0x25c/0x318
       [<000000000006f10c>] kthread+0x94/0x9c
       [<000000000001c2b2>] kernel_thread_starter+0x6/0xc
       [<000000000001c2ac>] kernel_thread_starter+0x0/0xc
      INFO: lockdep is turned off.
      Last Breaking-Event-Address:
       [<00000000002141b6>] blk_remove_plug+0xae/0xb8
      
      The FC pass-through support triggers the WARN_ON(!irqs_disabled()) in
      blk_plug_device. Since blk_plug_device requires being called with
      disabled interrupts, use spin_lock_irqsave in fc_bsg_goose_queue to
      disable the interrupts before calling into the block layer.
      Signed-off-by: NChristof Schmitt <christof.schmitt@de.ibm.com>
      Acked-by: NJames Smart <james.smart@emulex.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      39562e78
  15. 22 6月, 2009 3 次提交
  16. 13 6月, 2009 1 次提交
    • J
      [SCSI] FC Pass Thru support · 9e4f5e29
      James Smart 提交于
      Attached is the ELS/CT pass-thru patch for the FC Transport. The patch
      creates a generic framework that lays on top of bsg and the SGIO v4 ioctl
      in order to pass transaction requests to LLDD's.
      
      The interface supports the following operations:
        On an fc_host basis:
          Request login to the specified N_Port_ID, creating an fc_rport.
          Request logout of the specified N_Port_ID, deleting an fc_rport
          Send ELS request to specified N_Port_ID w/o requiring a login, and
            wait for ELS response.
          Send CT request to specified N_Port_ID and wait for CT response.
            Login is required, but LLDD is allowed to manage login and decide
            whether it stays in place after the request is satisfied.
          Vendor-Unique request. Allows a LLDD-specific request to be passed
            to the LLDD, and the passing of a response back to the application.
        On an fc_rport basis:
          Send ELS request to nport and wait for ELS response.
          Send CT request to nport and wait for CT response.
      
      The patch also exports several headers from include/scsi such that
      they can be available to user-space applications:
        include/scsi/scsi.h
        include/scsi/scsi_netlink.h
        include/scsi/scsi_netlink_fc.h
        include/scsi/scsi_bsg_fc.h
      
      For further information, refer to the last RFC:
      http://marc.info/?l=linux-scsi&m=123436574018579&w=2
      
      Note: Documentation is still spotty and will be added later.
      
      [bharrosh@panasas.com: update for new block API]
      Signed-off-by: NJames Smart <james.smart@emulex.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      9e4f5e29
  17. 13 3月, 2009 1 次提交
  18. 06 2月, 2009 1 次提交
    • P
      netlink: change return-value logic of netlink_broadcast() · ff491a73
      Pablo Neira Ayuso 提交于
      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
         -ENOBUFS.
      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: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff491a73
  19. 06 1月, 2009 1 次提交
  20. 03 1月, 2009 1 次提交
  21. 30 12月, 2008 1 次提交
  22. 13 10月, 2008 1 次提交
    • M
      [SCSI] fc class: unblock target after calling terminate callback (take 2) · fff9d40c
      Mike Christie 提交于
      When we block a rport and the driver implements the terminate
      callback we will fail IO that was running quickly. However
      IO that was in the scsi_device/block queue sits there until
      the dev_loss_tmo fires, and this can make it look like IO is
      lost because new IO will get executed but that IO stuck in
      the blocked queue sits there for some time longer.
      
      With this patch when the fast io fail tmo fires, we will
      fail the blocked IO and any new IO. This patch also allows
      all drivers to partially support the fast io fail tmo. If the
      terminate io callback is not implemented, we will still fail blocked
      IO and any new IO, so multipath can handle that.
      
      This patch also allows the fc and iscsi classes to implement the
      same behavior. The timers are just unfornately named differently.
      
      This patch also fixes the problem where drivers were unblocking
      the target in their terminate callback, which was needed for
      rport removal, but for fast io fail timeout it would cause
      IO to bounce arround the scsi/block layer and the LLD queuecommand.
      And it for drivers that could have IO stuck but did not have
      a terminate callback the unblock calls in the class will fix
      them.
      
      v2.
      - fix up bit setting style to meet JamesS's pref.
      - Broke out new host byte error changes to make it easier to read.
      - added JamesS's ack from list.
      v1
      - initial patch
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Acked-by: NJames Smart <James.Smart@emulex.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      fff9d40c
  23. 09 10月, 2008 1 次提交
  24. 04 10月, 2008 1 次提交
  25. 27 7月, 2008 1 次提交
  26. 22 7月, 2008 1 次提交
  27. 28 4月, 2008 1 次提交
  28. 20 4月, 2008 1 次提交
  29. 12 1月, 2008 1 次提交
  30. 13 10月, 2007 3 次提交
  31. 19 7月, 2007 1 次提交
  32. 18 6月, 2007 1 次提交
  33. 27 5月, 2007 1 次提交