1. 20 7月, 2012 2 次提交
  2. 25 6月, 2012 1 次提交
    • T
      block: drop custom queue draining used by scsi_transport_{iscsi|fc} · 86072d81
      Tejun Heo 提交于
      iscsi_remove_host() uses bsg_remove_queue() which implements custom
      queue draining.  fc_bsg_remove() open-codes mostly identical logic.
      
      The draining logic isn't correct in that blk_stop_queue() doesn't
      prevent new requests from being queued - it just stops processing, so
      nothing prevents new requests to be queued after the logic determines
      that the queue is drained.
      
      blk_cleanup_queue() now implements proper queue draining and these
      custom draining logics aren't necessary.  Drop them and use
      bsg_unregister_queue() + blk_cleanup_queue() instead.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: James Smart <james.smart@emulex.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      86072d81
  3. 10 5月, 2012 1 次提交
  4. 19 2月, 2012 1 次提交
  5. 16 1月, 2012 1 次提交
    • J
      [SCSI] scsi_transport_fc: Clear Devloss Callback Done flag in fc_remote_port_rolechg · 0eecee41
      James Smart 提交于
      This patch fixes a bug where devloss is not called on fc_host teardown.
      The issue is seen if the LLDD uses rport_rolechg to add the target role
      to an rport.
      
      When an rport goes away, the LLDD will call fc_remote_port_delete, which
      will start the devloss timer.  If the timer expires, the transport will
      call the devloss callback and set the FC_RPORT_DEVLOSS_CALLBK_DONE flag.
      However, the rport structure is not deleted, it is retained to store the
      SCSI id mappings for the rport in case it comes back. In the scenario
      where it does come back, and the driver calls fc_remote_port_add, but does
      not indicate the "target" role for the rport - the create will clear the
      structure, but forgets to clear FC_RPORT_DEVLOSS_CALLBK_DONE flag (which
      is cleared if it's added with the target role). The secondary call, of
      fc_remote_port_rolechg to add the target role also does not clear the flag.
      Thus, the next time the rport goes away, the resulting devloss timer
      expiration will not call the driver callback as the flag is still set.
      
      This patch adds the FC_RPORT_DEVLOSS_CALLBK_DONE flags to the list of
      those that are cleared upon reuse of the rport structure.
      Signed-off-by: NAlex Iannicelli <alex.iannicelli@emulex.com>
      Signed-off-by: NJames Smart <james.smart@emulex.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      0eecee41
  6. 02 5月, 2011 1 次提交
    • N
      [SCSI] scsi_transport_fc: Fix deadlock during fc_remove_host · 112f661d
      Nithin Nayak Sujir 提交于
      Creating and destroying fcoe interface in a tight loop leads to a system
      deadlock with the following call traces:
      
      Call Trace:
      [<ffffffff814f4b3d>] schedule_timeout+0x1fd/0x2c0
      [<ffffffff814f469f>] ? wait_for_common+0x4f/0x190
      [<ffffffff814f469f>] ? wait_for_common+0x4f/0x190
      [<ffffffff814f4737>] wait_for_common+0xe7/0x190
      [<ffffffff81042fa0>] ? default_wake_function+0x0/0x20
      [<ffffffff81082c2d>] ? trace_hardirqs_on+0xd/0x10
      [<ffffffff814f48bd>] wait_for_completion+0x1d/0x20
      [<ffffffff81066d90>] flush_workqueue+0x290/0x5f0
      [<ffffffff81066b00>] ? flush_workqueue+0x0/0x5f0
      [<ffffffff81067148>] destroy_workqueue+0x38/0x340
      [<ffffffffa0260289>] fc_remove_host+0x1b9/0x1f0 [scsi_transport_fc]
      [<ffffffffa02ed195>] bnx2fc_if_destroy+0xc5/0x1f0 [bnx2fc]
      [<ffffffffa02ed33a>] bnx2fc_destroy+0x7a/0x100 [bnx2fc]
      [<ffffffffa02c789b>] fcoe_transport_destroy+0x9b/0x1b0 [libfcoe]
      [<ffffffff81069ec2>] param_attr_store+0x52/0x80
      [<ffffffff81069976>] module_attr_store+0x26/0x30
      [<ffffffff8119e726>] sysfs_write_file+0xe6/0x170
      [<ffffffff81134710>] vfs_write+0xd0/0x1a0
      [<ffffffff811348e4>] sys_write+0x54/0xa0
      [<ffffffff81002e02>] system_call_fastpath+0x16/0x1b
      Call Trace:
      [<ffffffff81074865>] async_synchronize_cookie_domain+0x75/0x120
      [<ffffffff8106caa0>] ? autoremove_wake_function+0x0/0x40
      [<ffffffff81074925>] async_synchronize_cookie+0x15/0x20
      [<ffffffff8107494c>] async_synchronize_full+0x1c/0x40
      [<ffffffffa0057466>] sd_remove+0x36/0xc0 [sd_mod]
      [<ffffffff81358a75>] __device_release_driver+0x75/0xe0
      [<ffffffff81358bef>] device_release_driver+0x2f/0x50
      [<ffffffff81357aee>] bus_remove_device+0xbe/0x120
      [<ffffffff813553ef>] device_del+0x12f/0x1e0
      [<ffffffff8137454d>] __scsi_remove_device+0xbd/0xc0
      [<ffffffff81374585>] scsi_remove_device+0x35/0x50
      [<ffffffff813746a7>] __scsi_remove_target+0xe7/0x110
      [<ffffffff81374730>] ? __remove_child+0x0/0x30
      [<ffffffff81374753>] __remove_child+0x23/0x30
      [<ffffffff81354a2c>] device_for_each_child+0x4c/0x80
      [<ffffffff81374703>] scsi_remove_target+0x33/0x60
      [<ffffffffa02622c6>] fc_starget_delete+0x26/0x30 [scsi_transport_fc]
      [<ffffffffa026271a>] fc_rport_final_delete+0xaa/0x200 [scsi_transport_fc]
      [<ffffffff8106585a>] process_one_work+0x1aa/0x540
      [<ffffffff810657eb>] ? process_one_work+0x13b/0x540
      [<ffffffffa0262670>] ? fc_rport_final_delete+0x0/0x200 [scsi_transport_fc]
      [<ffffffff81067ac9>] worker_thread+0x179/0x410
      [<ffffffff81067950>] ? worker_thread+0x0/0x410
      [<ffffffff8106c546>] kthread+0xb6/0xc0
      [<ffffffff8103879b>] ? finish_task_switch+0x4b/0xe0
      [<ffffffff81003ca4>] kernel_thread_helper+0x4/0x10
      [<ffffffff814f7994>] ? restore_args+0x0/0x30
      [<ffffffff8106c490>] ? kthread+0x0/0xc0
      [<ffffffff81003ca0>] ? kernel_thread_helper+0x0/0x10
      
      fc_remove_host() waits for flushing the workqueue, but it is stuck at flushing
      the first work. The first work doesnt complete, because it is waiting for async
      layer to complete the IOs. The async layer cannot complete the IO as the
      terminate_rport_io for the second work was not called, which will be called
      only when the first work completes. Hence the deadlock.  To resolve this
      deadlock, the workqueue allocation has been modified from
      create_singlethread_workqueue() to alloc_workqueue().
      
      In addition, fc_terminate_rport_io() should be called before the
      scsi_flush_work() to avoid the similar deadlock as above.
      
      scsi fc alloc queue. move terminate rport io before flush
      Signed-off-by: NNithin Nayak Sujir <nsujir@broadcom.com>
      Signed-off-by: NBhanu Prakash Gollapudi <bprakash@broadcom.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      112f661d
  7. 19 4月, 2011 1 次提交
    • J
      block: get rid of QUEUE_FLAG_REENTER · c21e6beb
      Jens Axboe 提交于
      We are currently using this flag to check whether it's safe
      to call into ->request_fn(). If it is set, we punt to kblockd.
      But we get a lot of false positives and excessive punts to
      kblockd, which hurts performance.
      
      The only real abuser of this infrastructure is SCSI. So export
      the async queue run and convert SCSI over to use that. There's
      room for improvement in that SCSI need not always use the async
      call, but this fixes our performance issue and they can fix that
      up in due time.
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      c21e6beb
  8. 18 4月, 2011 1 次提交
  9. 31 3月, 2011 1 次提交
  10. 10 3月, 2011 1 次提交
  11. 02 3月, 2011 1 次提交
    • T
      block: add @force_kblockd to __blk_run_queue() · 1654e741
      Tejun Heo 提交于
      __blk_run_queue() automatically either calls q->request_fn() directly
      or schedules kblockd depending on whether the function is recursed.
      blk-flush implementation needs to be able to explicitly choose
      kblockd.  Add @force_kblockd.
      
      All the current users are converted to specify %false for the
      parameter and this patch doesn't introduce any behavior change.
      
      stable: This is prerequisite for fixing ide oops caused by the new
              blk-flush implementation.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Jan Beulich <JBeulich@novell.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: stable@kernel.org
      Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
      1654e741
  12. 08 10月, 2010 1 次提交
  13. 10 9月, 2010 1 次提交
  14. 06 9月, 2010 1 次提交
  15. 11 8月, 2010 1 次提交
  16. 17 6月, 2010 1 次提交
  17. 11 4月, 2010 2 次提交
  18. 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
  19. 28 3月, 2010 1 次提交
  20. 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
  21. 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
  22. 18 1月, 2010 1 次提交
  23. 10 12月, 2009 1 次提交
  24. 05 12月, 2009 2 次提交
  25. 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
  26. 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
  27. 02 10月, 2009 1 次提交
  28. 23 8月, 2009 2 次提交
  29. 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
  30. 22 6月, 2009 3 次提交
  31. 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
  32. 13 3月, 2009 1 次提交
  33. 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
  34. 06 1月, 2009 1 次提交