[PATCH V3 0/2] Add QLogic FastLinQ FCoE (qedf) driver

2017-02-03 Thread Dupuis, Chad
From: "Dupuis, Chad" Dave, please apply the qed patch to net-next at your earliest convenience. Martin, the qed patch needs to be applied first as the qedf patch is dependent on the FCoE bits in the first qed driver patch. This series introduces the hardware offload FCoE

[PATCH V3 net-next 1/2] qed: Add support for hardware offloaded FCoE.

2017-02-03 Thread Dupuis, Chad
From: Arun Easi This adds the backbone required for the various HW initalizations which are necessary for the FCoE driver (qedf) for QLogic FastLinQ 4 line of adapters - FW notification, resource initializations, etc. Signed-off-by: Arun Easi

[GIT PULL] SCSI fixes for 4.10-rc6

2017-02-03 Thread James Bottomley
A single fix this time: a fix for a virtqueue removal bug which only appears to affect S390, but which results in the queue hanging forever thus causing the machine to fail shutdown. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short

[PATCH] scsi, block: fix memory leak of sdpk on when gd fails to allocate

2017-02-03 Thread Colin King
From: Colin Ian King On an allocation failure of gd, the current exit path is via out_free_devt which leaves sdpk still allocated and hence it gets leaked. Fix this by correcting the order of resource free'ing with a change in the error exit path labels. Detected by

Re: [PATCHv3 3/6] sg: protect accesses to 'reserved' page array

