[PATCH v7 4/5] target: remove hardcoded T10 Vendor ID in INQUIRY response

2018-12-05 Thread David Disseldorp
Use the value stored in t10_wwn.vendor, which defaults to "LIO-ORG", but can be reconfigured via the vendor_id ConfigFS attribute. Signed-off-by: David Disseldorp Reviewed-by: Bryant G. Ly Reviewed-by: Lee Duncan Reviewed-by: Hannes Reinecke Reviewed-by: Roman Bolshakov --- drivers/target/ta

[PATCH v7 0/5] target: user configurable T10 Vendor ID

2018-12-05 Thread David Disseldorp
This patch-set allows for the modification of the T10 Vendor Identification string returned in the SCSI INQUIRY response, via the target/core/$backstore/$name/wwn/vendor_id ConfigFS path. Changes since v6: - PATCH 2/5 + fill pscsi inquiry data using proper sd->inquiry pointer names + dump pscs

[PATCH v7 1/5] target: use consistent left-aligned ASCII INQUIRY data

2018-12-05 Thread David Disseldorp
spc5r17.pdf specifies: 4.3.1 ASCII data field requirements ASCII data fields shall contain only ASCII printable characters (i.e., code values 20h to 7Eh) and may be terminated with one or more ASCII null (00h) characters. ASCII data fields described as being left-aligned shall have any

[PATCH v7 2/5] target: consistently null-terminate t10_wwn strings

2018-12-05 Thread David Disseldorp
In preparation for supporting user provided vendor strings, add an extra byte to the vendor, model and revision arrays in struct t10_wwn. This ensures that the full INQUIRY data can be carried in the arrays along with a null-terminator. Change a number of array readers and writers so that they acc

[PATCH v7 5/5] target: perform t10_wwn ID initialisation in target_alloc_device()

2018-12-05 Thread David Disseldorp
Initialise the t10_wwn vendor, model and revision defaults when a device is allocated instead of when it's enabled. This ensures that custom vendor or model strings set prior to enablement are not later overwritten with default values. The TRANSPORT_FLAG_PASSTHROUGH conditional can be dropped for

[PATCH v7 3/5] target: add device vendor_id configfs attribute

2018-12-05 Thread David Disseldorp
The vendor_id attribute will allow for the modification of the T10 Vendor Identification string returned in inquiry responses. Its value can be viewed and modified via the ConfigFS path at: target/core/$backstore/$name/wwn/vendor_id "LIO-ORG" remains the default value, which is set when the backst

Re: [PATCH] scsi: t10-pi: Return correct ref tag when queue has no integrity profile

2018-12-05 Thread Martin K. Petersen
Hi Bart, > Since the return value of this function is 'u32', can the ' & > 0x' be left out? Absolutely, and I almost zapped it. However, I decided to leave it to emphasize the point that the reference tag is truncated to a 32-bit value. To me, this is more obvious than having to backtra

Re: [PATCH] scsi: t10-pi: Return correct ref tag when queue has no integrity profile

2018-12-05 Thread Bart Van Assche
On 12/5/18 6:04 AM, Martin K. Petersen wrote: Since the return value of this function is 'u32', can the ' & 0x' be left out? Absolutely, and I almost zapped it. However, I decided to leave it to emphasize the point that the reference tag is truncated to a 32-bit value. To me, this is mo

Re: DISABLE_CLUSTERING in scsi drivers

2018-12-05 Thread Lee Duncan
On 11/21/18 1:41 AM, Christoph Hellwig wrote: > Hi all, > > you in the To list maintain or wrote SCSI drivers that set the > DISABLE_CLUSTERING flag, which basically disable merges of any > bio segments. We already have the actual max_segment size limit > to say which length a segment should have

BUG in copy_page_to_iter() when iscsi sets ENABLE_CLUSTERING

2018-12-05 Thread Lee Duncan
I recently found what I believe is a bug, and I'd appreciate feedback on if that is correct, and if so how to proceed. BACKGROUND Recently Christoph Hellwig sent an email to driver maintainers for drivers that set ".use_clustering" to DISABLE_CLUSTERING in their SCSI Host templates, asking if the

Re: [PATCH] scsi: t10-pi: Return correct ref tag when queue has no integrity profile

