[RFC-v2 07/11] nvmet/io-cmd: Hookup sbc_ops->execute_rw backend ops

2016-06-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts nvmet_execute_rw() to utilize sbc_ops->execute_rw() for target_iostate + target_iomem based I/O submission into existing backends drivers via configfs in /sys/kernel/config/target/core/. This includes support for passi

[RFC-v2 10/11] nvmet/admin-cmd: Hookup T10-PI to ID_NS.ms + ID_NS.dps feature bits

2016-06-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch updates nvmet_execute_identify_ns() to report target-core backend T10-PI related feature bits to the NVMe host controller. Note this assumes support for NVME_NS_DPC_PI_TYPE1 and NVME_NS_DPC_PI_TYPE3 as reported by backend drive

[RFC-v2 06/11] nvmet/rdma: Convert to struct nvmet_port_binding

2016-06-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts nvmet/rdma to nvmet_port_binding in configfs-ng, and introduces a nvmet_rdma_port that allows for multiple nvmet_subsys nvmet_port_bindings to be mapped to a single nvmet_rdma_port rdma_cm_id listener. It moves rdma_cm_id

[RFC-v2 01/11] nvme-fabrics: Export nvmf_host_add + generate hostnqn if necessary

2016-06-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch allows nvmf_host_add() to be used externally, and optionally if no hostnqn is passed will generate a hostnqn based on host->id, following nvmf_host_default(). Note it's required for nvme-loop multi-controller support, in order

[RFC-v2 08/11] nvmet/io-cmd: Hookup sbc_ops->execute_sync_cache backend ops

2016-06-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts nvmet_execute_flush() to utilize sbc_ops->execute_sync_cache() for target_iostate submission into existing backends drivers via configfs in /sys/kernel/config/target/core/. Cc: Jens Axboe <ax...@fb.com> Cc: Chris

[RFC-v2 02/11] nvmet: Add nvmet_fabric_ops get/put transport helpers

2016-06-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch introduces two helpers for obtaining + releasing nvmet_fabric_ops for nvmet_port usage, and the associated struct module ops->owner reference. This is required in order to support nvmet/configfs-ng and multiple nvmet_port config

[RFC-v2 04/11] nvmet: Hookup nvmet_ns->dev to nvmet_ns_enable

2016-06-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch hooks up nvmet_ns_enable() to accept the RCU protected struct se_device provided as a configfs symlink from existing /sys/kernel/config/target/core/ driver backends. Also, drop the now unused internal ns->bdev + ns->devic

[RFC-v2 05/11] nvmet/loop: Add support for controller-per-port model + nvmet_port_binding

2016-06-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch introduces loopback support for a nvme host controller per nvmet_port instance model, following what we've done in drivers/target/loopback/ for allowing multiple host LLDs to co-exist. It changes nvme_loop_add_port() to use

[RFC-v2 00/11] nvmet: Add support for multi-tenant configfs

2016-06-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> Hi folks, Here's the second pass of a nvmet multi-tenant configfs layout, following what we've learned in target_core_fabric_configfs.c wrt to independent operation of storage endpoints. Namely, it allows existing /sys/kernel/config/targe

Re: [RFC 7/8] nvmet/admin-cmd: Hookup T10-PI to ID_NS.ms + ID_NS.dps feature bits

2016-06-10 Thread Nicholas A. Bellinger
On Thu, 2016-06-09 at 15:52 +0200, Christoph Hellwig wrote: > FYI: NVMf requires metadata to be interleaved in the data, and you > need to indicate that in the Identify data. Note that this is only > a requirement for the on the wire format and for the way the Namespaces are > exposed at the

Re: [RFC 0/2] nvme/loop: Add support for controllers-per-port model

2016-06-10 Thread Nicholas A. Bellinger
On Thu, 2016-06-09 at 15:39 +0200, Christoph Hellwig wrote: > On Wed, Jun 08, 2016 at 10:13:53PM -0700, Nicholas A. Bellinger wrote: > > I still don't see why a loopback controller on a port of an individual > > subsystem NQN can't be created + deleted directly from configfs,

Re: [PATCHv3 0/2] target: make location of /var/targets configurable

2016-06-09 Thread Nicholas A. Bellinger
On Thu, 2016-06-09 at 16:51 -0700, Lee Duncan wrote: > Ping? > > We really need to move the target database out of /var/target > This series has already merged up for v4.7-rc1. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to

Re: [PATCH] target: Fix for hang of Ordered task in TCM

2016-06-08 Thread Nicholas A. Bellinger
On Wed, 2016-06-08 at 14:43 -0500, Bryant G. Ly wrote: > > Hi Nic, > > So I was testing the ibmvscsi target driver and I ran into some problems > again with UA stuff and it looks like you didnt remove the UA checks from > target_setup_cmd_from_cdb? Was that intentional? I thought we agreed to

