1. 07 Feb, 2017 2 commits
  2. 27 Jan, 2017 2 commits
  3. 18 Nov, 2016 12 commits
  4. 14 Nov, 2016 1 commit
  5. 08 Nov, 2016 1 commit
  6. 11 Apr, 2016 2 commits
  7. 30 Nov, 2015 1 commit
  8. 10 Apr, 2015 1 commit
  9. 25 Jul, 2014 1 commit
  10. 17 Jul, 2014 2 commits
  11. 25 Jun, 2014 1 commit
    • Neil Horman (CI test user)'s avatar
      fc: ensure scan_work isn't active when freeing fc_rport · 0353e085
      Neil Horman (CI test user) authored
      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: Neil Horman (CI test user)'s avatarNeil Horman <nhorman@tuxdriver.com>
      Reviewed-by: Vasu Dev's avatarVasu Dev <vasu.dev@intel.com>
      Reviewed-by: Hannes Reinecke's avatarHannes Reinecke <hare@suse.de>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      0353e085
  12. 15 Mar, 2014 1 commit
  13. 03 Jul, 2013 1 commit
  14. 28 Mar, 2013 1 commit
  15. 20 Jul, 2012 2 commits
  16. 25 Jun, 2012 1 commit
    • Tejun Heo's avatar
      block: drop custom queue draining used by scsi_transport_{iscsi|fc} · 86072d81
      Tejun Heo authored
      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: default avatarTejun Heo <tj@kernel.org>
      Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
      Acked-by: Vivek Goyal's avatarVivek Goyal <vgoyal@redhat.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: James Smart <james.smart@emulex.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      86072d81
  17. 10 May, 2012 1 commit
  18. 19 Feb, 2012 1 commit
  19. 16 Jan, 2012 1 commit
    • James Smart's avatar
      [SCSI] scsi_transport_fc: Clear Devloss Callback Done flag in fc_remote_port_rolechg · 0eecee41
      James Smart authored
      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: default avatarAlex Iannicelli <alex.iannicelli@emulex.com>
      Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      0eecee41
  20. 01 May, 2011 1 commit
    • Nithin Nayak Sujir's avatar
      [SCSI] scsi_transport_fc: Fix deadlock during fc_remove_host · 112f661d
      Nithin Nayak Sujir authored
      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: default avatarNithin Nayak Sujir <nsujir@broadcom.com>
      Signed-off-by: default avatarBhanu Prakash Gollapudi <bprakash@broadcom.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
      112f661d
  21. 19 Apr, 2011 1 commit
    • Jens Axboe's avatar
      block: get rid of QUEUE_FLAG_REENTER · c21e6beb
      Jens Axboe authored
      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: default avatarJens Axboe <jaxboe@fusionio.com>
      c21e6beb
  22. 18 Apr, 2011 1 commit
  23. 31 Mar, 2011 1 commit
  24. 10 Mar, 2011 1 commit