Re: [PATCHv2] tcmu: Add fifo type waiter list support to avoid starvation

2017-07-12 Thread Mike Christie
On 07/12/2017 02:16 AM, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > The fifo type waiter list will hold the udevs who are waiting for the > blocks from the data global pool. The unmap thread will try to feed the > first udevs in waiter list, if the

Re: [PATCH v3 5/7] libsas: add a new workqueue to run probe/destruct discovery event

2017-07-12 Thread wangyijing
在 2017/7/13 0:50, John Garry 写道: > On 10/07/2017 08:06, Yijing Wang wrote: >> Sometimes, we want sync libsas probe or destruct in sas discovery work, >> like when libsas revalidate domain. We need to split probe and destruct >> work from the scsi host workqueue. >> >> Signed-off-by: Yijing Wang

Re: [PATCH v3 6/7] libsas: add wait-complete support to sync discovery event

2017-07-12 Thread wangyijing
在 2017/7/12 21:51, John Garry 写道: > On 10/07/2017 08:06, Yijing Wang wrote: >> >> static void sas_chain_event(int event, unsigned long *pending, >> @@ -592,9 +596,9 @@ int sas_discover_event(struct asd_sas_port *port, enum >> discover_event ev) >> { >> struct sas_discovery *disc; >> >> +

Re: [PATCH v3 1/7] libsas: Use static sas event pool to appease sas event lost

2017-07-12 Thread wangyijing
There is no special meaning for the pool size, if flutter of > 25 events, notify sas events will return error, and the further step work is depending on LLDD drivers. I hope libsas could do more work in this case, but now it seems a little difficult, this patch may be a

Re: [PATCH v3 0/7] Enhance libsas hotplug feature

2017-07-12 Thread wangyijing
在 2017/7/12 17:59, John Garry 写道: > On 10/07/2017 08:06, Yijing Wang wrote: >> This patchset is based Johannes's patch >> "scsi: sas: scsi_queue_work can fail, so make callers aware" >> >> Now the libsas hotplug has some issues, Dan Williams report >> a similar bug here before >>

Re: [PATCH v3 0/7] Enhance libsas hotplug feature

2017-07-12 Thread wangyijing
在 2017/7/12 17:59, John Garry 写道: > On 10/07/2017 08:06, Yijing Wang wrote: >> This patchset is based Johannes's patch >> "scsi: sas: scsi_queue_work can fail, so make callers aware" >> >> Now the libsas hotplug has some issues, Dan Williams report >> a similar bug here before >>

[PATCH] libiscsi: Remove iscsi_destroy_session

2017-07-12 Thread Khazhismel Kumykov
iscsi_session_teardown was the only user of this function. Function currently is just short for iscsi_remove_session + iscsi_free_session. Signed-off-by: Khazhismel Kumykov --- with "libiscsi: Fix use after free race during iscsi_session_teardown" removing the last user.

[PATCH] libiscsi: Fix use-after-free race during iscsi_session_teardown

2017-07-12 Thread Khazhismel Kumykov
Session attributes exposed through sysfs were freed before the device was destroyed, resulting in a potential use-after-free. Free these attributes after removing the device. Signed-off-by: Khazhismel Kumykov --- drivers/scsi/libiscsi.c | 8 1 file changed, 4

[RFC v3 1/2] scsi: generate uevent for SCSI sense code

2017-07-12 Thread Song Liu
This patch adds capability for SCSI layer to generate uevent for SCSI sense code. The feature is gated by CONFIG_SCSI_SENSE_UEVENT. We can configure which sense keys generate uevent for each device through sysfs entry sense_event_filter, which is a bitmap of "sense keys to generate uevent" For

[RFC v3 0/2] generate uevent for SCSI sense code

2017-07-12 Thread Song Liu
This change is to follow up our discussion on event log for media management during LSF/MM 2017. Changes from RFC v2: 1. change rate limit of events from per device to per SCSI host 2. fix bugs from feedbacks Please kindly let me know your thoughts on this. Thanks, Song Song Liu (2): scsi:

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

2017-07-12 Thread Song Liu
This patch adds rate limits to SCSI sense code uevets. Currently, the rate limit is hard-coded to 64 events per second per Scsi_Host. The code tracks nano second time of latest 64 events in a circular buffer. When a new event arrives, the time is compared against the latest time in the buffer. If

Dear friend,

2017-07-12 Thread Smith Awala
Hi friend I am a banker in IDB BANK. I want to transfer an abandoned sum of USD15. 6Million to your Bank account. 40/percent will be your share. No risk involved but keeps it as secret. Contact me for more details. Please reply me through my alternative email id only (mrsmithawl...@gmail.com)

Re: [PATCH v7 0/6] g_NCR5380: PDMA fixes and cleanup

2017-07-12 Thread Martin K. Petersen
Finn, > Ondrej, would you please test this new series? Applied to 4.14/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 0/7] aacraid: split off EH functions

2017-07-12 Thread Martin K. Petersen
Hannes, > this patchset is a split off from the original patchset to rework SCSI > EH function parameters. As it's pretty much independent and an > improvement to the existing EH callback function, so I'm posting it > separately. Applied to 4.14/scsi-queue. Thank you! -- Martin K. Petersen

Re: [PATCH v2 2/2] smartpqi: limit transfer length to 1MB

2017-07-12 Thread Martin K. Petersen
Don, > The smartpqi firmware will bypass the cache for any request larger > than 1MB, so we should cap the request size to avoid any > performance degradation in kernels later than v4.3 Ping on these... -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: libfc: pass an error pointer to fc_disc_error()

2017-07-12 Thread Martin K. Petersen
Dan, > This patch is basically to silence a static checker warning. > > drivers/scsi/libfc/fc_disc.c:326 fc_disc_error() > warn: passing a valid pointer to 'PTR_ERR' > > It doesn't affect runtime because it treats -ENOMEM and a valid pointer > the same. But the documentation says we

Re: [PATCH] scsi: hisi_sas: make several const arrays static

2017-07-12 Thread Martin K. Petersen
Colin, > Don't populate various tables on the stack but make them static const. > Makes the object code smaller by over 280 bytes: Applied to 4.13/scsi-fixes. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: qla2xxx: Off by one in qlt_ctio_to_cmd()

2017-07-12 Thread Martin K. Petersen
Dan, > There are "req->num_outstanding_cmds" elements in the > req->outstanding_cmds[] array so the > here should be >=. Applied to 4.13/scsi-fixes. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v2] scsi: sg: fix SG_DXFER_FROM_DEV transfers