Re: [RFC 0/2] nvme/loop: Add support for controllers-per-port model

2016-06-08 Thread Nicholas A. Bellinger
On Wed, 2016-06-08 at 14:14 +0200, Christoph Hellwig wrote: > Hi Nic, > > multiple ports have been on the todo list ever since we put that short > cut in place, but your patches aren't really how this should work. > > The host NQN is not available for the actual drivers - we need to be able > to

Re: NVMe over Fabrics target implementation

2016-06-08 Thread Nicholas A. Bellinger
On Wed, 2016-06-08 at 16:12 +0300, Sagi Grimberg wrote: > >> *) Extensible to multiple types of backend drivers. > >> > >> nvme-target needs a way to absorb new backend drivers, that > >> does not effect existing configfs group layout or attributes. > >> > >> Looking at the nvmet/configfs layout

Re: NVMe over Fabrics target implementation

2016-06-08 Thread Nicholas A. Bellinger
On Wed, 2016-06-08 at 14:19 +0200, Christoph Hellwig wrote: > On Tue, Jun 07, 2016 at 10:21:41PM -0700, Nicholas A. Bellinger wrote: > > *) Extensible to multiple types of backend drivers. > > > > nvme-target needs a way to absorb new backend drivers, that > > does n

Re: NVMe over Fabrics target implementation

2016-06-07 Thread Nicholas A. Bellinger
On Tue, 2016-06-07 at 12:55 +0200, Christoph Hellwig wrote: > There is absolutely no point in dragging in an overcomplicated configfs > structure for a very simple protocol which also is very different from > SCSI in it's nitty gritty details. Please be more specific wrt the two individual

[RFC 2/2] nvme/loop: Add support for controller-per-port model

2016-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch introduces loopback support for a nvme host controller per nvmet_port instance model, following what we've done in drivers/target/loopback/ for allowing multiple host LLDs to co-exist. It changes nvme_loop_add_port() to use

[RFC 1/2] nvme-fabrics: Add nvmf_get_default_host helper

2016-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch adds a nvmf_get_default_host() helper used to setup nvmf_ctrl_options->host to internal nvmf_default_host reference, following existing nvmf_parse_options() code. Note it's required for nvme-loop multi-controller support,

[RFC 0/2] nvme/loop: Add support for controllers-per-port model

2016-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> Hi again folks, So building on the nvmet/configfs-ng WIP posted yesterday: http://marc.info/?l=linux-scsi=146528147018404=2 This series adds support for nvme/loop to utilize a nvme host controller per nvmet_port, instead of a single har

[RFC 0/8] nvmet: Add support for multi-tenant configfs

2016-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> Hi folks, Here's the first pass of a nvmet multi-tenant configfs layout, following what we've learned in target_core_fabric_configfs.c wrt to independent operation of storage endpoints. Here is how the running RFC-v1 code currently looks:

[RFC 2/8] nvmet: Add support for configfs-ng multi-tenant logic

2016-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch introduces support for configfs-ng, that allows for multi-tenant /sys/kernel/config/nvmet/subsystems/$SUBSYS_NQN/ operation, using existing /sys/kernel/config/target/core/ backends from target-core to be configfs symlinked as pe

[RFC 5/8] nvmet/io-cmd: Hookup sbc_ops->execute_sync_cache backend ops

2016-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts nvmet_execute_flush() to utilize sbc_ops->execute_sync_cache() for target_iostate submission into existing backends drivers via configfs in /sys/kernel/config/target/core/. Cc: Jens Axboe <ax...@fb.com> Cc: Chris

[RFC 7/8] nvmet/admin-cmd: Hookup T10-PI to ID_NS.ms + ID_NS.dps feature bits

2016-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch updates nvmet_execute_identify_ns() to report target-core backend T10-PI related feature bits to the NVMe host controller. Note this assumes support for NVME_NS_DPC_PI_TYPE1 and NVME_NS_DPC_PI_TYPE3 as reported by backend drive

[RFC 8/8] nvme/loop: Add support for bio integrity handling

2016-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch adds support for nvme/loop block integrity, based upon the reported ID_NS.ms + ID_NS.dps feature bits in nvmet_execute_identify_ns(). Cc: Jens Axboe <ax...@fb.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Martin Pete

[RFC 6/8] nvmet/io-cmd: Hookup sbc_ops->execute_unmap backend ops

2016-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts nvmet_execute_discard() to utilize sbc_ops->execute_unmap() for target_iostate submission into existing backends drivers via configfs in /sys/kernel/config/target/core/. Cc: Jens Axboe <ax...@fb.com> Cc: Chris

