Re: [PATCH] scsi_dh_alua: handle RTPG sense code correctly during state transitions

2019-10-08 Thread Ewan D. Milne
On Tue, 2019-10-08 at 08:21 +0200, Hannes Reinecke wrote: > On 10/7/19 10:45 PM, Ewan D. Milne wrote: > > > > The patch itself looks OK, but I was wondering about a couple of things: > > > > - There are other places in scsi_dh_alua where the ASC/ASCQ 04 0A is >

Re: [PATCH] scsi_dh_alua: handle RTPG sense code correctly during state transitions

2019-10-07 Thread Ewan D. Milne
See below. On Mon, 2019-10-07 at 15:57 +0200, Hannes Reinecke wrote: > From: Hannes Reinecke > > Some arrays are not capable of returning RTPG data during state > transitioning, but rather return an 'LUN not accessible, asymmetric > access state transition' sense code. In these cases we > can se

Re: [PATCH 6/6] qla2xxx: Update driver version to 10.01.00.19-k

2019-09-03 Thread Ewan D. Milne
N "10.01.00.19-k" > > #define QLA_DRIVER_MAJOR_VER 10 > #define QLA_DRIVER_MINOR_VER 1 Reviewed-by: Ewan D. Milne

Re: [PATCH 5/6] qla2xxx: Fix stale session

2019-09-03 Thread Ewan D. Milne
= rp->id.b24 || > + fcport->scan_needed) { > qlt_schedule_sess_for_deletion(fcport); > } > fcport->d_id.b24 = rp->id.b24; > + fcport->scan_needed = 0; > break; > } > Reviewed-by: Ewan D. Milne

Re: [PATCH 4/6] qla2xxx: Fix stuck login session

2019-09-03 Thread Ewan D. Milne
ort->plogi_nack_done_deadline)) { > - set_bit(RELOGIN_NEEDED, &vha->dpc_flags); > - return; > - } > - } > - > if (fcport->last_rscn_gen != fcport->rscn_gen) { > ql_dbg(ql_dbg_disc, vha, 0x20e9, "%s %d %8phC post gnl\n", > __func__, __LINE__, fcport->port_name); Reviewed-by: Ewan D. Milne

Re: [PATCH 3/6] qla2xxx: Fix driver reload for ISP82xx

2019-09-03 Thread Ewan D. Milne
rvdata(ha->pdev); > > - qla82xx_mbx_intr_disable(vha); > + if (ha->interrupts_on) > + qla82xx_mbx_intr_disable(vha); > > spin_lock_irq(&ha->hardware_lock); > if (IS_QLA8044(ha)) Reviewed-by: Ewan D. Milne

Re: [PATCH 2/6] qla2xxx: Fix flash read for Qlogic ISPs

2019-09-03 Thread Ewan D. Milne
ptr = (void *)req->ring; > - struct qla_fdt_layout *fdt = (void *)req->ring; > + struct qla_fdt_layout *fdt = (struct qla_fdt_layout *)req->ring; > uint8_t man_id, flash_id; > uint16_t mid = 0, fid = 0; > > - qla24xx_read_flash_data(vha, (void *)fdt, ha->flt_region_fdt, > + ha->isp_ops->read_optrom(vha, fdt, ha->flt_region_fdt << 2, > OPTROM_BURST_DWORDS); > if (le16_to_cpu(*wptr) == 0x) > goto no_flash_data; Reviewed-by: Ewan D. Milne

Re: [PATCH 1/6] qla2xxx: Fix message indicating vectors used by driver

2019-09-03 Thread Ewan D. Milne
"with %d vectors, using %d vectors.\n", > - ha->msix_count, ret); > + ql_log(ql_log_info, vha, 0x00c6, > + "MSI-X: Using %d vectors\n", ret); > ha->msix_count = ret; > /* Recalculate queue values */ > if (ha->mqiobase && (ql2xmqsupport || ql2xnvmeenable)) { Reviewed-by: Ewan D. Milne

Re: [PATCH v3] lpfc: Mitigate high memory pre-allocation by SCSI-MQ

2019-08-16 Thread Ewan D. Milne
n-1; > diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h > index 3aeca387b22a..329f7aa7e169 100644 > --- a/drivers/scsi/lpfc/lpfc_sli4.h > +++ b/drivers/scsi/lpfc/lpfc_sli4.h > @@ -44,6 +44,11 @@ > #define LPFC_HBA_HDWQ_MAX128 > #define LPFC_HBA_HDWQ_DEF0 > > +/* FCP MQ queue count limiting */ > +#define LPFC_FCP_MQ_THRESHOLD_MIN0 > +#define LPFC_FCP_MQ_THRESHOLD_MAX128 > +#define LPFC_FCP_MQ_THRESHOLD_DEF8 > + > /* Common buffer size to accomidate SCSI and NVME IO buffers */ > #define LPFC_COMMON_IO_BUF_SZ768 > Looks good. Reviewed-by: Ewan D. Milne

Re: [PATCH] scsi: use scmd_printk() to print which command timed out

2019-07-09 Thread Ewan D. Milne
{ > - sdev_printk(KERN_ERR, cmd->device, > + scmd_printk(KERN_ERR, cmd, > "timing out command, waited %lus\n", > wait_for/HZ); > disposition = SUCCESS; Reviewed-by: Ewan D. Milne

Re: [PATCH] scsi: vmw_pscsi: Fix use-after-free in pvscsi_queue_lck()

2019-06-19 Thread Ewan D. Milne
p=%x\n", cmd, ctx, cmd->cmnd[0]); > + "queued cmd %p, ctx %p, op=%x\n", cmd, ctx, op); > > spin_unlock_irqrestore(&adapter->hw_lock, flags); > > - pvscsi_kick_io(adapter, cmd->cmnd[0]); > + pvscsi_kick_io(adapter, op); > > return 0; > } Reviewed-by: Ewan D. Milne

Re: [PATCH 1/3] qla2xxx: Fix kernel crash after disconnecting NVMe devices

2019-06-18 Thread Ewan D. Milne
On Tue, 2019-06-18 at 12:51 +0200, Hannes Reinecke wrote: > On 6/15/19 12:10 AM, Himanshu Madhani wrote: > > From: Arun Easi > > > > BUG: unable to handle kernel NULL pointer dereference at (null) > > IP: [] qla_nvme_unregister_remote_port+0x6c/0xf0 [qla2xxx] > > PGD 80084cf41067 PU

Re: [PATCH 2/3] qla2xxx: on session delete return nvme cmd

2019-06-17 Thread Ewan D. Milne
> > static struct nvme_fc_port_template qla_nvme_fc_transport = { > @@ -603,7 +608,8 @@ static void qla_nvme_unregister_remote_port(struct > work_struct *work) > return; > > ql_log(ql_log_warn, NULL, 0x2112, > - "%s: unregister remoteport on %p\n",__func__, fcport); > + "%s: unregister remoteport on %p %8phN\n", > + __func__, fcport, fcport->port_name); > > nvme_fc_set_remoteport_devloss(fcport->nvme_remote_port, 0); > init_completion(&fcport->nvme_del_done); Reviewed-by: Ewan D. Milne

Re: [PATCH 1/3] qla2xxx: Fix kernel crash after disconnecting NVMe devices

2019-06-17 Thread Ewan D. Milne
See below. On Fri, 2019-06-14 at 15:10 -0700, Himanshu Madhani wrote: > From: Arun Easi > > BUG: unable to handle kernel NULL pointer dereference at (null) > IP: [] qla_nvme_unregister_remote_port+0x6c/0xf0 [qla2xxx] > PGD 80084cf41067 PUD 84d288067 PMD 0 > Oops: [#1] SMP > Ca

Re: [PATCH 1/5] scsi: vmw_pscsi: use sgl helper to operate sgl

2019-06-10 Thread Ewan D. Milne
On Mon, 2019-06-10 at 11:40 -0700, James Bottomley wrote: > On Mon, 2019-06-10 at 23:03 +0800, Ming Lei wrote: > > The current way isn't safe for chained sgl, so use sgl helper to > > operate sgl. > > This also isn't a chained driver. However, this driver seems to > achieve this by magic number m

Re: [PATCH 2/5] scsi: advansys: use sg helper to operate sgl

2019-06-10 Thread Ewan D. Milne
On Mon, 2019-06-10 at 11:37 -0700, James Bottomley wrote: > On Mon, 2019-06-10 at 23:03 +0800, Ming Lei wrote: > > The current way isn't safe for chained sgl, so use sgl helper to > > operate sgl. > > The advansys driver doesn't currently use a chained scatterlist. In > theory it could; the > >

Re: [PATCH 5/5] scsi: mvumi: use sg helper to operate sgl

2019-06-10 Thread Ewan D. Milne
r_32_bits(busaddr)); > m_sg->baseaddr_h = cpu_to_le32(upper_32_bits(busaddr)); > m_sg->flags = 0; > - sgd_setsz(mhba, m_sg, cpu_to_le32(sg_dma_len(&sg[i]))); > + sgd_setsz(mhba, m_sg, cpu_to_le32(sg_dma_len(sg))); > if ((i + 1) == *sg_count) > m_sg->flags |= 1U << mhba->eot_flag; > Reviewed-by: Ewan D. Milne

Re: [PATCH 4/5] scsi: lpfc: use sg helper to operate sgl

2019-06-10 Thread Ewan D. Milne
= sg_dma_address(sgel); > cnt = sg_dma_len(sgel); > sgl->addr_hi = putPaddrHigh(physaddr); Looks right for rsp->sg Reviewed by: Ewan D. Milne

Re: [PATCH 3/5] scsi: ipr: use sg helper to operate sgl

2019-06-10 Thread Ewan D. Milne
erlist[i])); > + ioadl64[i].data_len = cpu_to_be32(sg_dma_len(sg)); > + ioadl64[i].address = cpu_to_be64(sg_dma_address(sg)); > } > > ioadl64[i-1].flags |= cpu_to_be32(IPR_IOADL_FLAGS_LAST); Reviewed-by: Ewan D. Milne

Re: [PATCH 2/5] scsi: advansys: use sg helper to operate sgl

2019-06-10 Thread Ewan D. Milne
lock->sg_ptr = 0L; /* Last ADV_SG_BLOCK in > list. */ > return ADV_SUCCESS; > } > - slp++; > + slp = sg_next(slp); > } > sg_block->sg_cnt = NO_OF_SG_PER_BLOCK; > prev_sg_block = sg_block; Reviewed-by: Ewan D. Milne