2017-07-12 Thread Martin K. Petersen
Johannes, > SG_DXFER_FROM_DEV transfers do not necessarily have a dxferp as we set > it to NULL for the old sg_io read/write interface, but must have a > length bigger than 0. This fixes a regression introduced by commit > 28676d869bbb ("scsi: sg: check for valid direction before starting the >

Re: [PATCH] virtio_scsi: always read VPD pages for multiqueue too

2017-07-12 Thread Martin K. Petersen
Paolo, > Multi-queue virtio-scsi uses a different scsi_host_template struct. > Add the .device_alloc field there, too. Applied to 4.13/scsi-fixes by hand. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH][V2] scsi: qedf: fix spelling mistake: "offlading" -> "offloading"

2017-07-12 Thread Martin K. Petersen
Colin, > Trivial fix to spelling mistake in QEDF_INFO message and > remove duplicated "since" (thanks to Tyrel Datwyler for spotting > the latter issue). Applied to 4.13/scsi-fixes. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: qedi: fix another spelling mistake: "alloction" -> "allocation"

2017-07-12 Thread Martin K. Petersen
Colin, > Trivial fix to spelling mistake in QEDF_ERR message. I should have > also included this in a previous fix, but I only just spotted this one. Applied to 4.13/scsi-fixes. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: isci: fix typo in function names

2017-07-12 Thread Martin K. Petersen
Colin, > There are a couple of typos in function names and spelling of request > where the letters u and e are swapped: > > scu_ssp_reqeust_construct_task_context > scu_sata_reqeust_construct_task_context > > Fix the spelling of request. Applied to 4.13/scsi-fixes. -- Martin K. Petersen

Re: [PATCH] cxlflash: return -EFAULT if copy_from_user() fails

2017-07-12 Thread Martin K. Petersen
Dan, > The copy_from/to_user() functions return the number of bytes remaining > to be copied but we had intended to return -EFAULT here. > > Fixes: bc88ac47d5cb ("scsi: cxlflash: Support AFU debug") > Signed-off-by: Dan Carpenter Applied to 4.13/scsi-fixes, thanks!

Re: [PATCH v1 1/1] qedi: Add support for Boot from SAN over iSCSI offload

2017-07-12 Thread Martin K. Petersen
Nilesh, > This patch adds support for Boot from SAN over iSCSI offload. > The iSCSI boot information in the NVRAM is populated under > /sys/firmware/iscsi_bootX/ using qed NVM-image reading API and > further exported to open-iscsi to perform iSCSI login enabling > boot over offload iSCSI

Re: [PATCH] tcmu: Fix possible to/from address overflow when doing the memcpy

