1. 31 May, 2014 1 commit
  2. 13 Feb, 2014 1 commit
    • Boaz Harrosh's avatar
      ore: Fix wrong math in allocation of per device BIO · ed616147
      Boaz Harrosh authored
      commit aad560b7f63b495f48a7232fd086c5913a676e6f upstream.
      
      At IO preparation we calculate the max pages at each device and
      allocate a BIO per device of that size. The calculation was wrong
      on some unaligned corner cases offset/length combination and would
      make prepare return with -ENOMEM. This would be bad for pnfs-objects
      that would in that case IO through MDS. And fatal for exofs were it
      would fail writes with EIO.
      
      Fix it by doing the proper math, that will work in all cases. (I
      ran a test with all possible offset/length combinations this time
      round).
      
      Also when reading we do not need to allocate for the parity units
      since we jump over them.
      
      Also lower the max_io_length to take into account the parity pages
      so not to allocate BIOs bigger than PAGE_SIZE
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ed616147
  3. 12 Dec, 2013 1 commit
  4. 10 May, 2013 2 commits
  5. 06 May, 2013 1 commit
  6. 02 May, 2013 1 commit
  7. 01 May, 2013 1 commit
  8. 11 Apr, 2013 3 commits
  9. 09 Apr, 2013 2 commits
    • Al Viro's avatar
      scsi: bury ->proc_info() · 70ef457d
      Al Viro authored
      all users converted to ->show_info()/->write_info()
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      70ef457d
    • Al Viro's avatar
      scsi: saner replacements for ->proc_info() · 0ffddfbb
      Al Viro authored
      It's still an obsolete interface; don't introduce those in new drivers.
      However, it's saner than the ->proc_info() and commits after this one
      will convert the existing ->proc_info() users to it.
      
      The read side is ->show_info(seq_file *, struct Scsi_Host *); use
      seq_... for generating contents.
      
      The write side is ->write_info(struct Scsi_Host *, char *, int).
      
      Again, this is driven by procfs needs; we are going to kill ->write_proc()
      and ->read_proc() and this is the main obstacle to burying that piece of
      shit.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      0ffddfbb
  10. 25 Mar, 2013 2 commits
  11. 24 Feb, 2013 1 commit
  12. 25 Jan, 2013 2 commits
    • Aaron Lu's avatar
      [SCSI] remove can_power_off flag from scsi_device · 44ec657b
      Aaron Lu authored
      Commit 166a2967 "libata: tell scsi layer
      device supports runtime power off" introduced the can_power_off flag for
      scsi_device and is used to support ZPODD implementation in SCSI layer.
      Since ZPODD is now implemented in ATA layer, that flag is no longer
      needed, so remove it.
      Signed-off-by: default avatarAaron Lu <aaron.lu@intel.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      44ec657b
    • Aaron Lu's avatar
      [libata] scsi: no poll when ODD is powered off · 6f4c827e
      Aaron Lu authored
      When the ODD is powered off, any action the user did to the ODD that
      would generate a media event will trigger an ACPI interrupt, so the
      poll for media event is no longer necessary. And the poll will also
      cause a runtime status change, which will stop the ODD from staying in
      powered off state, so the poll should better be stopped.
      
      But since we don't have access to the gendisk structure in LLDs, here
      comes the disk_events_disable_depth for scsi device. This field is a
      hint set by LLDs to convey information to upper layer drivers. A value
      of 0 means media poll is necessary for the device, while values above 0
      means media poll is not needed and should better be skipped. So we can
      increase its value when we are to power off the ODD in ATA layer and
      decrease its value when the ODD is powered on, effectively silence the
      media events poll.
      Signed-off-by: default avatarAaron Lu <aaron.lu@intel.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      6f4c827e
  13. 07 Jan, 2013 1 commit
  14. 19 Dec, 2012 1 commit
  15. 14 Dec, 2012 5 commits
    • Yi Zou's avatar
      libfcoe, fcoe: consolidate the fcoe_ctlr_get_lesb/fcoe_get_lesb · 57c2728f
      Yi Zou authored
      Similarly they can be moved into libfcoe instead of being private to fcoe now.
      Also add comments particularly on the term LESB to the corresponding function.
      Signed-off-by: default avatarYi Zou <yi.zou@intel.com>
      Cc: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
      Tested-by: default avatarMarcus Dennis <marcusx.e.dennis@intel.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      57c2728f
    • Yi Zou's avatar
      libfcoe, fcoe: move fcoe_link_speed_update() to libfcoe and export it · 03702689
      Yi Zou authored
      With the previous patch, fcoe_link_speed_update() can be moved into libfcoe and
      exported to used by fcoe, bnx2fc, and etc.
      Signed-off-by: default avatarYi Zou <yi.zou@intel.com>
      Cc: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
      Tested-by: default avatarMarcus Dennis <marcusx.e.dennis@intel.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      03702689
    • Yi Zou's avatar
      fcoe: add support to the get_netdev() for fcoe_interface · 66524ec9
      Yi Zou authored
      Adds support to fcoe_port's newly added get_netdev fucntion pointer.
      Signed-off-by: default avatarYi Zou <yi.zou@intel.com>
      Cc: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
      Tested-by: default avatarMarcus Dennis <marcusx.e.dennis@intel.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      66524ec9
    • Yi Zou's avatar
      fcoe: prep work to start consolidate the usage of fcoe_netdev · 8106fb47
      Yi Zou authored
      Currently, in the default kernel fcoe driver, it is needed to get to the underlying
      private per fcoe transport's private structure, e.g., fcoe_interface in
      fcoe.ko, and returns the associated netdev. The similar logic exists in other
      fcoe drivers, e.g., bnx2fc, so we add a function pointer into the common
      fcoe_port struct to allow individual fcoe transport implementaion (fcoe
      and bnx2fc) to get the corresponding netdev associated with a give lport.
      
      Then a inline fcoe_get_netdev() is added as part of libfcoe for all underlying
      fcoe transport drivers to use regardless of its individual fcoe transport
      driver, and also allows move more common code such as fcoe_link_speed_update or
      fcoe_ctlr_get_lesb to be in libfcoe, rather than specific to fcoe.
      
      This patch is a prep work that adds aforementioned fucntion pointer, and
      followed by the actual code changes to make use of it.
      Signed-off-by: default avatarYi Zou <yi.zou@intel.com>
      Cc: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
      Tested-by: default avatarMarcus Dennis <marcusx.e.dennis@intel.com>
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      8106fb47
    • Robert Love's avatar
      libfcoe, fcoe, bnx2fc: Add new fcoe control interface · 6a891b07
      Robert Love authored
      This patch does a few things.
      
      1) Makes /sys/bus/fcoe/ctlr_{create,destroy} interfaces.
         These interfaces take an <ifname> and will either
         create an FCoE Controller or destroy an FCoE
         Controller depending on which file is written to.
      
         The new FCoE Controller will start in a DISABLED
         state and will not do discovery or login until it
         is ENABLED. This pause will allow us to configure
         the FCoE Controller before enabling it.
      
      2) Makes the 'mode' attribute of a fcoe_ctlr_device
         writale. This allows the user to configure the mode
         in which the FCoE Controller will start in when it
         is ENABLED.
      
         Possible modes are 'Fabric', or 'VN2VN'.
      
         The default mode for a fcoe_ctlr{,_device} is 'Fabric'.
         Drivers must implement the set_fcoe_ctlr_mode routine
         to support this feature.
      
         libfcoe offers an exported routine to set a FCoE
         Controller's mode. The mode can only be changed
         when the FCoE Controller is DISABLED.
      
         This patch also removes the get_fcoe_ctlr_mode pointer
         in the fcoe_sysfs function template, the code in
         fcoe_ctlr.c to get the mode and the assignment of
         the fcoe_sysfs function pointer to the fcoe_ctlr.c
         implementation (in fcoe and bnx2fc). fcoe_sysfs can
         return that value for the mode without consulting the
         LLD.
      
      3) Make a 'enabled' attribute of a fcoe_ctlr_device. On a
         read, fcoe_sysfs will return the attribute's value. On
         a write, fcoe_sysfs will call the LLD (if there is a
         callback) to notifiy that the enalbed state has changed.
      
      This patch maintains the old FCoE control interfaces as
      module parameters, but it adds comments pointing out that
      the old interfaces are deprecated.
      Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      6a891b07
  16. 01 Dec, 2012 2 commits
  17. 27 Nov, 2012 1 commit
  18. 14 Nov, 2012 2 commits
    • Martin K. Petersen's avatar
      [SCSI] sd: Implement support for WRITE SAME · 5db44863
      Martin K. Petersen authored
      Implement support for WRITE SAME(10) and WRITE SAME(16) in the SCSI disk
      driver.
      
       - We set the default maximum to 0xFFFF because there are several
         devices out there that only support two-byte block counts even with
         WRITE SAME(16). We only enable transfers bigger than 0xFFFF if the
         device explicitly reports MAXIMUM WRITE SAME LENGTH in the BLOCK
         LIMITS VPD.
      
       - max_write_same_blocks can be overriden per-device basis in sysfs.
      
       - The UNMAP discovery heuristics remain unchanged but the discard
         limits are tweaked to match the "real" WRITE SAME commands.
      
       - In the error handling logic we now distinguish between WRITE SAME
         with and without UNMAP set.
      
      The discovery process heuristics are:
      
       - If the device reports a SCSI level of SPC-3 or greater we'll issue
         READ SUPPORTED OPERATION CODES to find out whether WRITE SAME(16) is
         supported. If that's the case we will use it.
      
       - If the device supports the block limits VPD and reports a MAXIMUM
         WRITE SAME LENGTH bigger than 0xFFFF we will use WRITE SAME(16).
      
       - Otherwise we will use WRITE SAME(10) unless the target LBA is beyond
         0xFFFFFFFF or the block count exceeds 0xFFFF.
      
       - no_write_same is set for ATA, FireWire and USB.
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Reviewed-by: default avatarMike Snitzer <snitzer@redhat.com>
      Reviewed-by: default avatarJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      5db44863
    • Martin K. Petersen's avatar
      [SCSI] Add a report opcode helper · 3c6bdaea
      Martin K. Petersen authored
      The REPORT SUPPORTED OPERATION CODES command can be used to query
      whether a given opcode is supported by a device. Add a helper function
      that allows us to look up commands.
      
      We only issue RSOC if the device reports compliance with SPC-3 or
      later. But to err on the side of caution we disable the command for ATA,
      FireWire and USB.
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Acked-by: default avatarMike Snitzer <snitzer@redhat.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      3c6bdaea
  19. 09 Oct, 2012 1 commit
  20. 07 Oct, 2012 2 commits
  21. 02 Oct, 2012 1 commit
  22. 24 Sep, 2012 3 commits
  23. 13 Sep, 2012 1 commit
    • Eric W. Biederman's avatar
      scsi_netlink: Remove dead and buggy code · 8289bab1
      Eric W. Biederman authored
      The scsi netlink code confuses the netlink port id with a process id,
      going so far as to read NETLINK_CREDS(skb)->pid instead of the correct
      NETLINK_CB(skb).pid.  Fortunately it does not matter because nothing
      registers to respond to scsi netlink requests.
      
      The only interesting use of the scsi_netlink interface is
      fc_host_post_vendor_event which sends a netlink multicast message.
      
      Since nothing registers to handle scsi netlink messages kill all of the
      registration logic, while retaining the same error handling behavior
      preserving the userspace visible behavior and removing all of the
      confused code that thought a netlink port id was a process id.
      
      This was tested with a kernel allyesconfig build which had no problems.
      
      Cc: James Bottomley <James.Bottomley@parallels.com>
      Cc: James Smart <James.Smart@Emulex.Com>
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8289bab1
  24. 24 Aug, 2012 1 commit
    • Dan Williams's avatar
      [SCSI] libsas: suspend / resume support · 303694ee
      Dan Williams authored
      libsas power management routines to suspend and recover the sas domain
      based on a model where the lldd is allowed and expected to be
      "forgetful".
      
      sas_suspend_ha - disable event processing allowing the lldd to take down
                       links without concern for causing hotplug events.
                       Regardless of whether the lldd actually posts link down
                       messages libsas notifies the lldd that all
                       domain_devices are gone.
      
      sas_prep_resume_ha - on the way back up before the lldd starts link
                           training clean out any spurious events that were
                           generated on the way down, and re-enable event
                           processing
      
      sas_resume_ha - after the lldd has started and decided that all phys
      		have posted link-up events this routine is called to let
      		libsas start it's own timeout of any phys that did not
      		resume.  After the timeout an lldd can cancel the
                      phy teardown by posting a link-up event.
      
      Storage for ex_change_count (u16) and phy_change_count (u8) are changed
      to int so they can be set to -1 to indicate 'invalidated'.
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Reviewed-by: default avatarJacek Danecki <jacek.danecki@intel.com>
      Tested-by: default avatarMaciej Patelczyk <maciej.patelczyk@intel.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      303694ee
  25. 20 Jul, 2012 1 commit