[RFC 3/8] nvmet: Hookup nvmet_ns->dev to nvmet_ns_enable

2016-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch hooks up nvmet_ns_enable() to accept the RCU protected struct se_device provided as a configfs symlink from existing /sys/kernel/config/target/core/ driver backends. Also, drop the now unused internal ns->bdev + ns->devic

[RFC 4/8] nvmet/io-cmd: Hookup sbc_ops->execute_rw backend ops

2016-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts nvmet_execute_rw() to utilize sbc_ops->execute_rw() for target_iostate + target_iomem based I/O submission into existing backends drivers via configfs in /sys/kernel/config/target/core/. This includes support for passi

[RFC 1/8] nvmet: Add nvmet_fabric_ops get/put transport helpers

2016-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch introduces two helpers for obtaining + releasing nvmet_fabric_ops for nvmet_port usage, and the associated struct module ops->owner reference. This is required in order to support nvmet/configfs-ng and multiple nvmet_port config

Re: NVMe over Fabrics target implementation

2016-06-07 Thread Nicholas A. Bellinger
Hi HCH & Co, On Mon, 2016-06-06 at 23:22 +0200, Christoph Hellwig wrote: > This patch set adds a generic NVMe over Fabrics target. The > implementation conforms to the NVMe 1.2b specification (which > includes Fabrics) and provides the NVMe over Fabrics access > to Linux block devices. > Thanks

[PATCH-v2 14/16] target: Make sbc_ops accessable via target_backend_ops

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch allows backend driver sbc_ops function pointers to be accessed externally, so external target consumers can perform target_iostate + target_iomem I/O submission outside of /sys/kernel/config/target/$FABRIC/ users. Specifically,

[PATCH-v2 08/16] target/sbc: Convert sbc_dif_copy_prot to target_iostate

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts sbc_dif_copy_prot() to use struct target_iomem for existing T10-PI scatterlist memory and scatterlist count dereferences. Also convert the single external user in rd_do_prot_rw() code. Cc: Jens Axboe <ax...@f

[PATCH-v2 05/16] target: Setup target_iostate memory in __target_execute_cmd

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch sets up the required target_iostate pointers to se_cmd->execute_cmd() via existing sbc_ops. This includes: - struct se_device, - struct target_iomem, - and ->t_comp_func() callback. Cc: Jens Axboe <ax...@fb.com

[PATCH-v2 16/16] target/iblock: Convert to inline bio/bvec + blk_poll

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts IBLOCK to use inline_bio and inline_bvec as part of target_iostate, and converts iblock_execute_rw() and iblock_execute_write_same() accordingly. Also, it follows nvme-target/io-cmd code and uses blk_poll() for both

[PATCH-v2 02/16] target: Add target_iomem descriptor

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch introduces a new struct target_iomem descriptor containing scatterlist memory + scatterlist counts within existing struct se_cmd. This includes: - t_data_* // Used to store READ/WRITE payloads - t_data_*_orig // Used to

[PATCH-v2 03/16] target: Add target_iostate descriptor

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch introduces a new struct target_iostate descriptor containing logical block address, length in bytes, data_direction, T10-PI, and target_iostate completion callback. This includes: - t_task_* // Used for LBA + Number o

[PATCH-v2 11/16] target/sbc: Convert sbc_ops->execute_sync_cache to target_iostate

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch convert IBLOCK + FILEIO for sbc_ops->execute_sync_cache() to accept struct target_iostate, and avoid backend driver sync_cache SCSI CDB decoding for immediate as reported by HCH. Reported-by: Christoph Hellwig <h...@lst.

[PATCH-v2 07/16] target/sbc: Convert sbc_ops->execute_rw to target_iostate

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> Convert IBLOCK, FILEIO and RD to use target_iostate. This includes converting sbc_ops->execute_rw() to accept a function pointer callback: void (*t_comp_func)(struct target_iostate *, u16)) As well as a 'bool fua_write' flag for

[PATCH-v2 06/16] target: Convert se_cmd->execute_cmd to target_iostate

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts the se_cmd->execute_cmd() caller to accept target_iostate, and updates existing users tree-wide. Cc: Jens Axboe <ax...@fb.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Martin Petersen <martin.peter

[PATCH-v2 15/16] target/sbc: Convert ->execute_unmap to __blkdev_issue_discard

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> As prep for nvme-target, this patch converts sbc_ops->execute_unmap() usage in existing target_core_sbc.c, IBLOCK and FILEIO backend drivers to use __blkdev_issue_discard() with async completion. Also, propigate struct bio ** as a ne

