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

2018-12-04 Thread Roman Bolshakov
On Sat, Dec 01, 2018 at 12:34:19AM +0100, David Disseldorp wrote: > 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) chara

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

2018-12-04 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 --- drivers/target/target_core_spc.c | 8 +---

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

2018-12-04 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 v6 0/5] target: user configurable T10 Vendor ID

2018-12-04 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 v5: - remove unnecessary TRANSPORT_FLAG_PASSTHROUGH conditional from t10_wwn ID defaults initi

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

2018-12-04 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

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

2018-12-04 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 v6 2/5] target: consistently null-terminate t10_wwn strings

2018-12-04 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

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

2018-12-04 Thread Roman Bolshakov
On Sat, Dec 01, 2018 at 12:34:20AM +0100, David Disseldorp wrote: > 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-

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

2018-12-04 Thread Roman Bolshakov
On Tue, Dec 04, 2018 at 11:12:36AM +0100, David Disseldorp wrote: > 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/ve

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

2018-12-04 Thread Roman Bolshakov
On Tue, Dec 04, 2018 at 11:12:37AM +0100, David Disseldorp wrote: > 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 > Re

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

2018-12-04 Thread Roman Bolshakov
On Tue, Dec 04, 2018 at 11:12:38AM +0100, David Disseldorp wrote: > 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 defau

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

2018-12-04 Thread Roman Bolshakov
On Tue, Dec 04, 2018 at 03:13:51PM +0300, Roman Bolshakov wrote: > On Tue, Dec 04, 2018 at 11:12:36AM +0100, David Disseldorp wrote: > > 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

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

2018-12-04 Thread David Disseldorp
On Tue, 4 Dec 2018 16:26:59 +0300, Roman Bolshakov wrote: > wrt PATCH 5 in the series. Should we allow to set vendor_id for for > pscsi? target_transport_configure sets t10_wwn fields for pscsi, but but > an attempt to set vendor_id will overwrite the value recieved from > scsi_device. I consider

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

2018-12-04 Thread David Disseldorp
On Tue, 4 Dec 2018 14:31:57 +0300, Roman Bolshakov wrote: > On Sat, Dec 01, 2018 at 12:34:20AM +0100, David Disseldorp wrote: ... > > diff --git a/drivers/target/target_core_configfs.c > > b/drivers/target/target_core_configfs.c > > index f6b1549f4142..34872f24e8bf 100644 > > --- a/drivers/target

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

