1. 18 11月, 2016 9 次提交
  2. 15 11月, 2016 1 次提交
  3. 09 11月, 2016 1 次提交
  4. 12 4月, 2016 2 次提交
  5. 01 12月, 2015 1 次提交
  6. 10 4月, 2015 1 次提交
  7. 26 7月, 2014 1 次提交
  8. 18 7月, 2014 2 次提交
  9. 25 6月, 2014 1 次提交
    • N
      fc: ensure scan_work isn't active when freeing fc_rport · 0353e085
      Neil Horman 提交于
      debugfs caught this:
      WARNING: at lib/debugobjects.c:260 debug_print_object+0x83/0xa0()
      ODEBUG: free active (active state 0) object type: work_struct
      hint: fc_scsi_scan_rport+0x0/0xd0 [scsi_transport_fc]
       CPU: 1 PID: 184 Comm: kworker/1:1 Tainted: G        W
      --------------   3.10.0-123.el7.x86_64.debug #1
      Hardware name: HP ProLiant DL120 G7, BIOS J01 07/01/2013
      Workqueue: fc_wq_5 fc_rport_final_delete [scsi_transport_fc]
      Call Trace:
      [<ffffffff8169efec>] dump_stack+0x19/0x1b
      [<ffffffff8106cbd1>] warn_slowpath_common+0x61/0x80
      [<ffffffff8106cc4c>] warn_slowpath_fmt+0x5c/0x80
      [<ffffffff8133e003>] debug_print_object+0x83/0xa0
      [<ffffffffa04e2f40>] ? fc_parse_wwn+0x100/0x100
      
      [<ffffffff8133f23b>] debug_check_no_obj_freed+0x22b/0x270
      [<ffffffffa04e127e>] ? fc_rport_dev_release+0x1e/0x30
      [<ffffffff811db3e9>] kfree+0xd9/0x2d0
      [<ffffffffa04e127e>] fc_rport_dev_release+0x1e/0x30
      [<ffffffff81428032>] device_release+0x32/0xa0
      [<ffffffff8132701e>] kobject_release+0x7e/0x1b0
      [<ffffffff81326ed8>] kobject_put+0x28/0x60
      [<ffffffff81428397>] put_device+0x17/0x20
      [<ffffffffa04e5025>] fc_rport_final_delete+0x165/0x210
      [<ffffffff810959b0>] process_one_work+0x220/0x710
      [<ffffffff81095944>] ? process_one_work+0x1b4/0x710
      [<ffffffff81095fbb>] worker_thread+0x11b/0x3a0
      [<ffffffff81095ea0>] ? process_one_work+0x710/0x710
      [<ffffffff8109e0cd>] kthread+0xed/0x100
      [<ffffffff8109dfe0>] ? insert_kthread_work+0x80/0x80
      [<ffffffff816b2fec>] ret_from_fork+0x7c/0xb0
      [<ffffffff8109dfe0>] ? insert_kthread_work+0x80/0x80
      
      Seems to be because the scan_work work_struct might be active when the housing
      fc_rport struct gets freed.  Ensure that we cancel it prior to freeing the rport
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Reviewed-by: NVasu Dev <vasu.dev@intel.com>
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      0353e085
  10. 16 3月, 2014 1 次提交
  11. 04 7月, 2013 1 次提交
  12. 29 3月, 2013 1 次提交
  13. 20 7月, 2012 2 次提交
  14. 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
  15. 10 5月, 2012 1 次提交
  16. 19 2月, 2012 1 次提交
  17. 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
  18. 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
  19. 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
  20. 18 4月, 2011 1 次提交
  21. 31 3月, 2011 1 次提交
  22. 10 3月, 2011 1 次提交
  23. 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
  24. 08 10月, 2010 1 次提交
  25. 10 9月, 2010 1 次提交
  26. 06 9月, 2010 1 次提交
  27. 11 8月, 2010 1 次提交
  28. 17 6月, 2010 1 次提交
  29. 11 4月, 2010 1 次提交
    • C
      [SCSI] Allow FC LLD to fast-fail scsi eh by introducing new eh return · 2f2eb587
      Christof Schmitt 提交于
      If the scsi eh is running and then a FC LLD calls
      fc_remote_port_delete, the SCSI commands sent from the eh will fail.
      To prevent this, a FC LLD can call fc_block_scsi_eh from the eh
      callback, blocking the eh thread until the dev_loss_tmo fires or the
      remote port is available again.
      
      If (e.g. for a multipathing setup) the dev_loss_tmo is set to a very
      large value, thus preventing the scsi device removal , the scsi eh can
      block for a long time. For multipathing, the fast_io_fail_tmo is then
      set to a low value to detect path problems sooner.
      
      This patch introduces a new return code FAST_IO_FAIL. The function
      fc_block_scsi_eh now returns FAST_IO_FAIL when the fast_io_fail_tmo
      fires. This indicates that the LLD terminated all pending I/O requests
      and there are no more pending SCSI commands for the scsi eh to wait
      for. This return code can be passed back to the scsi eh to stop the
      escalation and finish the recovery process for this device.
      Signed-off-by: NChristof Schmitt <christof.schmitt@de.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      2f2eb587