[PATCH-v2 12/16] target/sbc: Convert sbc_ops->execute_write_same to target_iostate

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts IBLOCK + FILEIO for sbc_ops->execute_write_same() to accept struct target_iostate, and pass a new get_sectors() function pointer used to decode a command set specific number of logical blocks (NoLB). Cc: Jens Axboe <

[PATCH-v2 09/16] target/file: Convert sbc_dif_verify to target_iostate

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts sbc_dif_verify() and associated existing T10-PI FILEIO driver to use target_iostate Also add FIXMEs for target_*_prot_action for target_iostate + target_iomem so this logic can eventually used by external drivers

[PATCH-v2 13/16] target/sbc: Convert sbc_ops->execute_unmap to target_iostate

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts IBLOCK + FILEIO for sbc_ops->execute_unmap() to accept struct target_iostate. Cc: Jens Axboe <ax...@fb.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Martin Petersen <martin.peter...@oracle.com> Cc: Sagi

[PATCH-v2 04/16] target: Add target_complete_ios wrapper

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch adds a basic target_complete_ios() wrapper to dereference struct se_cmd from struct target_iostate, and invoke existing target_complete_cmd() code. It also includes PSCSI + TCMU backend driver conversions. Cc: Jens Axboe <ax.

[PATCH-v2 01/16] target: Fix for hang of Ordered task in TCM

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> If a command with a Simple task attribute is failed due to a Unit Attention, then a subsequent command with an Ordered task attribute will hang forever. The reason for this is that the Unit Attention status is c

[PATCH-v2 00/16] target: Allow backends to operate independent of se_cmd

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> Hi Jens, HCH & Co, This -v2 series introduces target_iostate + target_iomem descriptors that abstract what existing target backend drivers require in order to process I/O, sync_cache, write_same and unmap via sbc_ops. The purpose i

[PATCH-v2 10/16] target/iblock: Fold iblock_req into target_iostate

2016-06-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch folks the two existing iblock_req members into target_iostate, and updates associated sbc_ops iblock_execute_rw() iblock_execute_write_same() callbacks. Also, go ahead and drop target_iostate->priv now that it's unused. Cc: J

[PATCH 12/14] target/sbc: Convert sbc_ops->execute_write_same to target_iostate

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts IBLOCK + FILEIO for sbc_ops->execute_write_same() to accept struct target_iostate, and pass a new get_sectors() function pointer used to decode a command set specific number of logical blocks (NoLB). Cc: Jens Axboe <

[PATCH 07/14] target/sbc: Convert sbc_ops->execute_rw to target_iostate

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> Convert IBLOCK, FILEIO and RD to use target_iostate. This includes converting sbc_ops->execute_rw() to accept a function pointer callback: void (*t_comp_func)(struct target_iostate *, u16)) As well as a 'bool fua_write' flag for

[PATCH 06/14] target: Convert se_cmd->execute_cmd to target_iostate

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts the se_cmd->execute_cmd() caller to accept target_iostate, and updates existing users tree-wide. Cc: Jens Axboe <ax...@fb.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Martin Petersen <martin.peter

[PATCH 00/14] target: Allow backends to operate independent of se_cmd

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> Hi Jens, HCH & Co, This series introduces target_iostate and target_iomem descriptors that abstract what existing target backend drivers require in order to process I/O, sync_cache, write_same and unmap via sbc_ops. The purpose i

[PATCH 01/14] target: Fix for hang of Ordered task in TCM

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> If a command with a Simple task attribute is failed due to a Unit Attention, then a subsequent command with an Ordered task attribute will hang forever. The reason for this is that the Unit Attention status is c

[PATCH 04/14] target: Add target_complete_ios wrapper

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch adds a basic target_complete_ios() wrapper to dereference struct se_cmd from struct target_iostate, and invoke existing target_complete_cmd() code. It also includes PSCSI + TCMU backend driver conversions. Cc: Jens Axboe <ax.

[PATCH 08/14] target/sbc: Convert sbc_dif_copy_prot to target_iostate

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts sbc_dif_copy_prot() to use struct target_iomem for existing T10-PI scatterlist memory and scatterlist count dereferences. Also convert the single external user in rd_do_prot_rw() code. Cc: Jens Axboe <ax...@f

[PATCH 03/14] target: Add target_iostate descriptor

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch introduces a new struct target_iostate descriptor containing logical block address, length in bytes, data_direction, T10-PI, and target_iostate completion callback. This includes: - t_task_* // Used for LBA + Number o