2017-07-12 Thread Mike Christie
On 07/12/2017 02:51 AM, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > For most case the sg->length equals to PAGE_SIZE, so this bug won't > be triggered. Otherwise this will crash the kernel, for example when > all segments' sg->length equal to 1K. > >

Re: CPU lock-ups with 4.12.0+ kernels related to usb_storage

2017-07-12 Thread Christoph Hellwig
On Wed, Jul 12, 2017 at 12:10:02PM -0400, Alan Stern wrote: > This is pretty conclusive. The problem comes about because > usb_stor_control_thread() calls scsi_mq_done() while holding > shost->host_lock, and then scsi_eh_scmd_add() tries to acquire that > same lock. > > I don't know why this

Re: [PATCH v3 5/7] libsas: add a new workqueue to run probe/destruct discovery event

2017-07-12 Thread John Garry
On 10/07/2017 08:06, Yijing Wang wrote: Sometimes, we want sync libsas probe or destruct in sas discovery work, like when libsas revalidate domain. We need to split probe and destruct work from the scsi host workqueue. Signed-off-by: Yijing Wang CC: John Garry

Re: CPU lock-ups with 4.12.0+ kernels related to usb_storage

2017-07-12 Thread Alan Stern
On Thu, 13 Jul 2017, Arthur Marsh wrote: > Thanks for the advice, I've enabled CONFIG_FRAME_POINTER and managed to > catch 1 more log triggered by issuing a > > blkid > > command after inserting a USB stick. > > The problem is that I can't be certain of triggering the problem when > testing

Re: [PATCH] scsi: default to scsi-mq

2017-07-12 Thread Jonathan Cameron
On Wed, 12 Jul 2017 14:18:14 + Bart Van Assche wrote: > On Wed, 2017-07-12 at 09:26 +0100, John Garry wrote: > > > > What block driver controls the block device for which the performance > > > > regression > > > > has been observed? How many hardware queues were

Re: [PATCH 2/6] SCSI: use blk_mq_run_hw_queues() in scsi_kick_queue()

2017-07-12 Thread Bart Van Assche
On Wed, 2017-07-12 at 11:15 +0800, Ming Lei wrote: > On Tue, Jul 11, 2017 at 07:57:53PM +, Bart Van Assche wrote: > > On Wed, 2017-07-12 at 02:20 +0800, Ming Lei wrote: > > > Now SCSI won't stop queue, and not necessary to use > > > blk_mq_start_hw_queues(), so switch to blk_mq_run_hw_queues()

Re: [PATCH] scsi: default to scsi-mq

2017-07-12 Thread Bart Van Assche
On Wed, 2017-07-12 at 09:26 +0100, John Garry wrote: > > > What block driver controls the block device for which the performance > > > regression > > > has been observed? How many hardware queues were created by that block > > > driver > > > (see also /sys/block/*/mq/...)? > > Just confirming

Re: [PATCH v3 6/7] libsas: add wait-complete support to sync discovery event

2017-07-12 Thread John Garry
On 10/07/2017 08:06, Yijing Wang wrote: static void sas_chain_event(int event, unsigned long *pending, @@ -592,9 +596,9 @@ int sas_discover_event(struct asd_sas_port *port, enum discover_event ev) { struct sas_discovery *disc; + disc = >disc; if (!port)

Re: [PATCH v3 0/7] Enhance libsas hotplug feature

2017-07-12 Thread Johannes Thumshirn
On Wed, Jul 12, 2017 at 10:59:27AM +0100, John Garry wrote: > After: > ... > root@(none)$ echo 0 > ./phy-0:7/sas_phy/phy-0:7/enable > root@(none)$ [ 446.193336] hisi_sas_v2_hw HISI0162:01: found dev[8:1] is > gone > [ 446.249205] hisi_sas_v2_hw HISI0162:01: found dev[7:1] is gone > [

Re: [PATCH v3 1/7] libsas: Use static sas event pool to appease sas event lost

2017-07-12 Thread John Garry
On 12/07/2017 09:47, wangyijing wrote: 在 2017/7/12 16:17, John Garry 写道: On 12/07/2017 03:06, wangyijing wrote: -unsigned long port_events_pending; -unsigned long phy_events_pending; +struct asd_sas_event port_events[PORT_POOL_SIZE]; +struct asd_sas_event

Re: [PATCH v3 0/7] Enhance libsas hotplug feature

2017-07-12 Thread John Garry
On 10/07/2017 08:06, Yijing Wang wrote: This patchset is based Johannes's patch "scsi: sas: scsi_queue_work can fail, so make callers aware" Now the libsas hotplug has some issues, Dan Williams report a similar bug here before

Re: [PATCH v3 1/7] libsas: Use static sas event pool to appease sas event lost

2017-07-12 Thread wangyijing
在 2017/7/12 16:17, John Garry 写道: > On 12/07/2017 03:06, wangyijing wrote: -unsigned long port_events_pending; -unsigned long phy_events_pending; +struct asd_sas_event port_events[PORT_POOL_SIZE]; +struct asd_sas_event phy_events[PHY_POOL_SIZE];

Re: [PATCH] scsi: default to scsi-mq

2017-07-12 Thread John Garry
What block driver controls the block device for which the performance regression has been observed? How many hardware queues were created by that block driver (see also /sys/block/*/mq/...)? Just confirming that we have only 1 queue: /sys/block/sdc/mq/0 as example Hi Bart, Here's the shost