Re: [PATCH 1/5] scsi: vmw_pscsi: use sgl helper to operate sgl

2019-06-10 Thread Ewan D. Milne
UM_SG_ENTRIES_PER_SEGMENT); > > sge = &ctx->sgl->sge[0]; > - for (i = 0; i < count; i++, sg++) { > + for (i = 0; i < count; i++, sg = sg_next(sg)) { > sge[i].addr = sg_dma_address(sg); > sge[i].length = sg_dma_len(sg); > sge[i].flags = 0; Reviewed-by: Ewan D. Milne

Re: [PATCH 1/3] scsi: Do not allow user space to change the SCSI device state into SDEV_BLOCK

2019-06-07 Thread Ewan D. Milne
On Fri, 2019-06-07 at 07:52 +0200, Hannes Reinecke wrote: > On 6/6/19 7:26 PM, Bart Van Assche wrote: > > On 6/5/19 10:46 PM, Hannes Reinecke wrote: > > > Why not simply '-EPERM' ? > > > Translating a state into something else seems counterproductive. > > > > Personally I'm OK with returning -EPER

Re: [PATCH 19/21] lpfc: Fix BFS crash with t10-dif enabled.

2019-05-24 Thread Ewan D. Milne
10; > - if (phba->sli3_options & LPFC_SLI3_BG_ENABLED) > - lpfc_setup_bg(phba, shost); > > lpfc_host_attrib_init(shost); > Reviewed-by: Ewan D. Milne

Re: [PATCH] qla2xxx: always allocate qla_tgt_wq

2019-05-13 Thread Ewan D. Milne
On Thu, 2019-05-09 at 15:55 -0700, Bart Van Assche wrote: > On 5/9/19 11:58 AM, Ewan D. Milne wrote: > > On Thu, 2019-05-09 at 07:06 -0700, Bart Van Assche wrote: > > > On 5/9/19 6:18 AM, Hannes Reinecke wrote: > > > > The 'qla_tgt_wq' workqueue is used for

Re: [PATCH] qla2xxx: always allocate qla_tgt_wq

2019-05-09 Thread Ewan D. Milne
On Thu, 2019-05-09 at 07:06 -0700, Bart Van Assche wrote: > On 5/9/19 6:18 AM, Hannes Reinecke wrote: > > The 'qla_tgt_wq' workqueue is used for generic command aborts, > > not just target-related functions. So allocate the workqueue > > always to avoid a kernel crash when aborting commands. > > H

Re: [PATCH 2/2] qla2xxx: Add cleanup for PCI EEH recovery

2019-05-09 Thread Ewan D. Milne
hani > --- > drivers/scsi/qla2xxx/qla_os.c | 221 > -- > 1 file changed, 82 insertions(+), 139 deletions(-) > > Reviewed-by: Ewan D. Milne

Re: [PATCH 1/2] qla2xxx: Fix Crash due to NULL pointer access in qla2x00_sysfs_read_optrom()

2019-05-08 Thread Ewan D. Milne
See below. On Mon, 2019-05-06 at 13:52 -0700, Himanshu Madhani wrote: > From: Quinn Tran > > commit c7702b8c2271 ("scsi: qla2xxx: Get mutex lock before checking > optrom_state") fixed crash while reading optrom data by adding mutex > locking. However, there can be still case where previous WRITE

Re: [REPOST, PATCH] scsi: sd: block: Fix regressions in read-only block device handling

2019-05-07 Thread Ewan D. Milne
e_it_fail; > @@ -194,6 +195,7 @@ struct gendisk { >*/ > struct disk_part_tbl __rcu *part_tbl; > struct hd_struct part0; > + DECLARE_BITMAP(user_ro_bitmap, DISK_MAX_PARTS); > > const struct block_device_operations *fops; > struct request_queue *queue; > @@ -431,12 +433,13 @@ extern void del_gendisk(struct gendisk *gp); > extern struct gendisk *get_gendisk(dev_t dev, int *partno); > extern struct block_device *bdget_disk(struct gendisk *disk, int partno); > > -extern void set_device_ro(struct block_device *bdev, int flag); > -extern void set_disk_ro(struct gendisk *disk, int flag); > +extern void set_device_ro(struct block_device *bdev, bool state); > +extern void set_disk_ro(struct gendisk *disk, bool state); > +extern bool get_user_ro(struct gendisk *disk, unsigned int partno); > > static inline int get_disk_ro(struct gendisk *disk) > { > - return disk->part0.policy; > + return disk->part0.read_only; > } > > extern void disk_block_events(struct gendisk *disk); Looks good. Reviewed-by: Ewan D. Milne

Re: [PATCH 2/2] qla2xxx: Silence Sucessful ELS IOCB message

2019-04-26 Thread Ewan D. Milne
"ELS IOCB Done -%s error hdl=%x comp_status=0x%x error > subcode 1=0x%x error subcode 2=0x%x total_byte=0x%x\n", > type, sp->handle, comp_status, fw_status[1], fw_status[2], > le16_to_cpu(((struct els_sts_entry_24xx *) Reviewed-by: Ewan D. Milne

Re: [PATCH 1/2] qla2xxx: Fix device staying in blocked state

2019-04-26 Thread Ewan D. Milne
> @@ -1163,8 +1165,6 @@ void qlt_unreg_sess(struct fc_port *sess) > if (sess->se_sess) > vha->hw->tgt.tgt_ops->clear_nacl_from_fcport_map(sess); > > - qla2x00_mark_device_lost(vha, sess, 0, 0); > - > sess->deleted = QLA_SESS_DELETION_IN_PROGRESS; > sess->disc_state = DSC_DELETE_PEND; > sess->last_rscn_gen = sess->rscn_gen; Reviewed-by: Ewan D. Milne

Re: [PATCH] nvme,scsi: display FC-NVMe port roles

2019-04-12 Thread Ewan D. Milne
lude/scsi/scsi_transport_fc.h | 3 +++ > 8 files changed, 37 insertions(+), 15 deletions(-) > Reviewed-by: Ewan D. Milne

Re: [PATCH 4/4] lpfc: add support for posting FC events on FPIN reception

2019-04-08 Thread Ewan D. Milne
gt; #define ELS_RSP_MASK 0xff > @@ -643,6 +646,7 @@ struct fc_vft_header { > #define ELS_CMD_RNID 0x78 > #define ELS_CMD_LIRR 0x7A > #define ELS_CMD_LCB0x81 > +#define ELS_CMD_FPIN ELS_FPIN > #endif > > /* Reviewed-by: Ewan D. Milne

Re: [PATCH 3/4] scsi_transport_fc: Add FPIN fc event codes

2019-04-08 Thread Ewan D. Milne
ost_fc_event(struct Scsi_Host *shost, u32 > event_number, >* Note: when calling fc_host_post_fc_event(), vendor_id may be >* specified as 0. >*/ > +void fc_host_fpin_rcv(struct Scsi_Host *shost, u32 fpin_len, char *fpin_buf); > struct fc_vport *fc_vport_create(struct Scsi_Host *shost, int channel, > struct fc_vport_identifiers *); > int fc_vport_terminate(struct fc_vport *vport); Reviewed-by: Ewan D. Milne

Re: [PATCH 2/4] scsi_transport_fc: refactor event posting routines

2019-04-08 Thread Ewan D. Milne
ta_buf, u64 vendor_id); > + u32 data_len, char *data_buf, u64 vendor_id); > +void fc_host_post_fc_event(struct Scsi_Host *shost, u32 event_number, > + enum fc_host_event_code event_code, > + u32 data_len, char *data_buf, u64 vendor_id); > /* Note: when specifying vendor_id to fc_host_post_vendor_event() > - * be sure to read the Vendor Type and ID formatting requirements > - * specified in scsi_netlink.h > + * or fc_host_post_fc_event(), be sure to read the Vendor Type > + * and ID formatting requirements specified in scsi_netlink.h > + * Note: when calling fc_host_post_fc_event(), vendor_id may be > + * specified as 0. >*/ > struct fc_vport *fc_vport_create(struct Scsi_Host *shost, int channel, > struct fc_vport_identifiers *); Reviewed-by: Ewan D. Milne

Re: [PATCH 0/4] scsi fc FPIN event support

2019-04-08 Thread Ewan D. Milne
| 8 +++ > drivers/scsi/lpfc/lpfc_hw.h | 4 ++ > drivers/scsi/scsi_transport_fc.c | 116 > +++ > include/scsi/scsi_transport_fc.h | 13 - > include/uapi/scsi/fc/fc_els.h| 33 +++++++ > 5 files changed, 113 insertions(+), 61 deletions(-) > Reviewed-by: Ewan D. Milne

Re: [PATCH 1/4] scsi fc: add FPIN ELS definition

2019-04-08 Thread Ewan D. Milne
> + __u8fpin_cmd; /* command (0x16) */ > + __u8 fpin_zero[3]; /* specified as zero - part of cmd */ > + __be32 fpin_desc_cnt; /* count of descriptors */ > + struct fc_fn_desc fpin_desc[0]; /* Descriptor list */ > +}; > + > #endif /* _FC_ELS_H_ */ Reviewed-by: Ewan D. Milne

Re: [PATCH 1/2] qla2xxx: Fix FC-AL connection target discovery

2019-03-18 Thread Ewan D. Milne
P_ID) > continue; Would be better I think to test (ha->current_topology == ISP_CFG_NL) first in the if statement but logically looks fine. Reviewed-by: Ewan D. Milne

Re: [PATCH 2/2] qla2xxx: Fix NULL pointer crash due to stale CPUID

2019-03-18 Thread Ewan D. Milne
On Fri, 2019-03-15 at 15:04 -0700, Himanshu Madhani wrote: > This patch fixes crash due to NULL pointer derefrence because > CPU pointer is not set and used by driver. Instead, driver is > passes CPU as tag via ha->isp_ops->{lun_reset|target_reset} > ... > > Fixes: 9cf2bab630765 ("block: kill re

Re: [PATCH 4/4] hisi_sas: fix calls to dma_set_mask_and_coherent()

2019-02-13 Thread Ewan D. Milne
d be removed from the patch description. > > Fixes: e4db40e7a1a2 ("scsi: hisi_sas: use dma_set_mask_and_coherent") > Cc: > Suggested-by: Ewan D. Milne > Signed-off-by: Hannes Reinecke > --- > drivers/scsi/hisi_sas/hisi_sas_main.c | 8 ++-- > 1 file chan

Re: [PATCH 3/4] bfa: fix calls to dma_set_mask_and_coherent()

2019-02-13 Thread Ewan D. Milne
om the patch description. > > Fixes: a69b080025ea ("scsi: bfa: use dma_set_mask_and_coherent") > Cc: > Suggested-by: Ewan D. Milne > Signed-off-by: Hannes Reinecke > --- > drivers/scsi/bfa/bfad.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(

Re: [PATCH 2/4] hptiop: fix calls to dma_set_mask_and_coherent()

2019-02-13 Thread Ewan D. Milne
"..the first DMA mask...". > > Fixes: 453cd3700ca3 ("scsi: hptiop: use dma_set_mask") > Cc: > Suggested-by: Ewan D. Milne > Signed-off-by: Hannes Reinecke > --- > drivers/scsi/hptiop.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-

Re: [PATCH 1/4] lpfc: fix calls to dma_set_mask_and_coherent()

2019-02-13 Thread Ewan D. Milne
r SCSI/FCP I/O errors. > > Fixes: f30e1bfd6154 ("scsi: lpfc: use dma_set_mask_and_coherent") > Cc: > Suggested-by: Don Dutile > Signed-off-by: Ewan D. Milne > Signed-off-by: Hannes Reinecke > --- > drivers/scsi/lpfc/lpfc_init.c | 9 ++--- > 1 file c

Re: [PATCH 0/4] scsi: fixup dma_set_mask_and_coherent() calls

2019-02-13 Thread Ewan D. Milne
On Wed, 2019-02-13 at 12:42 +0100, Hannes Reinecke wrote: > The recent patchset to use dma_set_mask_and_coherent() introduced > a regression where a call to set a 64-bit DMA mask was followed > by a call to set a 32-bit DMA mask, leading to I/O errors and > data corruption. > > Patchset is based o

Re: [PATCH] scsi: lpfc: fix calls to dma_set_mask_and_coherent()

2019-02-13 Thread Ewan D. Milne
On Tue, 2019-02-12 at 10:34 -0800, Christoph Hellwig wrote: > On Tue, Feb 12, 2019 at 10:37:45AM -0500, Ewan D. Milne wrote: > > > > It looks like this would introduce a different problem. "error" is set to > > -ENODEV earlier in the two functions so that the vario

Re: [PATCH] scsi: lpfc: fix calls to dma_set_mask_and_coherent()

2019-02-12 Thread Ewan D. Milne
On Tue, 2019-02-12 at 00:06 -0800, Christoph Hellwig wrote: > On Mon, Feb 11, 2019 at 10:05:02AM -0500, Ewan D. Milne wrote: > > The change to use dma_set_mask_and_coherent() incorrectly made a second > > call with the 32 bit DMA mask value when the call with the 64 bit DMA

Re: [PATCH] scsi: lpfc: Fix error code if kcalloc() fails

2019-02-11 Thread Ewan D. Milne
"size 0x%x\n", phba->sli4_hba.cq_max); > + rc = -ENOMEM; > goto out_destroy; > } > lpfc_setup_cq_lookup(phba); Reviewed-by: Ewan D. Milne

[PATCH] scsi: lpfc: fix calls to dma_set_mask_and_coherent()

2019-02-11 Thread Ewan D. Milne
: f30e1bfd6154 ("scsi: lpfc: use dma_set_mask_and_coherent") Cc: Suggested-by: Don Dutile Signed-off-by: Ewan D. Milne --- drivers/scsi/lpfc/lpfc_init.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_in

Re: [PATCH] qla2xxx: Add new FC-NVMe enable BIT to enable FC-NVMe feature

2019-02-01 Thread Ewan D. Milne
h & 0x400) && ql2xnvmeenable) { > + if ((ha->fw_attributes_h & > + (FW_ATTR_H_NVME | FW_ATTR_H_NVME_UPDATED)) && > + ql2xnvmeenable) { > vha->flags.nvme_enabled = 1; > ql_log(ql_log_info, vha, 0xd302, > "%s: FC-NVMe is Enabled (0x%x)\n", Reviewed-by: Ewan D. Milne

[PATCH 0/2] Fix use-after-free errors in lpfc driver when using NVMe

2019-01-17 Thread Ewan D. Milne
has been freed. Ewan D. Milne (2): lpfc: nvme: avoid hang / use-after-free when destroying localport lpfc: nvmet: avoid hang / use-after-free when destroying targetport drivers/scsi/lpfc/lpfc_nvme.c | 16 +--- drivers/scsi/lpfc/lpfc_nvme.h | 2 +- drivers/scsi/lpfc/lpfc_nvmet.c

[PATCH 2/2] lpfc: nvmet: avoid hang / use-after-free when destroying targetport

2019-01-17 Thread Ewan D. Milne
. Fix this by putting the completion on the stack. Signed-off-by: Ewan D. Milne --- drivers/scsi/lpfc/lpfc_nvmet.c | 8 +--- drivers/scsi/lpfc/lpfc_nvmet.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c

[PATCH 1/2] lpfc: nvme: avoid hang / use-after-free when destroying localport

2019-01-17 Thread Ewan D. Milne
this by putting the completion on the stack. Signed-off-by: Ewan D. Milne --- drivers/scsi/lpfc/lpfc_nvme.c | 16 +--- drivers/scsi/lpfc/lpfc_nvme.h | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c

Re: [PATCH] qla2xxx: Use correct number of vectors for online CPUs

2019-01-11 Thread Ewan D. Milne
.c > @@ -6939,7 +6939,7 @@ static int qla2xxx_map_queues(struct Scsi_Host *shost) > if (USER_CTRL_IRQ(vha->hw)) > rc = blk_mq_map_queues(qmap); > else > - rc = blk_mq_pci_map_queues(qmap, vha->hw->pdev, 0); > + rc = blk_mq_pci_map_queues(qmap, vha->hw->pdev, > vha->irq_offset); > return rc; > } > I have such a machine, SCSI-MQ doesn't work with its 8Gb adapter without this. Reviewed-by: Ewan D. Milne

Re: [PATCH] scsi: associate bio write hint with WRITE CDB

2019-01-03 Thread Ewan D. Milne
On Thu, 2019-01-03 at 16:00 -0500, Douglas Gilbert wrote: > On 2019-01-03 4:47 a.m., Randall Huang wrote: > > On Wed, Jan 02, 2019 at 11:51:33PM -0800, Christoph Hellwig wrote: > > > On Wed, Dec 26, 2018 at 12:15:04PM +0800, Randall Huang wrote: > > > > In SPC-3, WRITE(10)/(16) support grouping fun

[PATCH] scsi: lpfc: do not set queue->page_count to 0 if pc_sli4_params.wqpcnt is invalid

2018-12-13 Thread Ewan D. Milne
uot;) Cc: sta...@vger.kernel.org # 4.11+ Signed-off-by: Ewan D. Milne --- drivers/scsi/lpfc/lpfc_sli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index b9e5cd7..462ed4a 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c

Re: [PATCH repost] lpfc: Enable Management features for IF_TYPE=6

2018-12-12 Thread Ewan D. Milne
_rev == LPFC_SLI_REV4 && > (!(vport->load_flag & FC_UNLOADING)) && > (bf_get(lpfc_sli_intf_if_type, > - &phba->sli4_hba.sli_intf) == > + &phba->sli4_hba.sli_intf) >= > LPFC_SLI_INTF_IF_TYPE_2) && > (kref_read(&ndlp->kref) > 0)) { > mbox->ctx_ndlp = lpfc_nlp_get(ndlp); Reviewed-by: Ewan D. Milne

Re: DIF/DIX issue related to config CONFIG_SCSI_MQ_DEFAULT

2018-11-27 Thread Ewan D. Milne
On Tue, 2018-11-27 at 17:55 +0800, chenxiang (M) wrote: > [ 629.210506] Unable to handle kernel paging request at virtual address > 8027e048 > [ 629.210506] Unable to handle kernel paging request at virtual address > 8027e048 > ... > [ 629.380218] pc : deadline_remove_request+0

Re: [PATCH] qla2xxx: Add SysFS hook for FC-NVMe autoconnect

2018-11-15 Thread Ewan D. Milne
On Thu, 2018-11-15 at 13:52 +0100, Hannes Reinecke wrote: > On 11/14/18 6:13 PM, Ewan D. Milne wrote: > > On Tue, 2018-11-13 at 09:49 -0800, Bart Van Assche wrote: > > > On Tue, 2018-11-13 at 17:38 +, Madhani, Himanshu wrote: > > > > On Nov 13, 2018, at 6

Re: [PATCH] qla2xxx: Add SysFS hook for FC-NVMe autoconnect

2018-11-14 Thread Ewan D. Milne
On Tue, 2018-11-13 at 09:49 -0800, Bart Van Assche wrote: > On Tue, 2018-11-13 at 17:38 +, Madhani, Himanshu wrote: > > On Nov 13, 2018, at 6:23 AM, Bart Van Assche wrote: > > > On Tue, 2018-11-13 at 01:02 +, Madhani, Himanshu wrote: > > > > I see other drivers also use similar information

Re: [PATCH 1/1] qla2xxx: Initialize port speed to avoid setting lower speed

2018-11-06 Thread Ewan D. Milne
t->ct_desc.ct_sns = dma_alloc_coherent(&vha->hw->pdev->dev, > sizeof(struct ct_sns_pkt), &fcport->ct_desc.ct_sns_dma, Thanks Laurence for the bisect that found this... Reviewed-by: Ewan D. Milne

Re: [PATCH -next] scsi: qedf: remove set but not used variable 'fcport'

2018-10-19 Thread Ewan D. Milne
On Fri, 2018-10-19 at 12:12 +, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/scsi/qedf/qedf_main.c: In function 'qedf_eh_abort': > drivers/scsi/qedf/qedf_main.c:619:21: warning: > variable 'fcport' set but not used [-Wunused-but-set-variable] > struct qedf_r

Re: [PATCH v2 09/11] block: Expose queue nr_zones in sysfs

2018-10-11 Thread Ewan D. Milne
So in v2 you moved the #ifdef CONFIG_BLK_DEV_ZONED so that nr_zones is always present? It was previously changed to keep the request_queue size smaller. Would make more sense to make the nr_zones sysfs code here conditional on CONFIG_BLK_DEV_ZONED? -Ewan On Thu, 2018-10-11 at 16:09 +0900, Dami

Re: [PATCH] lpfc: fixup crash in lpfc_els_unsol_buffer()

2018-10-09 Thread Ewan D. Milne
On Tue, 2018-10-09 at 08:30 +0200, Hannes Reinecke wrote: > lpfc_nlp_get() in lpfc_els_unsol_buffer() is not running under a > lock, so there is a chance that it might actually fail. But as we > never check the return value we'll get a crash in lpfc_nlp_put() > later on trying to free an invalid bu

Re: [PATCH 1/3] scsi: Allow state transitions from OFFLINE to BLOCKED

2018-10-08 Thread Ewan D. Milne
This change would permit a device that was OFFLINE (for any reason) to go back to RUNNING via: OFFLINE -> BLOCKED -> RUNNING Obviously that was your intention, but e.g. if a device was put OFFLINE due to exceeding max_medium_access_timeouts a fabric event and recovery would put it back online. S

Re: [PATCH 0/8] qla2xxx: Bug fixes for the driver

2018-09-27 Thread Ewan D. Milne
++--- > drivers/scsi/qla2xxx/qla_mbx.c| 2 +- > drivers/scsi/qla2xxx/qla_nvme.c | 5 +-- > drivers/scsi/qla2xxx/qla_os.c | 4 +- > drivers/scsi/qla2xxx/qla_target.c | 3 +- > 6 files changed, 62 insertions(+), 57 deletions(-) > All patches in series Reviewed-by: Ewan D. Milne

Re: [PATCH] lpfc: Correct MDS diag and nvmet configuration

2018-08-20 Thread Ewan D. Milne
define LS_MDS_LOOPBACK 0x10/* MDS Diagnostics Link Up (Loopback) */ > > uint32_t hba_flag; /* hba generic flags */ > #define HBA_ERATT_HANDLED0x1 /* This flag is set when eratt handled */ Fixes driver crash when lpfc_enable_nvmet used. Tested-by: Ewan D. Milne

Re: [PATCH] sg: fix minor memory leak in error path

2018-07-12 Thread Ewan D. Milne
kfree(sfp); > return ERR_PTR(-ENODEV); > } > list_add_tail(&sfp->sfd_siblings, &sdp->sfds); > Reviewed-by: Ewan D. Milne

Re: [PATCH] scsi: aacraid: Fix PD performance regression over incorrect qd being set

2018-06-25 Thread Ewan D. Milne
> dev->hba_map[bus][target].scan_counter = dev->scan_counter; > > aac_set_safw_target_qd(dev, bus, target); > - > -update_devtype: > - dev->hba_map[bus][target].devtype = devtype; > } > } > > The "Fixes:" tag above does not look correct to me, I've put in what I see in Martin's tree. Fixes a very noticeable performance regression. Reviewed-by: Ewan D. Milne

