1. 27 Nov, 2014 1 commit
  2. 25 Nov, 2014 11 commits
  3. 24 Nov, 2014 26 commits
  4. 20 Nov, 2014 2 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