Re: [PATCH] drivers: target: target_core_mod: use div64_u64_rem() instead of operator '%' for u64

2014-01-09 Thread Hannes Reinecke
On 01/09/2014 12:18 AM, Nicholas A. Bellinger wrote: On Wed, 2014-01-08 at 08:32 +0100, Hannes Reinecke wrote: On 12/24/2013 04:35 AM, Chen Gang wrote: On 12/23/2013 02:51 PM, Nicholas A. Bellinger wrote: On Sun, 2013-12-22 at 17:17 +0800, Chen Gang wrote: SNIP The related fix patch

Re: status of block-integrity

2014-01-09 Thread Hannes Reinecke
On 01/08/2014 04:23 PM, Martin K. Petersen wrote: Hannes == Hannes Reinecke h...@suse.de writes: Hannes, Hannes As there is no user (apart from oracleasm) no-one can attach Hannes protection information to any data, so even the most dedicated Hannes admin cannot exercise this path, let alone

RE: [PATCH 3.12 033/118] usb: xhci: Link TRB must not occur within a USB payload burst

2014-01-09 Thread David Laight
From: walt ... I'm still wondering if I'm suffering from hardware quirks. From the first day I installed my usb3 adapter card and the usb3 disk docking station I've noticed some quirky behavior. Ah - this isn't an 'on chip' usb3 adapter. Some kind of PCIe card ? e.g. I boot the machine

iSCSI request keep rejected by microsoft iSCSI target because of write_same check

2014-01-09 Thread vaughan
We are testing linux iscsi boot under UEFI mode with Microsoft iSCSI Software Target. But failed for rejected by target. When do a normal iscsi connection, iscsi connection is keeping rejected and recover. See below: Dec 15 20:09:07 ol6u4gx64 kernel: scsi11 : iSCSI Initiator over TCP/IP Dec 15

Re: [PATCH 07/14] target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16

2014-01-09 Thread Sagi Grimberg
On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch updates sbc_emulate_readcapacity_16() to set P_TYPE and PROT_EN bits when DIF emulation is enabled by the backend device. Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph

Re: [PATCH 13/14] target/rd: Add DIF protection into rd_execute_rw

2014-01-09 Thread Sagi Grimberg
On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds support for DIF protection into rd_execute_rw() code for WRITE/READ I/O using sbc_dif_verify_[write,read]() logic. It also adds rd_get_prot_table() for locating protection SGLs

Re: [PATCH 02/14] target: Add DIF CHECK_CONDITION ASC/ASCQ exception cases

2014-01-09 Thread Sagi Grimberg
On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org 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

Re: [PATCH 01/14] target: Add DIF related base definitions

2014-01-09 Thread Sagi Grimberg
On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org 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

Re: [PATCH 09/14] target/configfs: Expose protection device attributes

2014-01-09 Thread Sagi Grimberg
On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org 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_version: Protection

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-09 Thread Rafael J. Wysocki
On Thursday, January 09, 2014 09:29:59 AM Aaron Lu wrote: On 01/09/2014 05:21 AM, Alan Stern wrote: On Wed, 8 Jan 2014, Phillip Susi wrote: You issue a REQUEST SENSE command and that returns status indicating whether the drive is stopped, or in standby. See my patches. One of I never

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-09 Thread Rafael J. Wysocki
On Thursday, January 09, 2014 01:17:12 PM Rafael J. Wysocki wrote: On Thursday, January 09, 2014 09:29:59 AM Aaron Lu wrote: On 01/09/2014 05:21 AM, Alan Stern wrote: On Wed, 8 Jan 2014, Phillip Susi wrote: You issue a REQUEST SENSE command and that returns status indicating whether

Re: [PATCH 03/14] target/sbc: Add sbc_check_prot + update sbc_parse_cdb for DIF

2014-01-09 Thread Sagi Grimberg
On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds sbc_check_prot() for performing various DIF related CDB sanity checks, along with setting SCF_PROT once sanity checks have passed. Also, add calls in sbc_parse_cdb() for