2017-02-03 Thread Johannes Thumshirn
On 02/03/2017 05:19 PM, Christoph Hellwig wrote: On Fri, Feb 03, 2017 at 02:38:35PM +0100, Hannes Reinecke wrote: On 02/03/2017 02:31 PM, Christoph Hellwig wrote: - if (sg_res_in_use(sfp)) { + mutex_lock(>f_mutex); + if (sfp->res_in_use) { +

Re: [PATCH 1/2] qla2xxx: Fix a recently introduced memory leak

2017-02-03 Thread Bart Van Assche
On Wed, 2017-01-25 at 18:28 -0500, Martin K. Petersen wrote: > > > > > > "Bart" == Bart Van Assche writes: > > Bart> qla2x00_probe_one() allocates IRQs before it initializes rsp_q_map > Bart> so IRQs must be freed even if rsp_q_map allocation did not occur. > Bart>

Re: [PATCHv3 3/6] sg: protect accesses to 'reserved' page array

2017-02-03 Thread James Bottomley
On Fri, 2017-02-03 at 19:06 +0100, Johannes Thumshirn wrote: > > On 02/03/2017 05:19 PM, Christoph Hellwig wrote: > > On Fri, Feb 03, 2017 at 02:38:35PM +0100, Hannes Reinecke wrote: > > > On 02/03/2017 02:31 PM, Christoph Hellwig wrote: > > > > > - if (sg_res_in_use(sfp)) { > > > > >

Re: [PATCH 00/15] qla2xxx: Bug Fixes and updates for target.

2017-02-03 Thread Madhani, Himanshu
Hi Bart, On 2/3/17, 8:26 AM, "Bart Van Assche" wrote: >On Thu, 2017-02-02 at 11:42 -0800, Himanshu Madhani wrote: >> Please consider this series for inclusion in target-pending. > >Hello Himanshu, > >What tree have these patches been generated against? Not all

[PATCH v2 06/14] qla2xxx: Improve T10-DIF/PI handling in driver.

2017-02-03 Thread Himanshu Madhani
From: Quinn Tran Add routines to support T10 DIF tag. Signed-off-by: Quinn Tran Signed-off-by: Anil Gurumurthy Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_dbg.h | 1

[PATCH v2 11/14] qla2xxx: Fix inadequate lock protection for ABTS.

2017-02-03 Thread Himanshu Madhani
From: Quinn Tran Normally, ABTS is sent to Target Core as Task MGMT command. In the case of error, qla2xxx needs to send response, hardware_lock is required to prevent request queue corruption. Signed-off-by: Quinn Tran Signed-off-by: Himanshu

[PATCH v2 00/14] qla2xxx: Bug Fixes and updates for target.

2017-02-03 Thread Himanshu Madhani
Hi Bart, Please consider this series for inclusion in target-pending. This series contains following changes. o Fix for the deadlock because of inconsistent lock usage reported by you. o Added patch to submit non-critical MBX command via IOCB path. o Improved T10-DIF/PI handling with target

[PATCH v2 12/14] qla2xxx: Add async new target notification

2017-02-03 Thread Himanshu Madhani
From: Quinn Tran Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 6 +++--- drivers/scsi/qla2xxx/qla_target.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-)

[PATCH v2 08/14] qla2xxx: Change scsi host lookup method

2017-02-03 Thread Himanshu Madhani
From: Quinn Tran For target mode, when new scsi command arrive, driver first performs a look up of the SCSI Host. The current look up method is based on the ALPA portion of the NPort ID. For Cisco switch, the ALPA can not be used as the index. Instead, the new search

[PATCH v2 09/14] qla2xxx: Fix memory leak for abts processing

2017-02-03 Thread Himanshu Madhani
From: Quinn Tran Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_target.c

[PATCH v2 13/14] qla2xxx: Fix sess_lock & hardware_lock lock order problem.

2017-02-03 Thread Himanshu Madhani
From: Quinn Tran The main lock that needs to be held for CMD or TMR submission to upper layer is the sess_lock. The sess_lock is used to serialize cmd submission and session deletion. The addition of hardware_lock being held is not necessary. This patch removes

Re: [REGRESSION v4.10-rc1] blkdev_issue_zeroout() returns -EREMOTEIO on the first call for SCSI device that doesn't support WRITE SAME

2017-02-03 Thread Martin K. Petersen
> "Jens" == Jens Axboe writes: >> I think we should fix sd.c to only send WRITE SAME if either of the >> variants are explicitly listed as supported through REPORT SUPPORTED >> OPERATION CODES, or maybe through a whitelist if there are important >> enough devices. Jens> Yep

[PATCH v1 3/8] scsi: ufs: add load based scaling of UFS gear

2017-02-03 Thread Subhash Jadavani
UFS driver's load based clock scaling feature scales down the ufs related clocks in order to allow low power modes of chipsets. UniPro 1.6 supports maximum gear up to HS-G3 (High Speed Gear3) and some of the chipsets low power modes may not be allowed in HS-G3 hence this change adds support to

[PATCH v1 2/8] scsi: ufs: reduce printout for aborted requests

2017-02-03 Thread Subhash Jadavani
From: Gilad Broner Details printed for each request that is aborted can overload the target as there can be several requests that are aborted at once. This change will print full request details only for the first aborted request since the last link reset, and minimal

[PATCH v1 0/8] scsi: ufs: enhancements, bug fixes and debug support

2017-02-03 Thread Subhash Jadavani
This patch series adds following things: - Gear scaling during clock scaling to save additional power - Make clock scaling independent clock gating so that we can set lower clock gating timeout than clock scaling window - one bug fix to clock scaling - additional debug support Gilad Broner

[PATCH v1 1/8] scsi: ufs: skip request abort task when previous aborts failed

2017-02-03 Thread Subhash Jadavani
From: Gilad Broner On certain error conditions request abort task itself might fail when aborting a request. In such case, subsequent request aborts should skip issuing the abort task as it is expected to fail as well, and device reset handler will be called next.

[PATCH v1 5/8] scsi: ufs: don't suspend clock scaling during clock gating

2017-02-03 Thread Subhash Jadavani
Currently we are suspending clock scaling during clock gating which doesn't allow us to have clock gating timeout lower than clock scaling polling window. If clock gating timeout is smaller than the clock scaling polling window then we will mostly suspend the clock scaling before clock scaling

[PATCH v1 4/8] scsi: ufs: add host state prints in failure cases

2017-02-03 Thread Subhash Jadavani
From: Gilad Broner Whenever some UFS failure occurs the driver prints the UFS registers in order to help with analysis of the failure. However this may not be sufficient in some cases, so having the host controller state as it is represented and managed in the driver will

[PATCH v1 6/8] scsi: ufs: kick start clock scaling only after device detection

2017-02-03 Thread Subhash Jadavani
UFS clock scaling might start kicking in even before the device is running at the fastest interface speed which is undesirable. This change moves the clock scaling kick start only after the device is detected and running at the fastest interface speed. Signed-off-by: Subhash Jadavani

[PATCH v1 8/8] scsi: ufs: dump hw regs on link failures

2017-02-03 Thread Subhash Jadavani
From: Venkat Gopalakrishnan Dump host state, power info and host/vendor specific registers on link failures. This provides useful info to debug the failures. Signed-off-by: Venkat Gopalakrishnan Signed-off-by: Subhash Jadavani

[PATCH v1 7/8] scsi: ufs-qcom: dump additional testbus registers

2017-02-03 Thread Subhash Jadavani
From: Venkat Gopalakrishnan Change testbus default config, dump additional testbus registers along with other debug vendor specific registers. These additional info are useful in debugging link related failures. Signed-off-by: Venkat Gopalakrishnan

[PATCH v2 04/14] qla2xxx: Use IOCB interface to submit non-critical MBX.

2017-02-03 Thread Himanshu Madhani
From: Quinn Tran The Mailbox interface is currently over subscribed. We like to reserve the Mailbox interface for the chip managment and link initialization. Any non essential Mailbox command will be routed through the IOCB interface. The IOCB interface is able to absorb

[PATCH v2 14/14] qla2xxx: Update driver version to 9.00.00.00-k

2017-02-03 Thread Himanshu Madhani
Signed-off-by: Himanshu Madhani signed-off-by: Giridhar Malavali --- drivers/scsi/qla2xxx/qla_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_version.h

[PATCH v2 10/14] qla2xxx: Fix request queue corruption.

2017-02-03 Thread Himanshu Madhani
From: Quinn Tran When FW notify driver or driver detects low FW resource, driver tries to send out Busy SCSI Status to tell Initiator side to back off. During the send process, the lock was not held. Signed-off-by: Quinn Tran Signed-off-by:

[PATCH v2 05/14] qla2xxx: Add DebugFS node to display Port Database

2017-02-03 Thread Himanshu Madhani
Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali --- drivers/scsi/qla2xxx/qla_def.h | 2 + drivers/scsi/qla2xxx/qla_dfs.c | 92 -- 2 files changed, 90 insertions(+), 4

[PATCH v2 01/14] qla2xxx: Fix delayed response to command for loop mode/direct connect.

2017-02-03 Thread Himanshu Madhani
From: Quinn Tran Current driver wait for FW to be in the ready state before processing in-coming commands. For Arbitrated Loop or Point-to- Point (not switch), FW Ready state can take a while. FW will transition to ready state after all Nports have been logged in. In the

[PATCH v2 02/14] qla2xxx: Allow relogin to proceed if remote login did not finish

2017-02-03 Thread Himanshu Madhani
From: Quinn Tran If the remote port have started the login process, then the PLOGI and PRLI should be back to back. Driver will allow the remote port to complete the process. For the case where the remote port decide to back off from sending PRLI, this local port sets an

[PATCH v2 07/14] qla2xxx: Export DIF stats via debugfs

2017-02-03 Thread Himanshu Madhani
From: Anil Gurumurthy Signed-off-by: Anil Gurumurthy Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 12 drivers/scsi/qla2xxx/qla_dfs.c | 15 +++ 2 files changed,

[PATCH v2 03/14] qla2xxx: Allow vref count to timeout on vport delete.

2017-02-03 Thread Himanshu Madhani
From: Joe Carnuccio Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_attr.c | 4 +--- drivers/scsi/qla2xxx/qla_mid.c | 12 +++- 2 files changed, 8 insertions(+),

Re: [PATCH v5 02/11] phy: exynos-ufs: add UFS PHY driver for EXYNOS SoC

2017-02-03 Thread Alim Akhtar
Hi Kishon, On 11/19/2015 07:09 PM, Kishon Vijay Abraham I wrote: Hi, On Tuesday 17 November 2015 01:41 PM, Alim Akhtar wrote: Hi Thanks again for looking into this. On 11/17/2015 11:46 AM, Kishon Vijay Abraham I wrote: Hi, On Monday 09 November 2015 10:56 AM, Alim Akhtar wrote: From:

Re: [PATCH V4 16/24] aacraid: Add task management functionality

2017-02-03 Thread Johannes Thumshirn
On 02/03/2017 12:53 AM, Raghava Aditya Renukunta wrote: Added support to send out task management commands. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll --- [...] Zapped C++ comment [...] +static

Re: [PATCH V4 19/24] aacraid: Added new IWBR reset

2017-02-03 Thread Johannes Thumshirn
On 02/03/2017 12:53 AM, Raghava Aditya Renukunta wrote: Added a new IWBR soft reset type, reworked the IOP reset interface for a bit. Signed-off-by: Raghava Aditya Renukunta Signed-off-by: Dave Carroll --- Reviewed-by:

Re: [PATCH] net-next: treewide use is_vlan_dev() helper function.

2017-02-03 Thread Joe Perches
On Fri, 2017-02-03 at 22:26 -0600, Parav Pandit wrote: > This patch makes use of is_vlan_dev() function instead of flag > comparison which is exactly done by is_vlan_dev() helper function. Thanks. btw: after applying this patch, there is one left $ git grep -E -n "&\s*IFF_802_1Q_VLAN\b" --

Re: [REGRESSION v4.10-rc1] blkdev_issue_zeroout() returns -EREMOTEIO on the first call for SCSI device that doesn't support WRITE SAME

2017-02-03 Thread Jens Axboe
On 02/03/2017 03:45 PM, Martin K. Petersen wrote: >> "Jens" == Jens Axboe writes: > >>> I think we should fix sd.c to only send WRITE SAME if either of the >>> variants are explicitly listed as supported through REPORT SUPPORTED >>> OPERATION CODES, or maybe through a

[PATCH] net-next: treewide use is_vlan_dev() helper function.

2017-02-03 Thread Parav Pandit
This patch makes use of is_vlan_dev() function instead of flag comparison which is exactly done by is_vlan_dev() helper function. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens --- drivers/infiniband/core/cma.c| 6

Re: [PATCH 3/4] sg: check for valid direction before starting the request

2017-02-03 Thread Hannes Reinecke
On 02/03/2017 11:28 AM, Christoph Hellwig wrote: > On Fri, Feb 03, 2017 at 09:54:50AM +0100, Hannes Reinecke wrote: >> From: Johannes Thumshirn >> >> Check for a valid direction before starting the request, otherwise we risk >> running into an assertion in the scsi midlayer

Re: [PATCHv2 5/6] sg: use standard lists for sg_requests

2017-02-03 Thread Johannes Thumshirn
On 02/03/2017 01:18 PM, Hannes Reinecke wrote: 'Sg_request' is using a private list implementation; convert it to standard lists. Signed-off-by: Hannes Reinecke --- [..] static bool sg_is_valid_dxfer(sg_io_hdr_t *hp) { - switch (dxfer_direction) { + switch

[PATCHv3 6/6] sg: close race condition in sg_remove_sfp_usercontext()

2017-02-03 Thread Hannes Reinecke
sg_remove_sfp_usercontext() is clearing any sg requests, but needs to take 'rq_list_lock' when modifying the list. Reported-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Tested-by: Johannes Thumshirn

[PATCHv3 0/6] sanitize sg

2017-02-03 Thread Hannes Reinecke
Hi all, the infamous syzkaller incovered some more issues in the sg driver. This patchset fixes those two issues (and adds a fix for yet another potential issue; checking for a NULL dxferp when dxfer_len is not 0). It also removes handling of the SET_FORCE_LOW_DMA ioctl, which never worked since

[PATCHv3 1/6] sg: disable SET_FORCE_LOW_DMA

2017-02-03 Thread Hannes Reinecke
The ioctl SET_FORCE_LOW_DMA has never worked since the initial git check-in, and the respective setting is nowadays handled correctly. So disable it entirely. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Tested-by: Johannes Thumshirn

[PATCHv3 5/6] sg: use standard lists for sg_requests

2017-02-03 Thread Hannes Reinecke
'Sg_request' is using a private list implementation; convert it to standard lists. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Tested-by: Johannes Thumshirn --- drivers/scsi/sg.c | 149

[PATCHv3 4/6] sg: check for valid direction before starting the request

2017-02-03 Thread Hannes Reinecke
From: Johannes Thumshirn Check for a valid direction before starting the request, otherwise we risk running into an assertion in the scsi midlayer checking for vaild requests. Signed-off-by: Johannes Thumshirn Link:

[PATCHv3 3/6] sg: protect accesses to 'reserved' page array

2017-02-03 Thread Hannes Reinecke
The 'reserved' page array is used as a short-cut for mapping data, saving us to allocate pages per request. However, the 'reserved' array is only capable of holding one request, so this patch introduces a mutex for protect 'sg_fd' against concurrent accesses. Signed-off-by: Hannes Reinecke

[PATCHv3 2/6] sg: remove 'save_scat_len'

2017-02-03 Thread Hannes Reinecke
Unused. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Tested-by: Johannes Thumshirn --- drivers/scsi/sg.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 55cd641..0b1279d

[PATCHv2 3/6] sg: protect accesses to 'reserved' page array

2017-02-03 Thread Hannes Reinecke
The 'reserved' page array is used as a short-cut for mapping data, saving us to allocate pages per request. However, the 'reserved' array is only capable of holding one request, so this patch introduces a mutex for protect 'sg_fd' against concurrent accesses. Signed-off-by: Hannes Reinecke

[PATCHv2 4/6] sg: check for valid direction before starting the request

2017-02-03 Thread Hannes Reinecke
From: Johannes Thumshirn Check for a valid direction before starting the request, otherwise we risk running into an assertion in the scsi midlayer checking for vaild requests. Signed-off-by: Johannes Thumshirn Link:

[PATCHv2 0/6] sanitize sg

2017-02-03 Thread Hannes Reinecke
Hi all, the infamous syzkaller incovered some more issues in the sg driver. This patchset fixes those two issues (and adds a fix for yet another potential issue; checking for a NULL dxferp when dxfer_len is not 0). It also removes handling of the SET_FORCE_LOW_DMA ioctl, which never worked since

[PATCHv2 2/6] sg: remove 'save_scat_len'

2017-02-03 Thread Hannes Reinecke
Unused. Signed-off-by: Hannes Reinecke --- drivers/scsi/sg.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 55cd641..0b1279d 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -145,7 +145,6 @@ int timeout;

[PATCHv2 5/6] sg: use standard lists for sg_requests

2017-02-03 Thread Hannes Reinecke
'Sg_request' is using a private list implementation; convert it to standard lists. Signed-off-by: Hannes Reinecke --- drivers/scsi/sg.c | 149 +++--- 1 file changed, 62 insertions(+), 87 deletions(-) diff --git a/drivers/scsi/sg.c

[PATCHv2 6/6] sg: close race condition in sg_remove_sfp_usercontext()

2017-02-03 Thread Hannes Reinecke
sg_remove_sfp_usercontext() is clearing any sg requests, but needs to take 'rq_list_lock' when modifying the list. Reported-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/sg.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-)

Re: [PATCHv2 3/6] sg: protect accesses to 'reserved' page array

2017-02-03 Thread Johannes Thumshirn
On 02/03/2017 01:18 PM, Hannes Reinecke wrote: The 'reserved' page array is used as a short-cut for mapping data, saving us to allocate pages per request. However, the 'reserved' array is only capable of holding one request, so this patch introduces a mutex for protect 'sg_fd' against

Re: [PATCHv2 0/6] sanitize sg

2017-02-03 Thread Johannes Thumshirn
On 02/03/2017 01:18 PM, Hannes Reinecke wrote: Hi all, the infamous syzkaller incovered some more issues in the sg driver. This patchset fixes those two issues (and adds a fix for yet another potential issue; checking for a NULL dxferp when dxfer_len is not 0). It also removes handling of the

Re: [PATCHv2 1/6] sg: disable SET_FORCE_LOW_DMA

2017-02-03 Thread Johannes Thumshirn
On 02/03/2017 01:18 PM, Hannes Reinecke wrote: The ioctl SET_FORCE_LOW_DMA has never worked since the initial git check-in, and the respective setting is nowadays handled correctly. So disable it entirely. Signed-off-by: Hannes Reinecke --- Reviewed-by: Johannes Thumshirn

Re: [PATCHv2 2/6] sg: remove 'save_scat_len'

2017-02-03 Thread Johannes Thumshirn
On 02/03/2017 01:18 PM, Hannes Reinecke wrote: Unused. Signed-off-by: Hannes Reinecke --- Reviewed-by: Johannes Thumshirn

Re: [PATCHv2 4/6] sg: check for valid direction before starting the request

2017-02-03 Thread Johannes Thumshirn
On 02/03/2017 01:18 PM, Hannes Reinecke wrote: From: Johannes Thumshirn Check for a valid direction before starting the request, otherwise we risk running into an assertion in the scsi midlayer checking for vaild requests. Signed-off-by: Johannes Thumshirn

Re: [PATCHv3 1/6] sg: disable SET_FORCE_LOW_DMA

2017-02-03 Thread Christoph Hellwig
Looks fine: Reviewed-by: Christoph Hellwig

Re: [PATCHv3 2/6] sg: remove 'save_scat_len'

2017-02-03 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH 1/4] sg: disable SET_FORCE_LOW_DMA

2017-02-03 Thread Hannes Reinecke
On 02/03/2017 10:32 AM, Johannes Thumshirn wrote: > > On 02/03/2017 09:54 AM, Hannes Reinecke wrote: >> The ioctl SET_FORCE_LOW_DMA has never worked since the initial >> git check-in, and the respective setting is nowadays handled >> correctly. >> So disable it entirely. >> >> Signed-off-by:

Re: [PATCH 2/4] sg: protect access to to 'reserved' page array

2017-02-03 Thread Christoph Hellwig
On Fri, Feb 03, 2017 at 09:54:49AM +0100, Hannes Reinecke wrote: > The 'reserved' page array is used as a short-cut for mapping > data, saving us to allocate pages per request. > However, the 'reserved' array is only capable of holding one > request, so we need to protect it against concurrent

Re: [PATCH 4/4] sg: use standard lists for sg_requests

2017-02-03 Thread Hannes Reinecke
On 02/03/2017 11:43 AM, Christoph Hellwig wrote: >> typedef struct sg_request { /* SG_MAX_QUEUE requests outstanding per file */ >> -struct sg_request *nextrp; /* NULL -> tail request (slist) */ >> +struct list_head nextrp;/* list entry */ > > s/nextrp/entry/ > >> @@

Re: [PATCH 3/4] sg: check for valid direction before starting the request

2017-02-03 Thread Hannes Reinecke
On 02/03/2017 11:28 AM, Christoph Hellwig wrote: > On Fri, Feb 03, 2017 at 09:54:50AM +0100, Hannes Reinecke wrote: >> From: Johannes Thumshirn >> >> Check for a valid direction before starting the request, otherwise we risk >> running into an assertion in the scsi midlayer

Re: [PATCH 2/4] sg: protect access to to 'reserved' page array

2017-02-03 Thread Johannes Thumshirn
On 02/03/2017 09:54 AM, Hannes Reinecke wrote: The 'reserved' page array is used as a short-cut for mapping data, saving us to allocate pages per request. However, the 'reserved' array is only capable of holding one request, so we need to protect it against concurrent accesses. Cc:

Re: [PATCH 1/4] sg: disable SET_FORCE_LOW_DMA

2017-02-03 Thread Christoph Hellwig
On Fri, Feb 03, 2017 at 10:32:28AM +0100, Johannes Thumshirn wrote: > I'm not sure if returning a bogus '0' is better here to not break any > existing application, which assumed it always worked. Agreed, this should return 0, and maybe also print a (ratelimited) warning.

Re: [PATCH 3/4] sg: check for valid direction before starting the request

2017-02-03 Thread Christoph Hellwig
On Fri, Feb 03, 2017 at 09:54:50AM +0100, Hannes Reinecke wrote: > From: Johannes Thumshirn > > Check for a valid direction before starting the request, otherwise we risk > running into an assertion in the scsi midlayer checking for vaild requests. Good idea, but.. >

Re: [PATCH 1/4] sg: disable SET_FORCE_LOW_DMA

2017-02-03 Thread Johannes Thumshirn
On 02/03/2017 09:54 AM, Hannes Reinecke wrote: The ioctl SET_FORCE_LOW_DMA has never worked since the initial git check-in, and the respective setting is nowadays handled correctly. So disable it entirely. Signed-off-by: Hannes Reinecke --- [...] case

Re: [PATCH 4/4] sg: use standard lists for sg_requests

2017-02-03 Thread Johannes Thumshirn
On 02/03/2017 09:54 AM, Hannes Reinecke wrote: 'Sg_request' is using a private list implementation; convert it to standard lists. Signed-off-by: Hannes Reinecke --- Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn

Re: [PATCH 2/4] sg: protect access to to 'reserved' page array

2017-02-03 Thread Hannes Reinecke
On 02/03/2017 11:24 AM, Christoph Hellwig wrote: > On Fri, Feb 03, 2017 at 09:54:49AM +0100, Hannes Reinecke wrote: >> The 'reserved' page array is used as a short-cut for mapping >> data, saving us to allocate pages per request. >> However, the 'reserved' array is only capable of holding one >>

Re: [PATCH 4/4] sg: use standard lists for sg_requests

2017-02-03 Thread Christoph Hellwig
> typedef struct sg_request { /* SG_MAX_QUEUE requests outstanding per file */ > - struct sg_request *nextrp; /* NULL -> tail request (slist) */ > + struct list_head nextrp;/* list entry */ s/nextrp/entry/ > @@ -2078,16 +2076,13 @@ static long sg_compat_ioctl(struct file

Re: [REGRESSION v4.10-rc1] blkdev_issue_zeroout() returns -EREMOTEIO on the first call for SCSI device that doesn't support WRITE SAME

2017-02-03 Thread Jens Axboe
On 02/03/2017 12:55 AM, Junichi Nomura wrote: > I found following ext4 error occurs on a certain storage since v4.10-rc1: > EXT4-fs (sdc1): Delayed block allocation failed for inode 12 at logical > offset 100 with max blocks 2 with error 121 > EXT4-fs (sdc1): This should not happen!! Data

Re: [PATCHv3 3/6] sg: protect accesses to 'reserved' page array

2017-02-03 Thread Hannes Reinecke
On 02/03/2017 02:31 PM, Christoph Hellwig wrote: >> -if (sg_res_in_use(sfp)) { >> +mutex_lock(>f_mutex); >> +if (sfp->res_in_use) { >> +mutex_unlock(>f_mutex); >> sg_remove_request(sfp, srp); >>

Re: [PATCHv3 3/6] sg: protect accesses to 'reserved' page array

2017-02-03 Thread Christoph Hellwig
> - if (sg_res_in_use(sfp)) { > + mutex_lock(>f_mutex); > + if (sfp->res_in_use) { > + mutex_unlock(>f_mutex); > sg_remove_request(sfp, srp); > return -EBUSY; /* reserve buffer already being used

Re: [PATCHv2 4/6] sg: check for valid direction before starting the request

2017-02-03 Thread kbuild test robot
Hi Johannes, [auto build test ERROR on scsi/for-next] [also build test ERROR on v4.10-rc6 next-20170203] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Hannes-Reinecke/sanitize-sg/20170203

Re: [REGRESSION v4.10-rc1] blkdev_issue_zeroout() returns -EREMOTEIO on the first call for SCSI device that doesn't support WRITE SAME

2017-02-03 Thread Christoph Hellwig
On Fri, Feb 03, 2017 at 08:21:31AM -0700, Jens Axboe wrote: > > Error 121 (EREMOTEIO) was returned from blkdev_issue_zeroout(). > > That came from sd driver because WRITE SAME was sent to the device > > which didn't support it. > > > > The problem was introduced by commit e73c23ff736e ("block:

Re: [REGRESSION v4.10-rc1] blkdev_issue_zeroout() returns -EREMOTEIO on the first call for SCSI device that doesn't support WRITE SAME

2017-02-03 Thread Jens Axboe
On 02/03/2017 09:12 AM, Christoph Hellwig wrote: > On Fri, Feb 03, 2017 at 08:21:31AM -0700, Jens Axboe wrote: >>> Error 121 (EREMOTEIO) was returned from blkdev_issue_zeroout(). >>> That came from sd driver because WRITE SAME was sent to the device >>> which didn't support it. >>> >>> The problem

Re: [PATCHv3 3/6] sg: protect accesses to 'reserved' page array

2017-02-03 Thread Christoph Hellwig
On Fri, Feb 03, 2017 at 02:38:35PM +0100, Hannes Reinecke wrote: > On 02/03/2017 02:31 PM, Christoph Hellwig wrote: > >> - if (sg_res_in_use(sfp)) { > >> + mutex_lock(>f_mutex); > >> + if (sfp->res_in_use) { > >> + mutex_unlock(>f_mutex); > >>

Re: [PATCH 00/15] qla2xxx: Bug Fixes and updates for target.

2017-02-03 Thread Bart Van Assche
On Thu, 2017-02-02 at 11:42 -0800, Himanshu Madhani wrote: > Please consider this series for inclusion in target-pending. Hello Himanshu, What tree have these patches been generated against? Not all patches can be applied on top of the scsi-target-for-v4.11 branch. Thanks, Bart.