1. 25 Nov, 2014 7 commits
  2. 24 Nov, 2014 26 commits
  3. 20 Nov, 2014 7 commits
    • Martin Peschke's avatar
      zfcp: auto port scan resiliency · 18f87a67
      Martin Peschke authored
      This patch improves the Fibre Channel port scan behaviour of the zfcp lldd.
      Without it the zfcp device driver may churn up the storage area network by
      excessive scanning and scan bursts, particularly in big virtual server
      environments, potentially resulting in interference of virtual servers and
      reduced availability of storage connectivity.
      
      The two main issues as to the zfcp device drivers automatic port scan in
      virtual server environments are frequency and simultaneity.
      On the one hand, there is no point in allowing lots of ports scans
      in a row. It makes sense, though, to make sure that a scan is conducted
      eventually if there has been any indication for potential SAN changes.
      On the other hand, lots of virtual servers receiving the same indication
      for a SAN change had better not attempt to conduct a scan instantly,
      that is, at the same time.
      
      Hence this patch has a two-fold approach for better port scanning:
      the introduction of a rate limit to amend frequency issues, and the
      introduction of a short random backoff to amend simultaneity issues.
      Both approaches boil down to deferred port scans, with delays
      comprising parts for both approaches.
      
      The new port scan behaviour is summarised best by:
      
                                                     NEW:    NEW:
                                no_auto_port_rescan  random  rate    flush
                                                     backoff limit   =wait
      
      adapter resume/thaw       yes                  yes     no      yes*
      adapter online (user)     no                   yes     no      yes*
      port rescan (user)        no                   no      no      yes
      adapter recovery (user)   yes                  yes     yes     no
      adapter recovery (other)  yes                  yes     yes     no
      incoming ELS              yes                  yes     yes     no
      incoming ELS lost         yes                  yes     yes     no
      
      Implementation is straight-forward by converting an existing worker to
      a delayed worker. But care is needed whenever that worker is going to be
      flushed (in order to make sure work has been completed), since a flush
      operation cancels the timer set up for deferred execution (see * above).
      
      There is a small race window whenever a port scan work starts
      running up to the point in time of storing the time stamp for that port
      scan. The impact is negligible. Closing that gap isn't trivial, though, and
      would the destroy the beauty of a simple work-to-delayed-work conversion.
      Signed-off-by: default avatarMartin Peschke <mpeschke@linux.vnet.ibm.com>
      Signed-off-by: default avatarSteffen Maier <maier@linux.vnet.ibm.com>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      18f87a67
    • Steffen Maier's avatar
      zfcp: bring back unit sysfs attributes for automatic LUN scan · c8bba144
      Steffen Maier authored
      Through sysfs attributes, zfcp unit objects
      provide a trigger for manual LUN recovery
      and export information for problem determination.
      
      With commit
      f8210e34
      "[SCSI] zfcp: Allow midlayer to scan for LUNs when running in NPIV mode"
      and when attaching SCSI devices through this new optional method,
      no more zfcp unit objects are allocated for such SCSI devices.
      Hence, the above-mentioned trigger and information were missing.
      
      The information and context is located in SCSI transport device data since
      b62a8d9b
      "[SCSI] zfcp: Use SCSI device data zfcp_scsi_dev instead of zfcp_unit"
      57c23773
      "[SCSI] zfcp: Add zfcp private struct as SCSI device driver data"
      Hence, introduce the trigger and the information unconditionally
      for all SCSI devices attached through zfcp.
      
      We prefix the attribute names with 'zfcp_' to prevent collisions and
      to avoid mix-ups such as with the common 'state' attribute.
      
      Since some of the new attribute views do not need zfcp_port
      in the ZFCP_DEFINE_SCSI_ATTR helper macro, remove zfcp_port
      to avoid compiler warnings on unused variable.
      It's easy to open code the conversion from zfcp_scsi_dev to zfcp_port
      for the two already existing attributes hba_id and wwpn.
      Signed-off-by: default avatarSteffen Maier <maier@linux.vnet.ibm.com>
      Reviewed-by: default avatarMartin Peschke <mpeschke@linux.vnet.ibm.com>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      c8bba144
    • Fabian Frederick's avatar
      bfa: replace 2 kzalloc/copy_from_user by memdup_user · 9f30b674
      Fabian Frederick authored
      This patch also removes unnecessary printk(KERN_INFO
      Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
      Acked-by: default avatarAnil Gurumurthy <anil.gurumurthy@qlogic.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      9f30b674
    • Martin Peschke's avatar
      zfcp: remove access control tables interface (port leftovers) · 1b33ef23
      Martin Peschke authored
      This patch removes some leftovers for commit
      663e0890
      "[SCSI] zfcp: remove access control tables interface".
      
      The "access denied" case for ports is gone, as well.
      The corresponding flag was cleared, but never set.
      So clean it up.
      
      Sysfs flag is kept, though, for backward-compatibility.
      Now it returns always 0.
      Signed-off-by: default avatarMartin Peschke <mpeschke@linux.vnet.ibm.com>
      Signed-off-by: default avatarSteffen Maier <maier@linux.vnet.ibm.com>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      1b33ef23
    • Ming Lei's avatar
      virtio_scsi: support multi hw queue of blk-mq · ccbedf11
      Ming Lei authored
      Since virtio_scsi has supported multi virtqueue already,
      it is natural to map the virtque to hw-queue of blk-mq.
      Signed-off-by: default avatarMing Lei <ming.lei@canonical.com>
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      ccbedf11
    • Stephen M. Cameron's avatar
      hpsa: remove spin lock around command allocation · 4c413128
      Stephen M. Cameron authored
      It is already using atomic test_and_set_bit to do the
      allocation.
      
      There is some microscopic chance of starvation, but it is
      so microscopic that it should never happen in reality.
      Signed-off-by: default avatarDon Brace <don.brace@pmcs.com>
      Reviewed-by: default avatarWebb Scales <webbnh@hp.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      4c413128
    • Robert Elliott's avatar
      hpsa: always call pci_set_master after pci_enable_device · 4fa604e1
      Robert Elliott authored
      If the kernel is booted with the reset_device parameter, which
      is done for kdump, then the driver needs to call pci_set_master
      after pci_enable_device to reenable bus mastering (since
      the preceding pci_disable_device call disables bus mastering).
      
      Also, place that after pci_request_regions both in the
      kdump code and the normal pci_init code.
      
      Remove the comment summarizing what pci_set_master
      does, with the incomplete commentary on the impact of
      pci_disable_device.
      Signed-off-by: default avatarRobert Elliott <elliott@hp.com>
      Signed-off-by: default avatarDon Brace <don.brace@pmcs.com>
      Reviewed-by: default avatarDon Brace <don.brace@pmcs.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      4fa604e1