Re: [PATCH 3.12 033/118] usb: xhci: Link TRB must not occur within a USB payload burst

2014-01-09 Thread walt
On 01/09/2014 02:05 AM, David Laight wrote: From: walt ... I'm still wondering if I'm suffering from hardware quirks. From the first day I installed my usb3 adapter card and the usb3 disk docking station I've noticed some quirky behavior. Ah - this isn't an 'on chip' usb3 adapter. Some

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-09 Thread Alan Stern
On Thu, 9 Jan 2014, Aaron Lu wrote: It's a knotty situation. The only way to find out whether the disk is spinning is to ask it, which requires doing I/O, which requires spinning up the disk. Maybe we need to add a mechanism to the block layer's runtime PM implementation for addressing

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-09 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/9/2014 10:40 AM, Alan Stern wrote: We should change the code in the block layer. blk_pm_peek_request should allow requests with REQ_PM set to go through, no matter what the rpm_status is. Then the disk driver could query the disk (to see

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-09 Thread Alan Stern
On Thu, 9 Jan 2014, Phillip Susi wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/9/2014 10:40 AM, Alan Stern wrote: We should change the code in the block layer. blk_pm_peek_request should allow requests with REQ_PM set to go through, no matter what the rpm_status is. Then

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-09 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/9/2014 11:14 AM, Alan Stern wrote: That's true, but it isn't a problem. We know that requests with REQ_PM are sent only at certain, controlled times. In particular, the only time such a request would be sent while the disk is RPM_SUSPENDED

[PATCH 02/11] IB/isert: seperate connection protection domains and dma MRs

2014-01-09 Thread Sagi Grimberg
It is more correct to seperate connections protection domains and dma_mr handles. protection information support requires to do so. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/ulp/isert/ib_isert.c | 46 ---

[PATCH 03/11] IB/isert: Avoid frwr notation, user fastreg

2014-01-09 Thread Sagi Grimberg
Use fast registration lingo. fast registration will also incorporate signature/DIF registration. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/ulp/isert/ib_isert.c | 84 --- drivers/infiniband/ulp/isert/ib_isert.h |8 ++-- 2 files

[PATCH 01/11] Target/core: Fixes for isert compilation

2014-01-09 Thread Sagi Grimberg
replace prot_interleaved with prot_handover in se_cmd. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- include/target/target_core_base.h | 22 ++ 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/include/target/target_core_base.h

[PATCH 00/11] iSER target initial support for T10-DIF offload

2014-01-09 Thread Sagi Grimberg
Hey Nic, MKP, SCSI and RDMA folks, This patchset adds basic support for T10-DIF protection information offload in iSER target on top of Nic's recent work and RDMA signature verbs API. This code was tested with my own implementation of the target core T10-PI support which was designed mainly to

[PATCH 04/11] IB/isert: Move fastreg descriptor creation to a function

2014-01-09 Thread Sagi Grimberg
This routine may be called both by fast registration descriptors for data and for integrity buffers. This patch does not change any functionality. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/ulp/isert/ib_isert.c | 52 +++ 1 files changed,

[PATCH 07/11] IB/isert: pass scatterlist instead of cmd to fast_reg_mr routine

2014-01-09 Thread Sagi Grimberg
This routine may help for protection registration as well. This patch does not change any functionality. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/ulp/isert/ib_isert.c | 28 1 files changed, 12 insertions(+), 16 deletions(-) diff --git

[PATCH 05/11] Target/iscsi: Add T10-PI indication for iscsi_portal_group

2014-01-09 Thread Sagi Grimberg
In case an iscsi portal group will be defined as t10_pi enabled, all connections on top of it will support protected transactions. T10-PI support may require extra reource allocation and maintenance by the transport layer, so we don't want to apply them on non-t10_pi network portals. This is a

[PATCH 06/11] IB/isert: Initialize T10-PI resources

2014-01-09 Thread Sagi Grimberg
Upon connection establishment check if network portal is T10-PI enabled and allocate T10-PI resources if necessary, allocate signature enabled memory regions and mark connection queue-pair as signature enabled. Signed-off-by: Sagi Grimberg sa...@mellanox.com ---

[PATCH 10/11] IB/isert: Support T10-PI protected transactions

2014-01-09 Thread Sagi Grimberg
In case the Target core passed transport T10 protection operation: 1. Register data buffer (data memory region) 2. Register protection buffer if exsists (prot memory region) 3. Register signature region (signature memory region) - use work request IB_WR_REG_SIG_MR 4. Execute RDMA 5. Upon RDMA

[PATCH 09/11] IB/isert: Accept RDMA_WRITE completions

2014-01-09 Thread Sagi Grimberg
In case of protected transactions, we will need to check the protection status of the transaction before sending SCSI response. So be ready for RDMA_WRITE completions. currently we don't ask for these completions, but for T10-PI we will. Signed-off-by: Sagi Grimberg sa...@mellanox.com ---

[PATCH 11/11] Target/configfs: Expose iSCSI network portal group T10-PI support

2014-01-09 Thread Sagi Grimberg
User may enable T10-PI support per network portal group. any connection established on top of it, will be required to serve protected transactions. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/target/iscsi/iscsi_target_configfs.c |6 ++

[PATCH 08/11] IB/isert: pass mr and frpl to isert_fast_reg_mr routine

2014-01-09 Thread Sagi Grimberg
This commit generalizes isert_fast_reg_mr to receive mr and frpl instead of fr_desc to do registration. In T10-PI we also register protection memory region so we want to use this routine. This commit does not change any functionality. Signed-off-by: Sagi Grimberg sa...@mellanox.com ---

Re: [PATCH/RESEND v2 1/2] Hard disk S3 resume time optimization

2014-01-09 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/7/2014 7:56 PM, Todd E Brandt wrote: On resume, the ATA port driver currently waits until the AHCI controller finishes executing the port wakeup command. This patch changes the ata_port_resume callback to issue the wakeup and then return

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-09 Thread Alan Stern
On Thu, 9 Jan 2014, Phillip Susi wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/9/2014 11:14 AM, Alan Stern wrote: That's true, but it isn't a problem. We know that requests with REQ_PM are sent only at certain, controlled times. In particular, the only time such a request

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-09 Thread Douglas Gilbert
On 14-01-07 10:40 AM, Phillip Susi wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/7/2014 10:20 AM, Alan Stern wrote: This raises two questions: Should the host's resume be allowed to complete while the host is still in error recovery? Wouldn't it be better to wait until the

Re: [patch] [SCSI] megaraid: missing bounds check in mimd_to_kioc()

2014-01-09 Thread Kees Cook
On Wed, Jan 8, 2014 at 4:27 AM, Saxena, Sumit sumit.sax...@lsi.com wrote: -Original Message- From: Dan Carpenter [mailto:dan.carpen...@oracle.com] Sent: Wednesday, October 30, 2013 10:44 PM To: DL-MegaRAID Linux Cc: James E.J. Bottomley; linux-scsi@vger.kernel.org; secur...@kernel.org;

Re: iSCSI request keep rejected by microsoft iSCSI target because of write_same check

2014-01-09 Thread Mike Christie
On 01/09/2014 04:20 AM, vaughan wrote: We are testing linux iscsi boot under UEFI mode with Microsoft iSCSI Software Target. But failed for rejected by target. When do a normal iscsi connection, iscsi connection is keeping rejected and recover. See below: Dec 15 20:09:07 ol6u4gx64 kernel:

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-09 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/9/2014 1:29 PM, Douglas Gilbert wrote: When REQUEST SENSE had its original semantics, TEST UNIT READY was the only game in town for monitoring power management. From my reading of spc4r36n.pdf section 5.1.2 Important commands for all SCSI

RE: [patch] [SCSI] megaraid: missing bounds check in mimd_to_kioc()

2014-01-09 Thread Saxena, Sumit
-Original Message- From: Kees Cook [mailto:keesc...@google.com] Sent: Friday, January 10, 2014 12:05 AM To: Saxena, Sumit Cc: Dan Carpenter; DL-MegaRAID Linux; James E.J. Bottomley; linux- s...@vger.kernel.org; secur...@kernel.org; Nico Golde; Fabian Yamaguchi Subject: Re: [patch] [SCSI]

Re: Terrible performance of sequential O_DIRECT 4k writes in SAN environment. ~3 times slower then Solars 10 with the same HBA/Storage.

2014-01-09 Thread Douglas Gilbert
On 14-01-08 08:57 AM, Sergey Meirovich wrote: Hi James, On 7 January 2014 22:57, James Smart james.sm...@emulex.com wrote: Sergey, The Thor chipset is a bit old - a 4Gig adapter. Most of our performance improvements, including parallelization, have gone into the 8G and 16G adapters. But you

Re: [patch] [SCSI] megaraid: missing bounds check in mimd_to_kioc()

2014-01-09 Thread Kees Cook
On Thu, Jan 9, 2014 at 11:53 AM, Saxena, Sumit sumit.sax...@lsi.com wrote: -Original Message- From: Kees Cook [mailto:keesc...@google.com] Sent: Friday, January 10, 2014 12:05 AM To: Saxena, Sumit Cc: Dan Carpenter; DL-MegaRAID Linux; James E.J. Bottomley; linux- s...@vger.kernel.org;

[PATCH] qla2xxx: Enhancements to enable NPIV support for QLOGIC ISPs with TCM/LIO.

2014-01-09 Thread Saurav Kashyap
Signed-off-by: Sawan Chandak sawan.chan...@qlogic.com Signed-off-by: Quinn Tran quinn.t...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com --- drivers/scsi/qla2xxx/qla_attr.c|2 + drivers/scsi/qla2xxx/qla_def.h | 12 ++- drivers/scsi/qla2xxx/qla_target.c | 150

Re: Terrible performance of sequential O_DIRECT 4k writes in SAN environment. ~3 times slower then Solars 10 with the same HBA/Storage.

2014-01-09 Thread Sergey Meirovich
Hi Duglas, On 9 January 2014 21:54, Douglas Gilbert dgilb...@interlog.com wrote: On 14-01-08 08:57 AM, Sergey Meirovich wrote: ... The strangest thing to me that this is the problem with sequential write. For example the fnic one machine is zoned to EMC XtremIO and had results: 14.43Mb/sec

Re: Terrible performance of sequential O_DIRECT 4k writes in SAN environment. ~3 times slower then Solars 10 with the same HBA/Storage.

2014-01-09 Thread Sergey Meirovich
Hi, On 9 January 2014 23:26, Sergey Meirovich rathamah...@gmail.com wrote: Hi Duglas, On 9 January 2014 21:54, Douglas Gilbert dgilb...@interlog.com wrote: On 14-01-08 08:57 AM, Sergey Meirovich wrote: ... The strangest thing to me that this is the problem with sequential write. For

Re: [PATCH 3.12 033/118] usb: xhci: Link TRB must not occur within a USB payload burst

2014-01-09 Thread Sarah Sharp
[Walt, please use reply-all to keep the list in the loop, thanks.] On Wed, Jan 08, 2014 at 04:09:14PM +, David Laight wrote: From: Sarah Sharp On Tue, Jan 07, 2014 at 03:57:00PM -0800, walt wrote: On 01/07/2014 01:21 PM, Sarah Sharp wrote: Can you please try the attached patch,

Re: iSCSI request keep rejected by microsoft iSCSI target because of write_same check

2014-01-09 Thread Martin K. Petersen
Mike == Mike Christie micha...@cs.wisc.edu writes: 2. report_opcode is optional in SPC-3, so it's possible that not all iscsi target support it. But is it correct for microsoft iSCSI target to reject the command rather than return it with normal SCSI response? Mike The iscsi spec has the

Re: status of block-integrity

2014-01-09 Thread Martin K. Petersen
Hannes == Hannes Reinecke h...@suse.de writes: Hannes With LID1/XCopy you have the ambiguity on where to actually send Hannes the command to; the spec is silent in this area. Yeah, right now it's a coin toss. However, thanks to VAAI most arrays support LID1. I'm trying to leverage that.

Re: [PATCH 00/14] target: Initial support for DIF Type1+Type3 emulation

2014-01-09 Thread Martin K. Petersen
Nic == Nicholas A Bellinger n...@daterainc.com writes: Nic This series contains initial support for target mode DIF Nic Type1+Type3 emulation within target core, RAMDISK_MCP device Nic backend, and tcm_loop fabric driver. Super cool! Do you have a git tree so I can start tinkering with this?

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-09 Thread Douglas Gilbert
On 14-01-09 02:20 PM, Phillip Susi wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/9/2014 1:29 PM, Douglas Gilbert wrote: When REQUEST SENSE had its original semantics, TEST UNIT READY was the only game in town for monitoring power management. From my reading of spc4r36n.pdf section

Re: [PATCH] drivers: target: target_core_mod: use div64_u64_rem() instead of operator '%' for u64

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 11:17 +0100, Hannes Reinecke wrote: On 01/09/2014 12:18 AM, Nicholas A. Bellinger wrote: On Wed, 2014-01-08 at 08:32 +0100, Hannes Reinecke wrote: SNIP Other than that the sector_div() patch is correct. nod Thanks for confirming that sector_div() is correct here

Re: [PATCH 00/14] target: Initial support for DIF Type1+Type3 emulation

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 21:00 -0500, Martin K. Petersen wrote: Nic == Nicholas A Bellinger n...@daterainc.com writes: Nic This series contains initial support for target mode DIF Nic Type1+Type3 emulation within target core, RAMDISK_MCP device Nic backend, and tcm_loop fabric driver. Super

Re: iSCSI request keep rejected by microsoft iSCSI target because of write_same check

2014-01-09 Thread vaughan
On 01/10/2014 02:38 AM, Mike Christie wrote: On 01/09/2014 04:20 AM, vaughan wrote: We are testing linux iscsi boot under UEFI mode with Microsoft iSCSI Software Target. But failed for rejected by target. When do a normal iscsi connection, iscsi connection is keeping rejected and recover. See

Re: [PATCH 07/14] target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 12:24 +0200, Sagi Grimberg wrote: On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch updates sbc_emulate_readcapacity_16() to set P_TYPE and PROT_EN bits when DIF emulation is enabled by the backend device.

Re: [PATCH 02/14] target: Add DIF CHECK_CONDITION ASC/ASCQ exception cases

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 12:43 +0200, Sagi Grimberg wrote: On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds support for DIF related CHECK_CONDITION ASC/ASCQ exception cases into transport_send_check_condition_and_sense().

Re: [PATCH 13/14] target/rd: Add DIF protection into rd_execute_rw

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 12:32 +0200, Sagi Grimberg wrote: On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds support for DIF protection into rd_execute_rw() code for WRITE/READ I/O using sbc_dif_verify_[write,read]() logic.

Re: [PATCH 09/14] target/configfs: Expose protection device attributes

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 13:01 +0200, Sagi Grimberg wrote: On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds support for exposing DIF protection device attributes via configfs. This includes: pi_prot_type: Protection

Re: [PATCH 03/14] target/sbc: Add sbc_check_prot + update sbc_parse_cdb for DIF

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 16:58 +0200, Sagi Grimberg wrote: On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds sbc_check_prot() for performing various DIF related CDB sanity checks, along with setting SCF_PROT once sanity checks

Re: iSCSI request keep rejected by microsoft iSCSI target because of write_same check

2014-01-09 Thread Mike Christie
On 1/10/14 12:11 AM, vaughan wrote: I haven't figure out why it's rejected with bookmark invalid(9) reason, rather than command not supported. IMO bookmark invalid is used when minor protocol conflict such as final flag not set with non-write command. However, I haven't find error of this kind