[PATCH 05/14] target: Setup target_iostate memory in __target_execute_cmd

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch sets up the required target_iostate pointers to se_cmd->execute_cmd() via existing sbc_ops. This includes: - struct se_device, - struct target_iomem, - and ->t_comp_func() callback. Cc: Jens Axboe <ax...@fb.com

[PATCH 14/14] target: Make sbc_ops accessable via target_backend_ops

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch allows backend driver sbc_ops function pointers to be accessed externally, so external target consumers can perform target_iostate + target_iomem I/O submission outside of /sys/kernel/config/target/$FABRIC/ users. Specifically,

[PATCH 11/14] target/sbc: Convert sbc_ops->execute_sync_cache to target_iostate

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch convert IBLOCK + FILEIO for sbc_ops->execute_sync_cache() to accept struct target_iostate, and avoid backend driver sync_cache SCSI CDB decoding for immediate as reported by HCH. Reported-by: Christoph Hellwig <h...@lst.

[PATCH 13/14] target/sbc: Convert sbc_ops->execute_unmap to target_iostate

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts IBLOCK + FILEIO for sbc_ops->execute_unmap() to accept struct target_iostate. Cc: Jens Axboe <ax...@fb.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Martin Petersen <martin.peter...@oracle.com> Cc: Sagi

[PATCH 09/14] target/file: Convert sbc_dif_verify to target_iostate

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts sbc_dif_verify() and associated existing T10-PI FILEIO driver to use target_iostate Also add FIXMEs for target_*_prot_action for target_iostate + target_iomem so this logic can eventually used by external drivers

[PATCH 02/14] target: Add target_iomem descriptor

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch introduces a new struct target_iomem descriptor containing scatterlist memory + scatterlist counts within existing struct se_cmd. This includes: - t_data_* // Used to store READ/WRITE payloads - t_data_*_orig // Used to

[PATCH 10/14] target/iblock: Fold iblock_req into target_iostate

2016-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch folks the two existing iblock_req members into target_iostate, and updates associated sbc_ops iblock_execute_rw() iblock_execute_write_same() callbacks. Also, go ahead and drop target_iostate->priv now that it's unused. Cc: J

Re: Performance degradation on 4.6

2016-06-01 Thread Nicholas A. Bellinger
Hi Robert, Adding HCH + Sagi CC, as there have been significant changes made in RDMA for v4.6 code. On Tue, 2016-05-31 at 17:46 -0600, Robert LeBlanc wrote: > I've been working with iSER trying to maximize performance. I have two > FDR Infiniband cards (three ports total) and I've created

Re: [target:queue 6/14] drivers/target/target_core_sbc.c:384:19: error: assignment from incompatible pointer type

2016-06-01 Thread Nicholas A. Bellinger
t; incompatible pointer type [-Werror=incompatible-pointer-types] >cmd->execute_cmd = ops->execute_sync_cache; > ^ >cc1: some warnings being treated as errors > > vim +384 drivers/target/target_core_sbc.c > > cd063bef Nicholas Bellinger 2012-11-07 378

Re: [target:queue 3/14] include/trace/events/target.h:131:1: error: 'struct se_cmd' has no member named 'data_length'

2016-06-01 Thread Nicholas A. Bellinger
gt; __print_hex(__entry->cdb, 16), > e5c0d6ad5 Roland Dreier 2013-06-26 204 > show_task_attribute_name(__entry->task_attribute), > e5c0d6ad5 Roland Dreier 2013-06-26 205 > scsi_command_size(__entry->cdb) <= 16 ? > e5c0d6ad5 Roland Dreier 20

Re: [PATCH v3] ibmvscsis: Initial commit of IBM VSCSI Tgt Driver

2016-05-27 Thread Nicholas A. Bellinger
Hi Bryant, On Fri, 2016-05-27 at 09:32 -0500, Bryant G. Ly wrote > diff --git a/drivers/scsi/ibmvscsi/ibmvscsi_tgt.c > b/drivers/scsi/ibmvscsi/ibmvscsi_tgt.c > new file mode 100644 > index 000..292d129 > --- /dev/null > +++ b/drivers/scsi/ibmvscsi/ibmvscsi_tgt.c > + > +static struct

[GIT PULL] target updates for v4.7-rc1

2016-05-27 Thread Nicholas A. Bellinger
(1): iscsi-target: graceful disconnect on invalid mapping to iovec Laurence Oberman (1): tcm_qla2xxx Add SCSI command jammer/discard capability Lee Duncan (2): target: make target db location configurable target: use new "dbroot" target attribute Nicholas Bellinger (4)

Re: [PATCH v3 13/13] cxgbit: add files for cxgbit.ko

