1. 24 3月, 2011 2 次提交
    • N
      [SCSI] target: Convert backend ->create_virtdevice() call to return ERR_PTR · 613640e4
      Nicholas Bellinger 提交于
      This patch converts the target_core_store_dev_enable() -> struct
      se_subsystem_api->create_virtdevice() call to return proper ERR_PTR values
      back up to configfs logic during backend dependent struct se_device ENABLE
      exception conditions.
      
      Along with the change to target_core_configfs.c, this includes converting IBLOCK,
      FILEIO, pSCSI, and RAMDISK_* backend subsystem plugins to obtain upper level
      PTR_ERR return codes (where available), and return via ERR_PTR during a
      *_create_virtdev() failure.
      Reported-by: NFubo Chen <fubo.chen@gmail.com>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      613640e4
    • J
      [SCSI] target: Fix match_strdup() memory leaks · 6d180253
      Jesper Juhl 提交于
      match_strdup() dynamically allocates memory and it is the responsabillity
      of the caller to free that memory. The following three cases:
      
      drivers/target/target_core_file.c:fd_set_configfs_dev_params()
      drivers/target/target_core_iblock.c:iblock_set_configfs_dev_params()
      drivers/target/target_core_configfs.c:target_core_dev_pr_store_attr_res_aptpl_metadata()
      
      should be kfree()'ing the allocated memory once it is no longer needed.
      It also makes sure to return -ENOMEM if the memory allocation in match_strdup()
      should fail.  For target_core_configfs.c, this patch adds kfree()'s around
      Opt_initiator_fabric, Opt_initiator_node, Opt_initiator_sid, Opt_sa_res_key,
      Opt_target_fabric, and Opt_target_node for the Persistent Reservations
      Activate Persistence across Target Power Loss (APTPL=1) token parsing.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      6d180253
  2. 02 3月, 2011 1 次提交
  3. 15 1月, 2011 1 次提交
    • N
      [SCSI] target: Add LIO target core v4.0.0-rc6 · c66ac9db
      Nicholas Bellinger 提交于
      LIO target is a full featured in-kernel target framework with the
      following feature set:
      
      High-performance, non-blocking, multithreaded architecture with SIMD
      support.
      
      Advanced SCSI feature set:
      
          * Persistent Reservations (PRs)
          * Asymmetric Logical Unit Assignment (ALUA)
          * Protocol and intra-nexus multiplexing, load-balancing and failover (MC/S)
          * Full Error Recovery (ERL=0,1,2)
          * Active/active task migration and session continuation (ERL=2)
          * Thin LUN provisioning (UNMAP and WRITE_SAMExx)
      
      Multiprotocol target plugins
      
      Storage media independence:
      
          * Virtualization of all storage media; transparent mapping of IO to LUNs
          * No hard limits on number of LUNs per Target; maximum LUN size ~750 TB
          * Backstores: SATA, SAS, SCSI, BluRay, DVD, FLASH, USB, ramdisk, etc.
      
      Standards compliance:
      
          * Full compliance with IETF (RFC 3720)
          * Full implementation of SPC-4 PRs and ALUA
      
      Significant code cleanups done by Christoph Hellwig.
      
      [jejb: fix up for new block bdev exclusive interface. Minor fixes from
       Randy Dunlap and Dan Carpenter.]
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      c66ac9db