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. --

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

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

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

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

[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

[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 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

[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 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