2016-05-25 Thread Nicholas A. Bellinger
On Wed, 2016-05-25 at 23:41 +0300, Or Gerlitz wrote: > On Wed, May 25, 2016 at 8:40 PM, Steve Wise > wrote: > >> From: Or Gerlitz [mailto:gerlitz...@gmail.com] > >> > . > > > > Hey Or and Nicholas, > > > > I've been staying out of this directly due to my workload.

Re: [PATCH] tcm_qla2xxx Add SCSI command jammer/discard capability to the tcm_qla2xxx module

2016-05-25 Thread Nicholas A. Bellinger
On Wed, 2016-05-25 at 16:12 -0400, Laurence Oberman wrote: > > Hi Nicholas, > > Can we pull this one in for submission now that its been acked'd by Himanshu. > Thanks > Laurence This patch has been queued in target-pending/for-next for the last weeks, and will be included in the v4.7-rc1

[PATCH] target: Fix missing complete during ABORT_TASK + CMD_T_FABRIC_STOP

2016-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> During transport_generic_free_cmd() with a concurrent TMR ABORT_TASK and shutdown CMD_T_FABRIC_STOP bit set, the caller will be blocked on se_cmd->cmd_wait_stop completion until the final kref_put() -> target_release_cmd_kref() has

Re: [Bug 118081] New: open-iscsi Ping timeout erro