Re: [PATCH] qla2xxx: Mask off Scope bits in retry delay.

2018-06-06 Thread Ewan D. Milne
+ ql_dbg(ql_dbg_io, sp->vha, 0x3033, > + "%s: scope=%#x retry_delay=%#x\n", __func__, > + sts24->retry_delay >> 14, retry_delay); > + } > } else { > if (scsi_status & SS_SENSE_LEN_VALID) > sense_len = le16_to_cpu(sts->req_sense_length); Reviewed-by: Ewan D. Milne

Re: [PATCH] qla2xxx: Fix setting lower transfer speed if GPSC fails

2018-06-04 Thread Ewan D. Milne
gt; ha->link_data_rate) > + fcport->fp_speed > ha->link_data_rate || > + !ha->flags.gpsc_supported) > return; > > rval = qla2x00_set_idma_speed(vha, fcport->loop_id, fcport->fp_speed, Martin, This patch fixes the issue Eda found in our test environment. Reported-by: Eda Zhou Reviewed-by: Ewan D. Milne Tested-by: Ewan D. Milne

Re: [PATCH] qla2xxx: Fix setting lower transfer speed if GPSC fails

2018-06-04 Thread Ewan D. Milne
On Mon, 2018-06-04 at 08:28 +, Bart Van Assche wrote: > On Sun, 2018-06-03 at 22:09 -0700, Himanshu Madhani wrote: > > This patch prevents driver from setting lower default speed > > of 1 GB/sec, if the switch does not support Get Port Speed > > Capabilities (GPSC) command. Setting this default

Re: [PATCH 06/10] lpfc: Check if SCSI scanning is complete, before allowing I/O commands

2018-05-09 Thread Ewan D. Milne
On Fri, 2018-05-04 at 20:37 -0700, James Smart wrote: > A race condition is being seen. I/O is being issued to scsi targets > simultaneous to a short connectivity loss. The rport block/unblock is > occurring, but the unblock is allowing pending I/O commands to intermix > with the commands being use

Re: [PATCH] lpfc: add missing Kconfig NVME dependencies

2018-02-15 Thread Ewan D. Milne
On Thu, 2018-02-15 at 14:00 -0500, Ewan D. Milne wrote: > On Wed, 2017-02-22 at 08:20 -0800, James Smart wrote: > > add missing Kconfig NVME dependencies > > > > Can't believe I missed posting this > > > > -- james > > > > Signed-off-by:

Re: [PATCH] lpfc: add missing Kconfig NVME dependencies

2018-02-15 Thread Ewan D. Milne
On Wed, 2017-02-22 at 08:20 -0800, James Smart wrote: > add missing Kconfig NVME dependencies > > Can't believe I missed posting this > > -- james > > Signed-off-by: James Smart > --- > drivers/scsi/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/scsi/Kconfig b/driver

Re: [PATCH] qla4xxx: skip error recovery in case of register disconnect.

2018-02-12 Thread Ewan D. Milne
> + > stat = qla4xxx_reset_target(ha, ddb_entry); > if (stat != QLA_SUCCESS) { > starget_printk(KERN_INFO, scsi_target(cmd->device), > @@ -9376,9 +9415,16 @@ static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd) > { > int return_status = FAILED; > struct scsi_qla_host *ha; > + int rval; > > ha = to_qla_host(cmd->device->host); > > + rval = qla4xxx_isp_check_reg(ha); > + if (rval != QLA_SUCCESS) { > + ql4_printk(KERN_INFO, ha, "PCI/Register disconnect, > exiting.\n"); > + return FAILED; > + } > + > if ((is_qla8032(ha) || is_qla8042(ha)) && ql4xdontresethba) > qla4_83xx_set_idc_dontreset(ha); > Reviewed-by: Ewan D. Milne

Re: [dm-devel] [LSF/MM TOPIC] block, dm: restack queue_limits

2018-01-30 Thread Ewan D. Milne
On Tue, 2018-01-30 at 16:07 +0100, Hannes Reinecke wrote: > On 01/29/2018 10:08 PM, Mike Snitzer wrote: > > We currently don't restack the queue_limits if the lowest, or > > intermediate, layer of an IO stack changes. > > > > This is particularly unfortunate in the case of FLUSH/FUA which may > >

Re: [PATCH 22/43] qla2xxx: Add switch command to simplify fabric discovery

2017-12-20 Thread Ewan D. Milne
On Tue, 2017-12-19 at 22:56 -0800, Himanshu Madhani wrote: > @@ -4915,12 +4941,32 @@ static int qlt_24xx_handle_els(struct scsi_qla_host > *vha, > } > > if (sess != NULL) { > + bool delete = false; > spin_lock_irqsave(&tgt->ha

RE: crash in iscsi/scsi initiator with linux-4.15.0-rc1

2017-12-19 Thread Ewan D. Milne
t fix your issue. It should. commit 81b6c999897919d5a16fedc018fe375dbab091c5 Author: Hannes Reinecke Date: Wed Dec 13 14:21:37 2017 +0100 scsi: core: check for device state in __scsi_remove_target() As it turned out device_get() doesn't use kref_get_unless_zero(), so

Re: [PATCH] scsi: check for device state in __scsi_remove_target()

2017-12-18 Thread Ewan D. Milne
On Thu, 2017-12-14 at 17:10 -0500, Ewan D. Milne wrote: > On Thu, 2017-12-14 at 10:02 +0100, Hannes Reinecke wrote: > > On 12/14/2017 09:05 AM, Jason Yan wrote: > > > > > > On 2017/12/14 6:23, Bart Van Assche wrote: > > >> On Wed, 2017-12-13 at 14:21 +010

Re: [PATCH] scsi: check for device state in __scsi_remove_target()

2017-12-14 Thread Ewan D. Milne
er to have the fix in the meantime. > > Cheers, > > Hannes We have 2 reproducible test cases, this patch fixes one of them, which was a continually oscillating FC target port w/short dev_loss_tmo. I'm still waiting for a report on the iSCSI test. The code looks good. We need to get some kind of fix for this sooner rather than later. Reviewed-by: Ewan D. Milne

Re: crash in iscsi/scsi initiator with linux-4.15.0-rc1

2017-12-01 Thread Ewan D. Milne
On Fri, 2017-12-01 at 11:00 -0600, Steve Wise wrote: > Hey, > > I'm seeing this null pointer dereference with linux-4.15.0-rc1. To reproduce > it, I connect two ram disks via iscsi/TCP, and start an fio: > > iscsiadm -m discovery --op update --type sendtargets -p 172.16.1.10:3260 > iscsiadm -m

Re: [PATCH] scsi: fix race condition when removing target

2017-12-01 Thread Ewan D. Milne
We have another test case that demonstrates this issue involving duplicate invocations of scsi_device_dev_release() on the same device. This other test case involves repeated log in / log out of an iSCSI target. (The first test case I mentioned in an earlier mail was an oscillating FC port with a

Re: [PATCH] scsi: fix race condition when removing target

2017-11-29 Thread Ewan D. Milne
On Wed, 2017-11-29 at 19:11 +, Bart Van Assche wrote: > On Wed, 2017-11-29 at 13:49 -0500, Ewan D. Milne wrote: > > because a get inside a destructor would *always* be wrong, no? > > Hello Ewan, > > That's not what we are discussing. What can happen with the SCSI

Re: [PATCH] scsi: fix race condition when removing target

2017-11-29 Thread Ewan D. Milne
get > *starget) >*/ > if (sdev->channel != starget->channel || > sdev->id != starget->id || > - !get_device(&sdev->sdev_gendev)) > + scsi_device_get_not_deleted(sdev)) > continue; > spin_unlock_irqrestore(shost->host_lock, flags); > scsi_remove_device(sdev); See subsequent discussion, however, we have a reproducible case here and the patch does appear to fix the issue (500+ iterations). Reviewed-by: Ewan D. Milne

Re: [PATCH] scsi: fix race condition when removing target

2017-11-29 Thread Ewan D. Milne
On Wed, 2017-11-29 at 17:39 +, gre...@linuxfoundation.org wrote: > On Wed, Nov 29, 2017 at 05:20:50PM +0100, h...@lst.de wrote: > > On Wed, Nov 29, 2017 at 04:18:30PM +, Bart Van Assche wrote: > > > As the above patch description shows it can happen that the SCSI core > > > calls > > > get

Re: [PATCH] lpfc: Fix hard lock up NMI in els timeout handling.

2017-11-08 Thread Ewan D. Milne
lock_irqrestore(&pring->ring_lock, iflag); > + else > + spin_unlock_irqrestore(&phba->hbalock, iflag); > > if (cmdiocbp) { > if (cmdiocbp->iocb_cmpl) { The other callers of lpfc_sli_iocbq_lookup() use the 2 different locks, depending upon the SLI-3/SLI-4 case. Reviewed-by: Ewan D. Milne

Re: [PATCH 1/2] qla2xxx: Use ql2xnvmeenable to enable Q-Pair for FC-NVMe

2017-10-16 Thread Ewan D. Milne
> set_bit(QPAIR_ONLINE_CHECK_NEEDED, &vha->dpc_flags); > qla2xxx_wake_dpc(vha); > } > @@ -6326,7 +6335,7 @@ qla2xxx_pci_error_detected(struct pci_dev *pdev, > pci_channel_state_t state) > case pci_channel_io_perm_failure: > ha->flags.pci_channel_io_perm_failure = 1; > qla2x00_abort_all_cmds(vha, DID_NO_CONNECT << 16); > - if (ql2xmqsupport) { > + if (ql2xmqsupport || ql2xnvmeenable) { > set_bit(QPAIR_ONLINE_CHECK_NEEDED, &vha->dpc_flags); > qla2xxx_wake_dpc(vha); > } Reviewed-by: Ewan D. Milne

Re: [PATCH v2 4/5] qla2xxx: Changes to support N2N logins

2017-10-13 Thread Ewan D. Milne
ql_dbg(ql_dbg_async, vha, 0x5075, > +"Format 1: Remote WWPN %8phC.\n", > +rptid_entry->u.f1.port_name); > + > + ql_dbg(ql_dbg_async, vha, 0x5075, > +"Format 1: WWPN %8phC.\n", > + vha->port_name); > + > + /* N2N. direct connect */ > + if (IS_QLA27XX(ha) && > + ((rptid_entry->u.f1.flags>>1) & 0x7) == 2) { > + /* if our portname is higher then initiate N2N login */ > + if (wwn_to_u64(vha->port_name) > > + wwn_to_u64(rptid_entry->u.f1.port_name)) { > + // ??? qlt_update_host_map(vha, id); > + vha->n2n_id = 0x1; > + ql_dbg(ql_dbg_async, vha, 0x5075, > + "Format 1: Setting n2n_update_needed for id > %d\n", > + vha->n2n_id); > + } else { > + ql_dbg(ql_dbg_async, vha, 0x5075, > + "Format 1: Remote login - Waiting for WWPN > %8phC.\n", > + rptid_entry->u.f1.port_name); > + } > + > + memcpy(vha->n2n_port_name, rptid_entry->u.f1.port_name, > + WWN_SIZE); > + set_bit(N2N_LOGIN_NEEDED, &vha->dpc_flags); > + set_bit(REGISTER_FC4_NEEDED, &vha->dpc_flags); > + set_bit(REGISTER_FDMI_NEEDED, &vha->dpc_flags); > + return; > + } > > /* buffer to buffer credit flag */ > vha->flags.bbcr_enable = (rptid_entry->u.f1.bbcr & 0xf) != 0; > @@ -4599,6 +4633,48 @@ qla25xx_set_driver_version(scsi_qla_host_t *vha, char > *version) > return rval; > } > > +int > +qla24xx_get_port_login_templ(scsi_qla_host_t *vha, dma_addr_t buf_dma, > +void *buf, uint16_t bufsiz) > +{ > + int rval, i; > + mbx_cmd_t mc; > + mbx_cmd_t *mcp = &mc; > + uint32_t*bp; > + > + if (!IS_FWI2_CAPABLE(vha->hw)) > + return QLA_FUNCTION_FAILED; > + > + ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1159, > + "Entered %s.\n", __func__); > + > + mcp->mb[0] = MBC_GET_RNID_PARAMS; > + mcp->mb[1] = RNID_TYPE_PORT_LOGIN << 8; > + mcp->mb[2] = MSW(buf_dma); > + mcp->mb[3] = LSW(buf_dma); > + mcp->mb[6] = MSW(MSD(buf_dma)); > + mcp->mb[7] = LSW(MSD(buf_dma)); > + mcp->mb[8] = bufsiz/4; > + mcp->out_mb = MBX_8|MBX_7|MBX_6|MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; > + mcp->in_mb = MBX_1|MBX_0; > + mcp->tov = MBX_TOV_SECONDS; > + mcp->flags = 0; > + rval = qla2x00_mailbox_command(vha, mcp); > + > + if (rval != QLA_SUCCESS) { > + ql_dbg(ql_dbg_mbx, vha, 0x115a, > + "Failed=%x mb[0]=%x,%x.\n", rval, mcp->mb[0], mcp->mb[1]); > + } else { > + ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x115b, > + "Done %s.\n", __func__); > + bp = (uint32_t *) buf; > + for (i = 0; i < (bufsiz-4)/4; i++, bp++) > + *bp = cpu_to_be32(*bp); > + } > + > + return rval; > +} > + > static int > qla2x00_read_asic_temperature(scsi_qla_host_t *vha, uint16_t *temp) > { Thanks. Tested-by: Ewan D. Milne

Re: [PATCH 1/1] qla2xxx: Fix sparse warnings for N2N

2017-10-13 Thread Ewan D. Milne
On Thu, 2017-10-12 at 23:08 -0700, Madhani, Madhani wrote: > From: Himanshu Madhani > > Fixes following warning reported by 0-day kernel test build > > drivers/scsi/qla2xxx/qla_iocb.c: In function 'qla2x00_els_dcmd2_iocb_timeout': > drivers/scsi/qla2xxx/qla_iocb.c:2611:50: warning: format '%x' e

Re: [PATCH] scsi: fix the issue that iscsi_if_rx doesn't parse nlmsg properly

2017-09-29 Thread Ewan D. Milne
On Mon, 2017-09-25 at 15:28 -0400, Martin K. Petersen wrote: > Xin, > > > ChunYu found a kernel crash by syzkaller: > > [...] > > > It's caused by skb_shared_info at the end of sk_buff was overwritten by > > ISCSI_KEVENT_IF_ERROR when parsing nlmsg info from skb in iscsi_if_rx. > > > > During th

Re: [PATCH] scsi: sd: Implement blacklist option for WRITE SAME w/ UNMAP

2017-09-28 Thread Ewan D. Milne
commands with the UNMAP bit set to be limited to the > value reported in MAXIMUM UNMAP LBA COUNT in the Block Limits VPD. > > Implement a blacklist option that can be used to accommodate devices > with this behavior. > > Reported-by: Bill Kuzeja > Reported-by: Ewan D. Milne >

Re: [PATCH] sd: Limit WRITE SAME / WRITE SAME(16) w/UNMAP length for certain devices

2017-09-27 Thread Ewan D. Milne
On Mon, 2017-09-25 at 21:46 -0400, Martin K. Petersen wrote: > Ewan, > > > Some devices do not support a WRITE SAME / WRITE SAME(16) with the > > UNMAP bit set up to the length specified in the MAXIMUM WRITE SAME > > LENGTH field in the block limits VPD page (or, the field is zero, > > indicating

[PATCH] sd: Limit WRITE SAME / WRITE SAME(16) w/UNMAP length for certain devices

2017-09-19 Thread Ewan D. Milne
From: "Ewan D. Milne" Some devices do not support a WRITE SAME / WRITE SAME(16) with the UNMAP bit set up to the length specified in the MAXIMUM WRITE SAME LENGTH field in the block limits VPD page (or, the field is zero, indicating there is no limit). Limit the length by the MAXIMUM

Re: [PATCH] scsi: SSDs can timeout during FS init because of too many unmaps

2017-09-19 Thread Ewan D. Milne
On Tue, 2017-09-19 at 09:02 -0400, Bill Kuzeja wrote: > I encountered this issue putting XFS on several brands of SSDs on my > system. During initialization, I would see a bunch of timeouts on > WRITE_SAME_16 commands, which would get aborted, reissued, and complete. > The logs look like this: > >

Re: SCSI Oops: Unable to handle kernel NULL ptr dereference

2017-08-10 Thread Ewan D. Milne
[cc's snipped to linux-scsi ] On Thu, 2017-08-10 at 17:05 +, man...@openmail.cc wrote: > Hello, > > I'd like to report this rare panic I experienced today. I've been on > 4.12.3 since it was released and got this panic totally unexpected, > probably when terminating my WL compositor. I at

Re: [PATCH] st: fix blk_get_queue usage

2017-08-01 Thread Ewan D. Milne
k_get_queue(SDp->request_queue)) > goto out_put_disk; > + disk->queue = SDp->request_queue; > tpnt->driver = &st_template; > > tpnt->device = SDp; Fixes: 2b5bebccd282 ("st: Take additional queue ref in st_probe") Reviewed-by: Ewan D. Milne

Re: [for-4.14 RFC PATCH 1/2] dm rq: avoid deadlock if dm-mq is stacked on old .request_fn device(s)

2017-07-14 Thread Ewan D. Milne
On Fri, 2017-07-14 at 10:19 -0400, Mike Snitzer wrote: > > Do you see a benefit to extracting that portion of your WIP patch > (removing the ->complete handler entirely)? > > Or leave well enough alone and just continue to disable dm-mq's ability > to stack on .request_fn paths? > > Given SCSI's

Re: [PATCH RESEND] scsi: Add STARGET_CREATED_REMOVE state to scsi_target_state

2017-06-28 Thread Ewan D. Milne
[ removed cc: stable from discussion ] On Wed, 2017-06-28 at 09:38 +0200, Johannes Thumshirn wrote: > > Looks good, > Reviewed-by: Johannes Thumshirn > > Although we've been tampering with the target removal code for quite some > time now, so I really have the gut feeling we haven't really fixe

Re: Permanently change thin provisioning method from user space?

2017-06-27 Thread Ewan D. Milne
On Tue, 2017-06-27 at 14:02 +0300, Andrei Borzenkov wrote: > I'm facing storage system that while generally advertising support for > WRITE_SAME_16 with UNMAP in reality fails this request depending on > exact volume configuration. This configuration is done on storage side > and may happen after h

[PATCH RESEND] scsi: Add STARGET_CREATED_REMOVE state to scsi_target_state

2017-06-27 Thread Ewan D. Milne
From: "Ewan D. Milne" The addition of the STARGET_REMOVE state had the side effect of introducing a race condition that can cause a crash. scsi_target_reap_ref_release() checks the starget->state to see if it still in STARGET_CREATED, and if so, skips calling transport_remove

Re: [RFC v2 2/2] scsi: add rate limit to scsi sense code uevent

2017-06-05 Thread Ewan D. Milne
On Thu, 2017-05-18 at 11:14 -0700, Song Liu wrote: > This patch adds rate limits to SCSI sense code uevets. Currently, > the rate limit is hard-coded to 16 events per second. > > The code tracks nano second time of latest 16 events in a circular > buffer. When a new event arrives, the time is comp

  1   2   3   >