RE: [PATCH v2 11/15] megaraid_sas: Set device queue_depth same as HBA can_queue value in scsi-mq mode

2017-07-12 Thread Shivasharan Srikanteshwara
> -Original Message- > From: Kashyap Desai [mailto:kashyap.de...@broadcom.com] > Sent: Tuesday, July 11, 2017 9:18 PM > To: Christoph Hellwig; Shivasharan Srikanteshwara > Cc: linux-scsi@vger.kernel.org; martin.peter...@oracle.com; > the...@redhat.com; j...@linux.vnet.ibm.com; Sumit

Re: [PATCH v3 1/7] libsas: Use static sas event pool to appease sas event lost

2017-07-12 Thread John Garry
On 12/07/2017 03:06, wangyijing wrote: -unsigned long port_events_pending; -unsigned long phy_events_pending; +struct asd_sas_event port_events[PORT_POOL_SIZE]; +struct asd_sas_event phy_events[PHY_POOL_SIZE]; int error; Hi Yijing, So now we are creating a static

Re: [PATCH] scsi: libfc: pass an error pointer to fc_disc_error()

2017-07-12 Thread Johannes Thumshirn
On Wed, Jul 12, 2017 at 10:30:22AM +0300, Dan Carpenter wrote: > This patch is basically to silence a static checker warning. > > drivers/scsi/libfc/fc_disc.c:326 fc_disc_error() > warn: passing a valid pointer to 'PTR_ERR' > > It doesn't affect runtime because it treats -ENOMEM and a

[PATCH] tcmu: Fix possible to/from address overflow when doing the memcpy

2017-07-12 Thread lixiubo
From: Xiubo Li For most case the sg->length equals to PAGE_SIZE, so this bug won't be triggered. Otherwise this will crash the kernel, for example when all segments' sg->length equal to 1K. Signed-off-by: Xiubo Li ---

[PATCH] scsi: qedi: Fix return code in qedi_ep_connect()

2017-07-12 Thread Dan Carpenter
We shouldn't be writing over the "ret" variable. It means we return ERR_PTR(0) which is NULL and it results in a NULL dereference in the caller. Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") Signed-off-by: Dan Carpenter diff

[PATCH] scsi: libfc: pass an error pointer to fc_disc_error()

2017-07-12 Thread Dan Carpenter
This patch is basically to silence a static checker warning. drivers/scsi/libfc/fc_disc.c:326 fc_disc_error() warn: passing a valid pointer to 'PTR_ERR' It doesn't affect runtime because it treats -ENOMEM and a valid pointer the same. But the documentation says we should be passing an

[PATCHv2] tcmu: Add fifo type waiter list support to avoid starvation

2017-07-12 Thread lixiubo
From: Xiubo Li The fifo type waiter list will hold the udevs who are waiting for the blocks from the data global pool. The unmap thread will try to feed the first udevs in waiter list, if the global free blocks available are not enough, it will stop traversing the

Re: [PATCH] hpsa: add support for legacy boards

2017-07-12 Thread Hannes Reinecke
On 07/12/2017 09:11 AM, Christoph Hellwig wrote: > On Tue, Jul 11, 2017 at 06:58:36PM +0300, Meelis Roos wrote: >>> The 5i controller is probably too old for the hpsa driver to support. >>> The hpsa driver is looking for information to determine if the drive is >>> online/offline and >>> this

Re: [PATCH] hpsa: add support for legacy boards

2017-07-12 Thread Christoph Hellwig
On Tue, Jul 11, 2017 at 06:58:36PM +0300, Meelis Roos wrote: > > The 5i controller is probably too old for the hpsa driver to support. > > The hpsa driver is looking for information to determine if the drive is > > online/offline and > > this information is not available. > > > > What was the