2018-12-05 Thread Martin K. Petersen
Bart, > Had you considered to use lower_32_bits() instead of "0x"? > That would to avoid that reviewers have to count the 'f'-s to verify > correctness of t10_pi_ref_tag(). I hadn't. I guess I tend to think of lower_32_bits() as something you do to pointers, not to block numbers. -- M

Re: [PATCH v3 4/4] scsi: hisi_sas: Add support for DIF feature for v3 hw

2018-12-05 Thread John Garry
On 05/12/2018 02:14, Martin K. Petersen wrote: John, Hi Martin, Are you happy for us to make DIX support in this driver "hisi_sas DIX experimental" short term? That's entirely your call, it's your driver/controller. I just want the experimental tag to be due to reasons on *your* end.

Re: DIF/DIX issue related to config CONFIG_SCSI_MQ_DEFAULT

2018-12-05 Thread John Garry
On 05/12/2018 02:22, Martin K. Petersen wrote: Hi Martin, John, OK, great. Happy to help. So far we have hisi_sas fio issue to go on plus knowledge that this issue seems to be exposed/triggered by enabling SCSI MQ. I'll have to go revisit the archives for your exact fio bits. But I succ

[PATCH] scsi: Use of_node_name_eq for node name comparisons

2018-12-05 Thread Rob Herring
Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Rob Herring --- drivers/scsi/sun_esp.c | 7 +++ 1 file chan

Re: +AFs-PATCH+AF0- blk-mq: Set request mapping to NULL in blk+AF8-mq+AF8-put+AF8-driver+AF8-tag

2018-12-05 Thread Ming Lei
On Tue, Dec 04, 2018 at 11:48:48PM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Bart Van Assche [mailto:bvanass...@acm.org] > > Sent: Tuesday, December 4, 2018 10:45 PM > > To: Kashyap Desai; linux-block; Jens Axboe; Ming Lei; linux-scsi > > Cc: Suganath Prabu Subramani; Sre

[GIT PULL] SCSI fixes for 4.20-rc5

2018-12-05 Thread James Bottomley
Four obvious bug fixes. The vmw_pscsi one is so old that it's amazing no-one noticed before now. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Cathy Avery (1): scsi: vmw_pscsi: Rearrange code to avoid multiple

Re: [GIT PULL] SCSI fixes for 4.20-rc5

2018-12-05 Thread pr-tracker-bot
The pull request you sent on Thu, 06 Dec 2018 09:38:20 +0900: > git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/cf76c364a1e1e5224af80edf70a1e3023e1fcf8c Thank you! -- Deet-doot-dot, I am a bot. ht

Re: [PATCH v3 4/4] scsi: hisi_sas: Add support for DIF feature for v3 hw

2018-12-05 Thread Martin K. Petersen
John, > patchset with DIF and DIX support separated out, and we can leave the > DIX patch in limbo until we get to the bottom of the DIX issue. Sure. -- Martin K. Petersen Oracle Linux Engineering

Re: DIF/DIX issue related to config CONFIG_SCSI_MQ_DEFAULT

2018-12-05 Thread Martin K. Petersen
John, >> I'll have to go revisit the archives for your exact fio bits. Your fio test case ran to completion on all my test systems. >> But I successfully ran our DIX/T10 PI qualification tooling without any >> errors on the latest SCSI tree. On both scsi_debug and FC hardware. > > I'm not fimi

[PATCH] scsi: aic7xxx: Remove unnecessary NULL check before kfree

2018-12-05 Thread Wen Yang
kfree(NULL) is safe, so removes NULL check before freeing the mem. This patch also fix the ifnullfree.cocci warnings. Signed-off-by: Wen Yang CC: Alex Deucher CC: Hannes Reinecke CC: "James E.J. Bottomley" CC: "Martin K. Petersen" CC: linux-scsi@vger.kernel.org CC: linux-ker...@vger.kernel.or

RE: +AFs-PATCH+AF0- blk-mq: Set request mapping to NULL in blk+AF8-mq+AF8-put+AF8-driver+AF8-tag

2018-12-05 Thread Kashyap Desai
> > If the 'tag' passed to scsi_host_find_tag() is valid, I think there > shouldn't have such issue. > > If you want to find outstanding IOs, maybe you can try > blk_mq_queue_tag_busy_iter() > or blk_mq_tagset_busy_iter(), because you may not know if the passed 'tag' > to > scsi_host_find_tag() is