2018-12-04 Thread David Disseldorp
On Tue, 4 Dec 2018 15:13:51 +0300, Roman Bolshakov wrote: > > + /* Assume ASCII encoding. Strip any newline added from userspace. */ > > + BUILD_BUG_ON(sizeof(dev->t10_wwn.vendor) != INQUIRY_VENDOR_LEN + 1); > > + strlcpy(dev->t10_wwn.vendor, strstrip(buf), > > + sizeof(dev->t10_ww

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

2018-12-04 Thread Bart Van Assche
On Tue, 2018-12-04 at 16:26 +0300, Roman Bolshakov wrote: > wrt PATCH 5 in the series. Should we allow to set vendor_id for for > pscsi? I think we should allow that. Bart.

UBSAN: Undefined behaviour in drivers/scsi/megaraid/megaraid_sas_fp.c:117:32

2018-12-04 Thread Qian Cai
UBSAN: Undefined behaviour in drivers/scsi/megaraid/megaraid_sas_fp.c:117:32 index 255 is out of range for type 'MR_LD_SPAN_MAP [1]' This commit 51087a8617fe (megaraid_sas : Extended VD support) defined those, struct MR_FW_RAID_MAP { u8 ldTgtIdToLd[MAX_RAIDMAP_LOGICAL_DRIVES+\

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

2018-12-04 Thread Martin K. Petersen
Commit ddd0bc756983 ("block: move ref_tag calculation func to the block layer") moved ref tag calculation from SCSI to a library function. However, this change broke returning the correct ref tag for devices operating in DIF mode since these do not have an associated block integrity profile. This i

98IvH6E5wF5vcK8DK6

2018-12-04 Thread Wfwof
238.144.170.101106.119.122.156 ¿ª ¸÷ Àà ÔöÖµ Ë°Õý ¹æ Õæ ƱQQ:2211261333 ÁÖ ³Ì£º13632225663(΢ÐÅͬºÅ)

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

2018-12-04 Thread Bart Van Assche
On 12/4/18 6:31 PM, Martin K. Petersen wrote: Commit ddd0bc756983 ("block: move ref_tag calculation func to the block layer") moved ref tag calculation from SCSI to a library function. However, this change broke returning the correct ref tag for devices operating in DIF mode since these do not ha

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

2018-12-04 Thread John Garry
On 04/12/2018 04:12, Martin K. Petersen wrote: John, Hi Martin, Thanks for checking. +static int hisi_sas_dif_dma_map(struct hisi_hba *hisi_hba, + int *n_elem_dif, struct sas_task *task) +{ + struct device *dev = hisi_hba->dev; + struct sas_ssp_tas

RE: scsi_set_medium_removal timeout issue

2018-12-04 Thread Alan Stern
On Thu, 29 Nov 2018, Zengtao (B) wrote: > Ping? > > >-Original Message- > >From: Alan Stern [mailto:st...@rowland.harvard.edu] > >Sent: Wednesday, November 14, 2018 11:35 PM > >To: Martin Petersen ; Zengtao (B) > > > >Cc: j...@linux.vnet.ibm.com; gre...@linuxfoundation.org; > >linux-scsi@

Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption

2018-12-04 Thread Tony Battersby
On 11/13/18 1:36 AM, Matthew Wilcox wrote: > On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote: >> Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy >> driver corrupts DMA pool memory. >> >> Signed-off-by: Tony Battersby > I like it! Also, here you're using blks_p

RE: [PATCH] blk-mq: Set request mapping to NULL in blk_mq_put_driver_tag

2018-12-04 Thread Kashyap Desai
+ Linux-scsi > > diff --git a/block/blk-mq.h b/block/blk-mq.h > > index 9497b47..57432be 100644 > > --- a/block/blk-mq.h > > +++ b/block/blk-mq.h > > @@ -175,6 +175,7 @@ static inline bool > > blk_mq_get_dispatch_budget(struct blk_mq_hw_ctx *hctx) > > static inline void __blk_mq_put_driver_tag(s

Re: [PATCH] blk-mq: Set request mapping to NULL in blk_mq_put_driver_tag

2018-12-04 Thread Bart Van Assche
On Tue, 2018-12-04 at 22:17 +0530, Kashyap Desai wrote: > + Linux-scsi > > > > diff --git a/block/blk-mq.h b/block/blk-mq.h > > > index 9497b47..57432be 100644 > > > --- a/block/blk-mq.h > > > +++ b/block/blk-mq.h > > > @@ -175,6 +175,7 @@ static inline bool > > > blk_mq_get_dispatch_budget(struct

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

2018-12-04 Thread Kashyap Desai
> -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; Sreekanth Reddy; Sathya Prakash Veerichetty > Subject: Re: [PATCH] blk-mq: S

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

2018-12-04 Thread Bart Van Assche
On Tue, 2018-12-04 at 23:48 +0530, Kashyap Desai wrote: > Let me explain the issue. It is not a race, but very straight issue. Please clarify what makes you think that iterating over all requests does not race with request completion. Is request submission perhaps blocked during the firmware recov

Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption

2018-12-04 Thread Andrew Morton
On Tue, 4 Dec 2018 11:22:34 -0500 Tony Battersby wrote: > On 11/13/18 1:36 AM, Matthew Wilcox wrote: > > On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote: > >> Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy > >> driver corrupts DMA pool memory. > >> > >> Signe

Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption

2018-12-04 Thread Matthew Wilcox
On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote: > On Tue, 4 Dec 2018 11:22:34 -0500 Tony Battersby > wrote: > > > On 11/13/18 1:36 AM, Matthew Wilcox wrote: > > > On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote: > > >> Prevent a possible endless loop with DMAPOOL_DE

Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption

2018-12-04 Thread Andrew Morton
On Tue, 4 Dec 2018 12:18:01 -0800 Matthew Wilcox wrote: > On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote: > > On Tue, 4 Dec 2018 11:22:34 -0500 Tony Battersby > > wrote: > > > > > On 11/13/18 1:36 AM, Matthew Wilcox wrote: > > > > On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony B

Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption

2018-12-04 Thread Andy Shevchenko
On Tue, Dec 4, 2018 at 10:18 PM Matthew Wilcox wrote: > On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote: > > Also, Andy had issues with the v2 series so it would be good to hear an > > update from him? > > Certainly. Hmm... I certainly forgot what was long time ago. If I _was_ in C

Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption

2018-12-04 Thread Matthew Wilcox
On Tue, Dec 04, 2018 at 12:28:54PM -0800, Andrew Morton wrote: > On Tue, 4 Dec 2018 12:18:01 -0800 Matthew Wilcox wrote: > > I only had a review comment on 8/9, which I then withdrew during my review > > of patch 9/9. Unless I missed something during my re-review of my > > responses? > > And in

Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption

2018-12-04 Thread Tony Battersby
On 12/4/18 3:30 PM, Andy Shevchenko wrote: > On Tue, Dec 4, 2018 at 10:18 PM Matthew Wilcox wrote: >> On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote: >>> Also, Andy had issues with the v2 series so it would be good to hear an >>> update from him? >> Certainly. > Hmm... I certainly f

Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption

2018-12-04 Thread Andy Shevchenko
On Tue, Dec 4, 2018 at 11:26 PM Tony Battersby wrote: > > On 12/4/18 3:30 PM, Andy Shevchenko wrote: > > On Tue, Dec 4, 2018 at 10:18 PM Matthew Wilcox wrote: > >> On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote: > >>> Also, Andy had issues with the v2 series so it would be good to

RE: [kbuild-all] [PATCH 4/4] scsi: hisi_sas: Add support for DIF/DIX feature for v3 hw

2018-12-04 Thread Li, Philip
Subject: Re: [kbuild-all] [PATCH 4/4] scsi: hisi_sas: Add support for DIF/DIX > feature for v3 hw > > On 24/11/2018 17:50, kbuild test robot wrote: > > Hi Xiang, > > > > Thank you for the patch! Perhaps something to improve: > > > > [auto build test WARNING on mkp-scsi/for-next] > > [also build te

Re: DIF/DIX issue related to config CONFIG_SCSI_MQ_DEFAULT

2018-12-04 Thread Martin K. Petersen
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 successfully ran our DIX/T10 PI qualification tooling without a

Re: DIF/DIX issue related to config CONFIG_SCSI_MQ_DEFAULT

2018-12-04 Thread Martin K. Petersen
Ming, > For DIX/DIF test, I think you need to pass 'dev_size_mb=XXX' instead of > 'virtual_gb'. Correct! -- Martin K. Petersen Oracle Linux Engineering

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

2018-12-04 Thread Martin K. Petersen
John, > 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. If it's reasons on my end they'll need to get fixed. We should

[PATCH] scsi: wd719x: Fix sleeping under a spinlock

2018-12-04 Thread Wen Yang
Currently, dma_alloc_coherent is being called with a GFP_KERNEL flag which allows it to sleep with a spinlock held. The call tree is: wd719x_host_reset() holds wd->sh->host_lock -> wd719x_chip_init() -> dma_alloc_coherent() uses GFP_KERNEL This patch introduces a can_sleep parameter in

Re: [PATCH] drivers/scsi/snic/snic_trc.c: Use vzalloc

2018-12-04 Thread Sabyasachi Gupta
On Fri, Nov 23, 2018 at 8:07 PM Sabyasachi Gupta wrote: > > On Thu, Nov 15, 2018 at 10:04 PM Sabyasachi Gupta > wrote: > > > > Replaced vmalloc + memset with vzalloc > > > > Signed-off-by: Sabyasachi Gupta > > Any comment on this patch? Any comment on this patch? > > > --- > > drivers/scsi/sn

Re: [PATCH v2] drivers/scsi/fnic/fnic_trace.c: Use vzalloc

2018-12-04 Thread Sabyasachi Gupta
On Fri, Nov 23, 2018 at 8:13 PM Sabyasachi Gupta wrote: > > On Wed, Nov 14, 2018 at 10:24 PM Sabyasachi Gupta > wrote: > > > > Replaced vmalloc + memset with vzalloc > > > > Signed-off-by: Sabyasachi Gupta > > Any comment on this patch? Any comment on this patch? > > > --- > > v2: Removed addi

Re: [PATCH v2] drivers/scsi/fnic/fnic_trace.c: Use vzalloc

2018-12-04 Thread Sesidhar Baddela (sebaddel)
Looks good. Apologize for the delay in acknowledging the patch. Acked-by: Sesidhar Baddela On 12/4/18, 8:37 PM, "Sabyasachi Gupta" wrote: On Fri, Nov 23, 2018 at 8:13 PM Sabyasachi Gupta wrote: > > On Wed, Nov 14, 2018 at 10:24 PM Sabyasachi Gupta > wrote: > >

Re: [PATCH] drivers/scsi/snic/snic_trc.c: Use vzalloc

2018-12-04 Thread Sesidhar Baddela (sebaddel)
Looks good to me. Acked-by: Sesidhar Baddela On 12/4/18, 8:33 PM, "Sabyasachi Gupta" wrote: On Fri, Nov 23, 2018 at 8:07 PM Sabyasachi Gupta wrote: > > On Thu, Nov 15, 2018 at 10:04 PM Sabyasachi Gupta > wrote: > > > > Replaced vmalloc + memset with vzalloc