2016-05-24 Thread Nicholas A. Bellinger
Hey Mike & Co, Apologies for missing this bug-report. Comments below. (Adding target-devel CC') On Fri, 2016-05-13 at 11:19 -0500, Mike Christie wrote: > On 05/11/2016 10:34 PM, bugzilla-dae...@bugzilla.kernel.org wrote: > > https://bugzilla.kernel.org/show_bug.cgi?id=118081 > > > >

Re: [PATCH v3 13/13] cxgbit: add files for cxgbit.ko

2016-05-24 Thread Nicholas A. Bellinger
Hi Or & Co, On Wed, 2016-05-18 at 14:45 +0300, Or Gerlitz wrote: > On Sat, Apr 30, 2016 at 6:54 PM, Or Gerlitz wrote: > > On Tue, Apr 19, 2016 at 9:30 PM, Varun Prakash wrote: > >> cxgbit.h - This file contains data structure > >> definitions for

Re: [PATCH] Fix for hang of Ordered task in TCM

2016-05-23 Thread Nicholas A. Bellinger
Hi Bryant, On Mon, 2016-05-23 at 19:17 -0400, Bryant G Ly wrote: > Quoting "Nicholas A. Bellinger" <n...@linux-iscsi.org>: > > > > > > So AFAICT for delayed commands, the above patch ends up skipping these > > three checks subsequently when doi

Re: [PATCH] Fix for hang of Ordered task in TCM

2016-05-23 Thread Nicholas A. Bellinger
On Wed, 2016-05-18 at 14:35 -0500, Michael Cyr wrote: > On 5/18/16 12:53 AM, Nicholas A. Bellinger wrote: > > Hi Michael, > > > > On Fri, 2016-05-13 at 17:15 -0500, Michael Cyr wrote: > >> If a command with a Simple task attribute is failed due to a Unit > >&g

Re: [PATCH] Fix for hang of Ordered task in TCM

2016-05-18 Thread Nicholas A. Bellinger
Hi Michael, On Fri, 2016-05-13 at 17:15 -0500, Michael Cyr wrote: > If a command with a Simple task attribute is failed due to a Unit > Attention, then a subsequent command with an Ordered task attribute will > hang forever. The reason for this is that the Unit Attention status is > checked for

Re: [RFC 14/34] iscsi-target: export symbols

2016-04-08 Thread Nicholas A. Bellinger
On Sun, 2016-03-13 at 17:43 +0530, Varun Prakash wrote: > On Fri, Mar 11, 2016 at 10:28:33PM -0800, Nicholas A. Bellinger wrote: > > Hi Varun & Co, > > > > On Mon, 2016-03-07 at 15:22 -0800, Nicholas A. Bellinger wrote: > > > > > > > > > S

Re: Cant write to max_sectors_kb on 4.5.0 SRP target

2016-04-07 Thread Nicholas A. Bellinger
Hi Laurence, On Thu, 2016-04-07 at 17:15 -0400, Laurence Oberman wrote: > Hello > > I have been testing the SRP initiator code to an LIO array here and > part of the testing requires me to set the max_sectors_kb size to get > 4k I/O's. > This has been due to me having to debug various sg_map

Re: [PATCH 0/2] target: make location of /var/target configurable

2016-04-04 Thread Nicholas A. Bellinger
On Mon, 2016-04-04 at 18:15 -0700, Lee Duncan wrote: > On 04/02/2016 08:36 PM, Nicholas A. Bellinger wrote: > > On Thu, 2016-03-31 at 11:05 -0700, Lee Duncan wrote: > >> These patches make the location of "/var/target" configurable, > >> th

Re: QoS for iSCSI target?

2016-04-04 Thread Nicholas A. Bellinger
On Mon, 2016-04-04 at 17:01 -0600, Chris Friesen wrote: > On 04/04/2016 04:29 PM, Nicholas A. Bellinger wrote: > > On Mon, 2016-04-04 at 09:20 -0600, Chris Friesen wrote: > >> On 04/02/2016 07:15 PM, Nicholas A. Bellinger wrote: > >>> On Fri, 2016-04-01 at 12

Re: QoS for iSCSI target?

2016-04-04 Thread Nicholas A. Bellinger
On Mon, 2016-04-04 at 09:20 -0600, Chris Friesen wrote: > On 04/02/2016 07:15 PM, Nicholas A. Bellinger wrote: > > On Fri, 2016-04-01 at 12:35 -0600, Chris Friesen wrote: > > >>>> On a slightly different note, is there any way to throttle or limit the > >>

Re: [PATCH] tcm_qla2xxx Add SCSI command jammer/discard capability to the tcm_qla2xxx module

2016-04-04 Thread Nicholas A. Bellinger
On Sun, 2016-04-03 at 09:57 -0400, Laurence Oberman wrote: > Hi Nicholas > > Apologies for the top posting, that was in my haste to correct the prior > patch that had the typo. > When I investigated the attributes it looked like I would have had to create > a store and a check function and call

Re: [PATCH 0/2] target: make location of /var/target configurable

2016-04-02 Thread Nicholas A. Bellinger
On Thu, 2016-03-31 at 11:05 -0700, Lee Duncan wrote: > These patches make the location of "/var/target" configurable, > though it still defauls to "/var/target". > > This configuration is accomplished via the configfs > top-level target attribute "dbroot", i.e. dumping > out

Re: QoS for iSCSI target?

2016-04-02 Thread Nicholas A. Bellinger
On Fri, 2016-04-01 at 12:35 -0600, Chris Friesen wrote: > On 03/31/2016 01:05 AM, Nicholas A. Bellinger wrote: > > On Wed, 2016-03-16 at 10:48 -0600, Chris Friesen wrote: > >> On 03/11/2016 01:45 AM, Nicholas A. Bellinger wrote: > >>> On Thu, 2016-03-10 at 23:30

Re: tcm_qla2xxx Add SCSI command jammer/discard capabilty to the tcm_qla2xxx module - revision4

2016-04-02 Thread Nicholas A. Bellinger
Hi Laurence, On Sat, 2016-04-02 at 13:10 -0400, Laurence Oberman wrote: > Hello Himanshu > > I noticed a typo in the patch I submitted here is the corrected patch. > Please ignore the prior patch > > I was missing the full CONFIG name in the #ifdef check > > Corrected Patch Two quick process

[GIT PULL] target fixes for v4.6-rc2

2016-04-02 Thread Nicholas A. Bellinger
Hello Linus, Here are outstanding target-pending fixes for v4.6-rc2. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master This includes fixes from HCH for -rc1 configfs default_groups conversion changes that ended up breaking some

Re: QoS for iSCSI target?

2016-03-31 Thread Nicholas A. Bellinger
On Wed, 2016-03-16 at 10:48 -0600, Chris Friesen wrote: > On 03/11/2016 01:45 AM, Nicholas A. Bellinger wrote: > > On Thu, 2016-03-10 at 23:30 -0800, Christoph Hellwig wrote: > >> On Thu, Mar 10, 2016 at 04:24:25PM -0600, Chris Friesen wrote: > >>> Hi, > >

Re: tcm_qla2xxx Add SCSI command jammer/discard capabilty to the tcm_qla2xxx module - revision3

2016-03-30 Thread Nicholas A. Bellinger
(Adding target-devel + Qlogic target folks) On Tue, 2016-03-29 at 22:05 -0700, Bart Van Assche wrote: > On 03/29/16 07:42, Laurence Oberman wrote: > > I have been using this jammer functionality to continue testing the SCSI > > F/C drivers and recovery for over a year now. > > Any chance you

[GIT PULL] target updates for v4.6-rc1

2016-03-22 Thread Nicholas A. Bellinger
onn Mike Christie (1): target/iblock: pass WRITE_SAME to device if possible Nicholas Bellinger (15): target: Add target_alloc_session() helper function vhost/scsi: Convert to target_alloc_session usage tcm_qla2xxx: Convert to target_alloc_session usage tcm_fc: Convert to target_alloc_sess

Re: [RFC 14/34] iscsi-target: export symbols

2016-03-11 Thread Nicholas A. Bellinger
Hi Varun & Co, On Mon, 2016-03-07 at 15:22 -0800, Nicholas A. Bellinger wrote: > So obviously this is going to take longer to sort out, and likely not > end up being v4.6-rc1 material. That is OK, as the end result will be > better code. :) > > That said, it would make s

