Re: [Open-FCoE] [PATCH] bnx2fc: Improve stats update mechanism

2014-05-30 Thread Eddie Wai
On May 30, 2014, at 7:48 PM, "Neil Horman" wrote: > On Fri, May 30, 2014 at 02:59:43PM -0700, Eddie Wai wrote: >> Thanks for fixing this. The patch generally looks good, but I do have a >> few comments. >> >> On Fri, 2014-05-30 at 11:01 -0400, Neil Horman wrote: >>> Recently had this warning

Re: [Open-FCoE] [PATCH] bnx2fc: Improve stats update mechanism

2014-05-30 Thread Neil Horman
On Fri, May 30, 2014 at 02:59:43PM -0700, Eddie Wai wrote: > Thanks for fixing this. The patch generally looks good, but I do have a > few comments. > > On Fri, 2014-05-30 at 11:01 -0400, Neil Horman wrote: > > Recently had this warning reported: > > > > [ 290.489047] Call Trace: > > [ 290.489

Re: [Open-FCoE] [PATCH] bnx2fc: Improve stats update mechanism

2014-05-30 Thread Eddie Wai
Thanks for fixing this. The patch generally looks good, but I do have a few comments. On Fri, 2014-05-30 at 11:01 -0400, Neil Horman wrote: > Recently had this warning reported: > > [ 290.489047] Call Trace: > [ 290.489053] [] dump_stack+0x19/0x1b > [ 290.489055] [] __might_sleep+0x179/0x23

[RFC 31/32] scsi: fnic: use current_kernel_time() for timestamp

2014-05-30 Thread Arnd Bergmann
The fnic driver currently uses the CURRENT_TIME macro to generate a timestamp. Since this is otherwise used only in file system code and we want to change the type, it's better for this driver to use the equivalent function that continues to return a struct timespec. Signed-off-by: Arnd Bergmann

[RFC 00/32] making inode time stamps y2038 ready

2014-05-30 Thread Arnd Bergmann
Based on the recent discussion about 64-bit time_t for new architectures, and for solving the year 2038 problem in general, I decided to try out what it would take to solve part of the kernel side of things. This is a proof-of-concept work to get us to the point where two system calls (utimes and

[RFC 1/1] drivers/scsi/bfa/bfad_debugfs.c: replace 2 kzalloc/copy_from_user to memdup_user

2014-05-30 Thread Fabian Frederick
(memdup_user can be used to replace kmalloc/copy_from_user. Not sure if it's ok with kzalloc ...) Cc: linux-scsi@vger.kernel.org Cc: Anil Gurumurthy Cc: "James E.J. Bottomley" Signed-off-by: Fabian Frederick --- drivers/scsi/bfa/bfad_debugfs.c | 30 ++ 1 file chang

[PATCH 1/1] drivers/scsi/megaraid/megaraid_sas_base.c: replace kmalloc/copy_from_user by memdup_user

2014-05-30 Thread Fabian Frederick
Cc: Neela Syam Kolli Cc: "James E.J. Bottomley" Signed-off-by: Fabian Frederick --- drivers/scsi/megaraid/megaraid_sas_base.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c in

[PATCH 1/1] drivers/scsi/libsas/sas_scsi_host.c: use PTR_ERR_OR_ZERO

2014-05-30 Thread Fabian Frederick
replace IS_ERR/PTR_ERR Cc: Lukasz Dorau Cc: "James E.J. Bottomley" Signed-off-by: Fabian Frederick --- drivers/scsi/libsas/sas_scsi_host.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 25d

[PATCH 1/1] drivers/scsi/aacraid/commctrl.c: replace kmalloc/copy_from_user by memdup_user

2014-05-30 Thread Fabian Frederick
Cc: "James E.J. Bottomley" Signed-off-by: Fabian Frederick --- drivers/scsi/aacraid/commctrl.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index fbcd48d..3d5d6a6 100644 --- a/drivers/scsi/aacra

[PATCH] bnx2fc: Improve stats update mechanism

2014-05-30 Thread Neil Horman
Recently had this warning reported: [ 290.489047] Call Trace: [ 290.489053] [] dump_stack+0x19/0x1b [ 290.489055] [] __might_sleep+0x179/0x230 [ 290.489057] [] mutex_lock_nested+0x55/0x520 [ 290.489061] [] ? bnx2fc_l2_rcv_thread+0xc5/0x4c0 [bnx2fc] [ 290.489065] [] fc_vport_id_lookup+0x

[PATCH] fc: ensure scan_work isn't active when freeing fc_rport

2014-05-30 Thread Neil Horman
debugfs caught this: WARNING: at lib/debugobjects.c:260 debug_print_object+0x83/0xa0() ODEBUG: free active (active state 0) object type: work_struct hint: fc_scsi_scan_rport+0x0/0xd0 [scsi_transport_fc] CPU: 1 PID: 184 Comm: kworker/1:1 Tainted: GW -- 3.10.0-123.el7.x86_64.de

Re: PATCH: mvsas: add support for Supermicro AOC-SAS2LP-MV8

2014-05-30 Thread Jan Kasprzak
Christoph Hellwig wrote: : On Fri, May 16, 2014 at 02:06:42PM +0200, Jan Kasprzak wrote: : > any news with this patch? Will it be acked by you and submitted upstream? : > Thanks! : : Give me an Acked-by and I'll pull it in. Acked-By: Jan "Yenya" Kasprzak Not sure whether I should ack my own pat

Re: [RFC 0/9] fix for the race issue between scsi timer and in-flight scmd

2014-05-30 Thread liu ping fan
On Fri, May 30, 2014 at 4:26 PM, Paolo Bonzini wrote: > Il 30/05/2014 10:15, Liu Ping Fan ha scritto: > >> When running io stress test on large latency scsi-disk, e.g guest with >> virtscsi >> on a nfs image. It can trigger the BUG_ON(test_bit(REQ_ATOM_COMPLETE, >> &req->atomic_flags)); >> in blk_

Re: [RFC 0/9] fix for the race issue between scsi timer and in-flight scmd

2014-05-30 Thread Paolo Bonzini
Il 30/05/2014 10:15, Liu Ping Fan ha scritto: When running io stress test on large latency scsi-disk, e.g guest with virtscsi on a nfs image. It can trigger the BUG_ON(test_bit(REQ_ATOM_COMPLETE, &req->atomic_flags)); in blk_start_request(). Since there is a race between latency "finishing" scmd

[RFC 5/9] blk: change funcs' prototype to expose the ref of timer

2014-05-30 Thread Liu Ping Fan
req->special is normally referred by both a timer and request_queue. This patch focus on the timer's ref. It changes a group of func's prototype, so the caller can inc/dec ref, in according to add/del a timer. Signed-off-by: Liu Ping Fan --- block/blk-core.c | 49 ++

[RFC 9/9] scsi: ibmvscsi: return SUCCESS_REMOVE when finding a abort cmd

2014-05-30 Thread Liu Ping Fan
When return SUCCESS_REMOVE, it can benifit the ref on scsi_cmnd Signed-off-by: Liu Ping Fan --- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index d0fa4b6..cf78be5 100644 -

[RFC 3/9] scsi: introduce new internal flag SUCCESS_REMOVE

2014-05-30 Thread Liu Ping Fan
Currently when aborting a scsi_cmnd, we can not tell whether this cmd is canceled or has not been found by scsi_try_to_abort_cmd(). So introducing this new flag. (In the succeeding patch, if caller success to cancel the scmd, then it should drop the ref on scmd, otherwise no ops) Signed-off-by: Li

[RFC 7/9] scsi: adopt ref on scsi_cmnd to avoid a race on request

2014-05-30 Thread Liu Ping Fan
When running io stress test on large latency disk, e.g guest with a image on nfs. It can trigger the BUG_ON(test_bit(REQ_ATOM_COMPLETE, &req->atomic_flags)); Since there is a race between latency "finishing" scmd and the re-allocated scmd. I.e a request is still referred by a scmd, but we had tur

[RFC 6/9] blk: split the reclaim of req from blk_finish_request()

2014-05-30 Thread Liu Ping Fan
Later, the low layer (scsi) can decide when to turn back the mem of req by blk_reclaim_request() Signed-off-by: Liu Ping Fan --- block/blk-core.c | 52 +- include/linux/blkdev.h | 6 -- 2 files changed, 39 insertions(+), 19 deletions(-)

[RFC 0/9] fix for the race issue between scsi timer and in-flight scmd

2014-05-30 Thread Liu Ping Fan
When running io stress test on large latency scsi-disk, e.g guest with virtscsi on a nfs image. It can trigger the BUG_ON(test_bit(REQ_ATOM_COMPLETE, &req->atomic_flags)); in blk_start_request(). Since there is a race between latency "finishing" scmd and the re-allocated scmd. I.e a request is st

[RFC 2/9] scsi: ensure request is dequeue when finishing scmd

2014-05-30 Thread Liu Ping Fan
When a timer requeue a request, it clears out REQ_ATOM_COMPLETE bit. Hence if there is an in-flight scmd asks scsi-eh to handle an error by joining the eh_entry list, then when scsi_error_handler() handles a scmd, the scmd->request may be still on request_queue. This will trigger the BUG_ON(!list_

[RFC 8/9] scsi: virtscsi: work around to abort a scmd

2014-05-30 Thread Liu Ping Fan
This patch is just an "eg and test-issue" for this series. The main changes is that when abort a scmd, distinguishing the case of removing from the case of not found. ( I think it should be better to remove the scmd directly from vq, but for the time being, I have no idea about this detail in virti

[RFC 4/9] blk: change the prototype of blk_complete_request()

2014-05-30 Thread Liu Ping Fan
This patch is for the incoming refcnt on scsi_cmnd. It can help the scsi_done handler to run against the abort handler in parallel. In the following patch, if a thread takes the REQ_ATOM_COMPLETE, then it can drop the ref when end of this request. But if it fails to take REQ_ATOM_COMPLETE, it shou

[RFC 1/9] block: make timeout_list protectd by REQ_ATOM_COMPLETE bit

2014-05-30 Thread Liu Ping Fan
The "request->timeout_list" is under the risk of modified by both timeout (abort handler) and a "finishing" handler. Using bit REQ_ATOM_COMPLETE in atomic_flags as a guard to shield this issue. Signed-off-by: Liu Ping Fan --- block/blk-timeout.c | 5 +++-- 1 file changed, 3 insertions(+), 2 dele

[RFC 4/9] blk: change the prototype of blk_complete_request()

2014-05-30 Thread Liu Ping Fan
This patch is for the incoming refcnt on scsi_cmnd. It can help the scsi_done handler to run against the abort handler in parallel. In the following patch, if a thread takes the REQ_ATOM_COMPLETE, then it can drop the ref when end of this request. But if it fails to take REQ_ATOM_COMPLETE, it shou

[PATCH] ncr53c8xx: remove ancient configuration macros

2014-05-30 Thread Paul Bolle
It has not been possible to set CONFIG_SCSI_NCR53C8XX_FORCE_SYNC_NEGO, CONFIG_SCSI_NCR53C8XX_DISABLE_MPARITY_CHECK, and CONFIG_SCSI_NCR53C8XX_DISABLE_PARITY_CHECK through the configuration system since v2.1.20. Remove these ancient macros. To enable (or disable) the functionality they covered one

[PATCH] ncr53c8xx: remove remnants of immediate arbitration

2014-05-30 Thread Paul Bolle
The code for immediate arbitration was removed from (what looks like a predecessor of) the ncr53c8xx code in v2.6.0. Remove its remnants now. Signed-off-by: Paul Bolle --- Untested. Documentation/scsi/ncr53c8xx.txt | 52 drivers/scsi/ncr53c8xx.c

[PATCH] ncr53c8xx: remove remnants of integrity checking

2014-05-30 Thread Paul Bolle
The code for integrity checking was removed in v2.6.10. Remove its remnants now. Signed-off-by: Paul Bolle --- Untested. drivers/scsi/ncr53c8xx.h | 8 1 file changed, 8 deletions(-) diff --git a/drivers/scsi/ncr53c8xx.h b/drivers/scsi/ncr53c8xx.h index 0e008dacf679..736a9df68d58 10064