1. 19 Jan, 2014 3 commits
    • Nicholas Bellinger's avatar
      target/rd: Refactor rd_build_device_space + rd_release_device_space · 4442dc8a
      Nicholas Bellinger authored
      This patch refactors rd_build_device_space() + rd_release_device_space()
      into rd_allocate_sgl_table() + rd_release_device_space() so that they
      may be used seperatly for setup + release of protection information
      scatterlists.
      
      Also add explicit memset of pages within rd_allocate_sgl_table() based
      upon passed 'init_payload' value.
      
      v2 changes:
        - Drop unused sg_table from rd_release_device_space (Wei)
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      4442dc8a
    • Nicholas Bellinger's avatar
      target/file: Add DIF protection support to fd_execute_rw · 42201b55
      Nicholas Bellinger authored
      This patch adds support for DIF protection into fd_execute_rw() code
      for WRITE/READ I/O using sbc_dif_verify_[write,read]() logic.
      
      It adds fd_do_prot_rw() for handling interface with FILEIO PI, and
      uses a locally allocated fd_prot->prot_buf + fd_prot->prot_sg for
      interacting with SBC DIF verify emulation code.
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      42201b55
    • Nicholas Bellinger's avatar
      target/file: Add DIF protection init/format support · 0f5e2ec4
      Nicholas Bellinger authored
      This patch adds support for DIF protection init/format support into
      the FILEIO backend.
      
      It involves using a seperate $FILE.protection for storing PI that is
      opened via fd_init_prot() using the common pi_prot_type attribute.
      The actual formatting of the protection is done via fd_format_prot()
      using the common pi_prot_format attribute, that will populate the
      initial PI data based upon the currently configured pi_prot_type.
      
      Based on original FILEIO code from Sagi.
      
      v1 changes:
        - Fix sparse warnings in fd_init_format_buf (Fengguang)
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      0f5e2ec4
  2. 18 Jan, 2014 11 commits
    • Nicholas Bellinger's avatar
      target/iblock: Add blk_integrity + BIP passthrough support · ecebbf6c
      Nicholas Bellinger authored
      This patch adds blk_integrity passthrough support for block_device
      backends using IBLOCK.
      
      This includes iblock_alloc_bip() + setup of bio_integrity_payload
      information that attaches to the leading struct bio once bio_list
      is populated during fast-path iblock_execute_rw() I/O dispatch.
      
      It also updates setup in iblock_configure_device() to detect modes
      of protection + se dev->dev_attrib.pi_prot_type accordingly, along
      with creating required bio_set integrity mempools.
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      ecebbf6c
    • Nicholas Bellinger's avatar
      target: Add protection SGLs to target_submit_cmd_map_sgls · def2b339
      Nicholas Bellinger authored
      This patch adds support to target_submit_cmd_map_sgls() for
      accepting 'sgl_prot' + 'sgl_prot_count' parameters for
      DIF protection information.
      
      Note the passed parameters are stored at se_cmd->t_prot_sg
      and se_cmd->t_prot_nents respectively.
      
      Also, update tcm_loop and vhost-scsi fabrics usage of
      target_submit_cmd_map_sgls() to take into account the
      new parameters.
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      def2b339
    • Nicholas Bellinger's avatar
      target/configfs: Expose protection device attributes · 2ed22c9c
      Nicholas Bellinger authored
      This patch adds support for exposing DIF protection device
      attributes via configfs.  This includes:
      
         pi_prot_type: Protection Type (0, 1, 3 currently support)
         pi_prot_format: Protection Format Operation (FILEIO only)
      
      Within se_dev_set_pi_prot_type() it also adds the se_subsystem_api
      device callbacks to setup per device protection information.
      
      v2 changes:
        - Drop pi_guard_type + pi_prot_version related code (MKP)
        - Add pi_prot_format logic (Sagi)
        - Add ->free_prot callback in target_free_device
        - Add hw_pi_prot_type read-only attribute
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      2ed22c9c
    • Nicholas Bellinger's avatar
      target/spc: Expose ATO bit in control mode page · 0c30f421
      Nicholas Bellinger authored
      This patch updates spc_modesense_control() to set the Application
      Tag Owner (ATO) bit when when DIF emulation is enabled by the
      backend device.
      Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      0c30f421
    • Nicholas Bellinger's avatar
      target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16 · 56dac14c
      Nicholas Bellinger authored
      This patch updates sbc_emulate_readcapacity_16() to set
      P_TYPE and PROT_EN bits when DIF emulation is enabled by
      the backend device.
      Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      56dac14c
    • Nicholas Bellinger's avatar
      target/spc: Add protection related bits to INQUIRY EVPD=0x86 · 43bb95c7
      Nicholas Bellinger authored
      This patch updates spc_emulate_evpd_86() (extended INQUIRY) to
      report GRD_CHK (Guard Check) and REF_CHK (Reference Check) bits
      when DIF emulation is enabled by the backend device.
      Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      43bb95c7
    • Nicholas Bellinger's avatar
      target/spc: Add protection bit to standard INQUIRY output · bdbad2bd
      Nicholas Bellinger authored
      This patch updates spc_emulate_inquiry_std() to set the
      PROTECT bit when DIF emulation is enabled by the backend
      device.
      Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      bdbad2bd
    • Nicholas Bellinger's avatar
      target/sbc: Add DIF TYPE1+TYPE3 read/write verify emulation · 41861fa8
      Nicholas Bellinger authored
      This patch adds support for DIF read/write verify emulation
      for TARGET_DIF_TYPE1_PROT + TARGET_DIF_TYPE3_PROT operation.
      
      This includes sbc_dif_verify_write() + sbc_dif_verify_read()
      calls accessable by backend drivers to perform DIF verify
      for SGL based data and protection information.
      
      Also included is sbc_dif_copy_prot() logic to copy protection
      information to/from backend provided protection SGLs.
      
      Based on scsi_debug.c DIF TYPE1+TYPE3 emulation.
      
      v2 changes:
        - Select CRC_T10DIF for TARGET_CORE in Kconfig (Fengguang)
        - Drop IP checksum logic from sbc_dif_v1_verify (MKP)
        - Fix offset on app_tag = 0xffff in sbc_dif_verify_read()
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      41861fa8
    • Nicholas Bellinger's avatar
      target/sbc: Add DIF setup in sbc_check_prot + sbc_parse_cdb · 499bf77b
      Nicholas Bellinger authored
      This patch adds sbc_check_prot() for performing various DIF
      related CDB sanity checks, along with setting cmd->prot_type
      once sanity checks have passed.
      
      Also, add calls in sbc_parse_cdb() for READ_[10,12,16] +
      WRITE_[10,12,16] to perform DIF sanity checking.
      
      v2 changes:
        - Make sbc_check_prot defined as static (Fengguang + Wei)
        - Remove unprotected READ/WRITE warning (mkp)
        - Populate cmd->prot_type + friends (Sagi)
        - Drop SCF_PROT usage
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      499bf77b
    • Nicholas Bellinger's avatar
      target: Add DIF CHECK_CONDITION ASC/ASCQ exception cases · fcc4f17b
      Nicholas Bellinger authored
      This patch adds support for DIF related CHECK_CONDITION ASC/ASCQ
      exception cases into transport_send_check_condition_and_sense().
      
      This includes:
      
        LOGICAL BLOCK GUARD CHECK FAILED
        LOGICAL BLOCK APPLICATION TAG CHECK FAILED
        LOGICAL BLOCK REFERENCE TAG CHECK FAILED
      
      that used by DIF TYPE1 and TYPE3 failure cases.
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      fcc4f17b
    • Nicholas Bellinger's avatar
      target: Add DIF related base definitions · ce65e5b9
      Nicholas Bellinger authored
      This patch adds DIF related definitions to target_core_base.h
      that includes enums for target_prot_op + target_prot_type +
      target_prot_version + target_guard_type + target_pi_error.
      
      Also included is struct se_dif_v1_tuple, along with changes
      to struct se_cmd, struct se_dev_attrib, and struct se_device.
      
      Also, add new se_subsystem_api->[init,format,free]_prot() callers
      used by target core code to setup backend specific protection
      information after the device has been configured.
      
      Enums taken from Sagi Grimberg's original patch.
      
      v2 changes:
        - Drop guard_type related definitions
        - Update target_prot_op + target_prot_ho definitions (Sagi)
        - Drop SCF_PROT + pi_prot_version flag
        - Add se_subsystem_api->format_prot() (Sagi)
        - Add hw_pi_prot_type device attribute
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      ce65e5b9
  3. 10 Jan, 2014 8 commits
  4. 18 Dec, 2013 1 commit
  5. 17 Dec, 2013 5 commits
  6. 16 Dec, 2013 6 commits
  7. 06 Dec, 2013 6 commits
    • Linus Torvalds's avatar
      Linux 3.13-rc3 · 374b1057
      Linus Torvalds authored
      374b1057
    • Linus Torvalds's avatar
      Merge tag 'trace-fixes-3.13-rc2' of... · 843f4f4b
      Linus Torvalds authored
      Merge tag 'trace-fixes-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
      
      Pull tracing fix from Steven Rostedt:
       "A regression showed up that there's a large delay when enabling all
        events.  This was prevalent when FTRACE_SELFTEST was enabled which
        enables all events several times, and caused the system bootup to
        pause for over a minute.
      
        This was tracked down to an addition of a synchronize_sched()
        performed when system call tracepoints are unregistered.
      
        The synchronize_sched() is needed between the unregistering of the
        system call tracepoint and a deletion of a tracing instance buffer.
        But placing the synchronize_sched() in the unreg of *every* system
        call tracepoint is a bit overboard.  A single synchronize_sched()
        before the deletion of the instance is sufficient"
      
      * tag 'trace-fixes-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Only run synchronize_sched() at instance deletion time
      843f4f4b
    • Linus Torvalds's avatar
      Merge git://git.kvack.org/~bcrl/aio-next · c537aba0
      Linus Torvalds authored
      Pull aio fix from Benjamin LaHaise:
       "AIO fix from Gu Zheng that fixes a GPF that Dave Jones uncovered with
        trinity"
      
      * git://git.kvack.org/~bcrl/aio-next:
        aio: clean up aio ring in the fail path
      c537aba0
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 7adfff58
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is a set of nine fixes (and one author update).
      
        The libsas one should fix discovery in eSATA devices, the WRITE_SAME
        one is the largest, but it should fix a lot of problems we've been
        getting with the emulated RAID devices (they've been effectively lying
        about support and then firmware has been choking on the commands).
      
        The rest are various crash, hang or warn driver fixes"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        [SCSI] bfa: Fix crash when symb name set for offline vport
        [SCSI] enclosure: fix WARN_ON in dual path device removing
        [SCSI] pm80xx: Tasklets synchronization fix.
        [SCSI] pm80xx: Resetting the phy state.
        [SCSI] pm80xx: Fix for direct attached device.
        [SCSI] pm80xx: Module author addition
        [SCSI] hpsa: return 0 from driver probe function on success, not 1
        [SCSI] hpsa: do not discard scsi status on aborted commands
        [SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers
        [SCSI] libsas: fix usage of ata_tf_to_fis
      7adfff58
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · 470abdcf
      Linus Torvalds authored
      Pull IMA fixes from James Morris:
       "Here are two more fixes for IMA"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        ima: properly free ima_template_entry structures
        ima: Do not free 'entry' before it is initialized
      470abdcf
    • Linus Torvalds's avatar
      Merge tag 'dt-fixes-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 24cb4120
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
       - Various DT binding documentation updates
       - Add Kumar Gala and remove Stephen Warren as DT binding maintainers
      
      * tag 'dt-fixes-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt: binding: reword PowerPC 8xxx GPIO documentation
        ARM: tegra: delete nvidia,tegra20-spi.txt binding
        hwmon: ntc_thermistor: Fix typo (pullup-uV -> pullup-uv)
        of: add vendor prefix for GMT
        clk: exynos: Fix typos in DT bindings documentation
        of: Add vendor prefix for LG Corporation
        Documentation: net: fsl-fec.txt: Add phy-supply entry
        ARM: dts: doc: Document missing binding for omap5-mpu
        dt-bindings: add ARMv8 PMU binding
        MAINTAINERS: remove swarren from DT bindings
        MAINTAINERS: Add Kumar to Device Tree Binding maintainers group
      24cb4120