Re: QoS for iSCSI target?

2016-03-10 Thread Nicholas A. Bellinger
On Thu, 2016-03-10 at 23:30 -0800, Christoph Hellwig wrote: > On Thu, Mar 10, 2016 at 04:24:25PM -0600, Chris Friesen wrote: > > Hi, > > > > I'm looking for information on whether the iSCSI target in the kernel offers > > any way to do QoS between traffic driven by different initiators. > > > >

[PATCH-v4 04/14] tcm_qla2xxx: Convert to target_alloc_session usage

2016-03-10 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts existing qla2xxx target mode assignment of struct qla_tgt_sess related sid + loop_id values to use a callback via the new target_alloc_session API caller. Cc: Himanshu Madhani <himanshu.madh...@qlogic.com> Cc

[PATCH-v4 13/14] tcm_fc: Convert to TARGET_SCF_ACK_KREF I/O + TMR krefs

2016-03-10 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts tcm_fc to modern TARGET_SCF_ACK_KREF usage for ft_queue_status(), and fixes ft_check_stop_free() to return transport_generic_free_cmd() for ->cmd_kref. It also converts TM request -> ft_send_tm() to use ACK_KREF

[PATCH-v4 14/14] ib_srpt: Convert to percpu_ida tag allocation

2016-03-10 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts ib_srpt to use existing percpu_ida tag pre-allocation for struct srpt_send_ioctx. This allows ib_srpt to drop it's internal pre-allocation mechanisms with the extra spin_lock_irqsave, and use percpu_ida common code for

[PATCH-v4 05/14] tcm_fc: Convert to target_alloc_session usage

2016-03-10 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts tcm_fc target mode addition of tf_sess->hash to port_id hlist_head using the new alloc_session callback(). Cc: Vasu Dev <vasu@linux.intel.com> Cc: Mark Rustad <mark.d.rus...@intel.com> Cc: Ro

[PATCH-v4 12/14] xen-scsiback: Convert to TARGET_SCF_ACK_KREF I/O krefs

2016-03-10 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts xen-scsiback to modern TARGET_SCF_ACK_KREF usage for scsiback_cmd_done() callback path. It also also converts TMR -> scsiback_device_action() to use modern target_submit_tmr() code. Acked-by: Juergen Gross <jgr

[PATCH-v4 10/14] usb-gadget/tcm: Convert to TARGET_SCF_ACK_KREF I/O krefs

2016-03-10 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch drops struct usbg_cmd->kref internal kref-erence usage, for proper TARGET_SCF_ACK_KREF conversion. Tested-by: Andrzej Pietrasiewicz <andrze...@samsung.com> Cc: Sebastian Andrzej Siewior <bige...@linutronix.de> Cc: Fe

[PATCH-v4 07/14] sbp-target: Conversion to percpu_ida tag pre-allocation

2016-03-10 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts sbp-target to use struct sbp_target_request descriptor tag pre-allocation using percpu_ida. (Fix sbp_mgt_get_req() IS_ERR failure checking - Dan Carpenter) (Add missing sbp_target_request tag memset - Chris Boot)

[PATCH-v4 08/14] sbp-target: Convert to TARGET_SCF_ACK_KREF I/O krefs

2016-03-10 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts sbp-target to modern TARGET_SCF_ACK_KREF usage for sbp_send_status() callback path, and drops the now obsolete sbp_free_request() failure path calls. Acked-by: Chris Boot <bo...@bootc.net> Tested-by: Chris Boot <

[PATCH-v4 09/14] usb-gadget/tcm: Conversion to percpu_ida tag pre-allocation

2016-03-10 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts usb-gadget target to use percpu_ida tag pre-allocation for struct usbg_cmd descriptor, in order to avoid fast-path struct usbg_cmd memory allocations. Note by default this is currently hardcoded to 128. Tested-by: A

[PATCH-v4 11/14] xen-scsiback: Convert to percpu_ida tag allocation

2016-03-10 Thread Nicholas A. Bellinger
From: Nicholas Bellinger <n...@linux-iscsi.org> This patch converts xen-scsiback to use percpu_ida tag pre-allocation for struct vscsibk_pend descriptor, in order to avoid fast-path struct vscsibk_pend memory allocations. Note by default this is currently hardcoded to 128. (Add w

<    1   2   3   4   5   6   7   8   9   10   >