printk_ratelimited() will lose the messages printked by sdev_printk(),
maybe we should remove all printk_ratelimit() in scsi layer next time
by rewriting sdev_printk().
Signed-off-by: Wei Fang
---
drivers/scsi/scsi_lib.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a
respects the blocked flag and once in
scsi_sysfs_add_sdev() which doesn't. Since the second set is entirely
spurious, simply remove it to fix the problem.
Reported-by: Zengxi Chen
Signed-off-by: Wei Fang
Reviewed-by: Ewan D. Milne
---
Changes v1->v2:
- don't modify scsi_internal_d
Hi, James, Ewan,
On 2016/12/13 0:43, James Bottomley wrote:
> On Mon, 2016-12-12 at 11:23 -0500, Ewan D. Milne wrote:
>> On Mon, 2016-12-12 at 10:20 +0800, Wei Fang wrote:
>>> A race between scanning and fc_remote_port_delete() may result in a
>>> permanent stop if the
respects the blocked flag and once in
scsi_sysfs_add_sdev() which doesn't. Since the second set is entirely
spurious, simply remove it to fix the problem.
Reported-by: Zengxi Chen
Signed-off-by: Wei Fang
---
Changes v1->v2:
- don't modify scsi_internal_device_unblock(), just re
Hi, James,
On 2016/12/10 0:02, James Bottomley wrote:
> On Fri, 2016-12-09 at 17:35 +0800, Wei Fang wrote:
>> A scan work can run simultaneously with fc_remote_port_delete().
>> If a scsi device is added to the ->__devices list in the scan work,
>> it can be touche
v().
Reported-and-tested-by: Zengxi Chen
Signed-off-by: Wei Fang
---
Changes v1->v2:
- don't modify scsi_internal_device_unblock(), just remove changing
state to SDEV_RUNNING in scsi_sysfs_add_sdev(), suggested by
James Bottomley and Ewan D. Milne.
drivers/scsi/scsi_sysfs.c | 4
On 2016/12/8 23:39, James Bottomley wrote:
> On Thu, 2016-12-08 at 11:22 +0800, Wei Fang wrote:
>> Hi, James, Ewan,
>>
>> On 2016/12/8 10:33, James Bottomley wrote:
>>> On Thu, 2016-12-08 at 10:28 +0800, Wei Fang wrote:
>>>> Hi, James, Ewan,
>>
Hi, James, Ewan, Bart,
On 2016/12/8 11:22, Wei Fang wrote:
> I looked through those code and found that if we fix this bug
> by removing setting the state in scsi_sysfs_add_sdev(), it
> can't be fixed completely:
>
> scsi_device_set_state(sdev, SDEV_RUNNING) i
Hi, James, Ewan,
On 2016/12/8 10:33, James Bottomley wrote:
> On Thu, 2016-12-08 at 10:28 +0800, Wei Fang wrote:
>> Hi, James, Ewan,
>>
>> On 2016/12/8 7:43, James Bottomley wrote:
>>> On Wed, 2016-12-07 at 15:30 -0500, Ewan D. Milne wrote:
>>>> On Wed,
Hi, James, Ewan,
On 2016/12/8 7:43, James Bottomley wrote:
> On Wed, 2016-12-07 at 15:30 -0500, Ewan D. Milne wrote:
>> On Wed, 2016-12-07 at 12:09 -0800, James Bottomley wrote:
>>> Hm, it looks like the state set in scsi_sysfs_add_sdev() is bogus.
>>> We expect the state to have been properly s
Hi, Bart,
On 2016/12/7 12:40, Bart Van Assche wrote:
> I am aware that commit 5c10e63c943b caused the behavior change. But that
> doesn't mean that a fix has to undo the changes introduced by that
> commit. We do not only want to make sure that the SCSI core works as
> intended but also that th
Hi, Bart,
On 2016/12/7 10:45, Bart Van Assche wrote:
> On 12/06/16 17:21, Wei Fang wrote:
>> The state of the scsi device first is changed to SDEV_BLOCK in
>> scsi_add_lun() as you mentioned, then it will be changed to SDEV_RUNNING
>> in scsi_sysfs_add_sdev().
>
> Hel
Hi, Bart,
On 2016/12/6 23:51, Bart Van Assche wrote:
> On 12/06/16 01:12, Wei Fang wrote:
>> The scsi device is being setted to the SDEV_RUNNING state at the end of
>> the scan work. When the remote port reappears, scsi_target_unblock()
>> will be called, but the QUEUE_FLAG_
restarting the device queue if the state is SDEV_RUNNING.
Reported-by: Zengxi Chen
Signed-off-by: Wei Fang
---
drivers/scsi/scsi_lib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 9ca1f17..253ee74 100644
--- a/d
his flag will not be cleared when the scsi device
is being setted to the SDEV_RUNNING state in the end of the scan work.
After that, all the requests sending to the device will be blocked.
Fix this by flushing the scan work before blocking the device.
Reported-by: Zengxi Chen
Signed-off-by:
ead+0xfc/0x110
After that, the host is in recovery state, and any IOs to this
host will be blocked.
Fix this by accessing ->host_eh_schedule and ->shost_state in
->host_lock. We have tested the IOPS throughput by fio and found
no performance degradation.
Signed-off-by: Wei Fang
---
driver
overy state, and any IOs to this
host will be blocked.
Fix this by accessing ->host_eh_schedule and ->shost_state in
->host_lock.
Signed-off-by: Wei Fang
---
drivers/scsi/scsi_lib.c | 22 ++
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/drivers/scsi
/0x438
[] worker_thread+0x144/0x4b0
[] kthread+0xfc/0x110
Fix this by reassigning NULL to ->lldd_task in error path.
Signed-off-by: Wei Fang
---
drivers/scsi/libsas/sas_ata.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_at
Hi, Hannes,
> This is most definitely wrong.
> Sure you mean
>
> qc->lldd_task = NULL;
>
> in that line?
My mistake. Thanks for pointing me out. Will resend soon.
Please ignore this patch.
Thanks,
Wei
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a me
/0x438
[] worker_thread+0x144/0x4b0
[] kthread+0xfc/0x110
Fix this by reassigning NULL to ->lldd_task in error path.
Signed-off-by: Wei Fang
---
drivers/scsi/libsas/sas_ata.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_at
Update the new concurrency rules of ->host_failed.
Signed-off-by: Wei Fang
---
Documentation/scsi/scsi_eh.txt |8 ++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/scsi/scsi_eh.txt b/Documentation/scsi/scsi_eh.txt
index 8638f61..37eca00 100644
--
le, just
remove the decrement in scsi_eh_finish_cmd() and zero ->host_busy
after the strategy handle to fix this race.
This fixes the problem introduced in
commit 50824d6c5657 ("[SCSI] libsas: async ata-eh").
Reviewed-by: James Bottomley
Signed-off-by: Wei Fang
---
Changes v1->v2:
- up
On 2016/6/7 11:22, Martin K. Petersen wrote:
>>>>>> "Wei" == Wei Fang writes:
>
> Wei,
>
> Wei> Update the new rules of ->host_failed.
>
> Are you going to incorporate the amendment from James?
>
Yes, I'll send the patch soon.
Update the new rules of ->host_failed.
Signed-off-by: Wei Fang
---
Documentation/scsi/scsi_eh.txt |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Documentation/scsi/scsi_eh.txt b/Documentation/scsi/scsi_eh.txt
index 8638f61..9702c78 100644
--- a/Documentation/s
Forgot to add changes, please ignore it.
On 2016/6/2 15:54, Wei Fang wrote:
> sas_ata_strategy_handler() adds the works of the ata error handler
> to system_unbound_wq. This workqueue asynchronously runs work items,
> so the ata error handler will be performed concurrently on different
&
le, just
remove the decrement in scsi_eh_finish_cmd() and zero ->host_busy
after the strategy handle to fix this race.
This fixes the problem introduced in
commit 50824d6c5657 ("[SCSI] libsas: async ata-eh").
Signed-off-by: Wei Fang
---
Changes v1->v2:
- update Documentation/scsi/scsi_eh
le, just
remove the decrement in scsi_eh_finish_cmd() and zero ->host_busy
after the strategy handle to fix this race.
This fixes the problem introduced in
commit 50824d6c5657 ("[SCSI] libsas: async ata-eh").
Signed-off-by: Wei Fang
---
drivers/ata/libata-eh.c |2 +-
drivers/scsi/s
Update the new rules of ->host_failed.
Signed-off-by: Wei Fang
---
Documentation/scsi/scsi_eh.txt |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Documentation/scsi/scsi_eh.txt b/Documentation/scsi/scsi_eh.txt
index 8638f61..9702c78 100644
--- a/Documentation/s
On 2016/6/2 10:37, Wei Fang wrote:
> Hi, Kevin,
>
> On 2016/6/1 22:36, Kevin Groeneveld wrote:
>>> Subject: [PATCH v2 1/2] scsi: fix race between simultaneous decrements of
>>> ->host_failed
>>
>> I wonder if this could be related to
>> http:
Hi, Kevin,
On 2016/6/1 22:36, Kevin Groeneveld wrote:
>> Subject: [PATCH v2 1/2] scsi: fix race between simultaneous decrements of
>> ->host_failed
>
> I wonder if this could be related to
> http://www.spinics.net/lists/linux-scsi/msg86808.html?
>
> I never did get to the bottom of that. If I
Hi, James,
On 2016/6/1 22:06, James Bottomley wrote:
> On Tue, 2016-05-31 at 16:38 +0800, Wei Fang wrote:
>> sas_ata_strategy_handler() adds the works of the ata error handler
>> to system_unbound_wq. This workqueue asynchronously runs work items,
>> so the ata error hand
Hi, Tejun,
On 2016/5/31 22:33, Tejun Heo wrote:
> On Tue, May 31, 2016 at 04:38:17PM +0800, Wei Fang wrote:
>> sas_ata_strategy_handler() adds the works of the ata error handler
>> to system_unbound_wq. This workqueue asynchronously runs work items,
>
> Are there more th
This fixes the problem introduced in
commit 50824d6c5657 ("[SCSI] libsas: async ata-eh").
Reviewed-by: Christoph Hellwig
Signed-off-by: Wei Fang
---
drivers/ata/libata-eh.c |2 +-
drivers/scsi/libsas/sas_scsi_host.c |5 +++--
drivers/scsi/scsi.c |
Update the new concurrency rules of ->host_failed.
Signed-off-by: Wei Fang
---
Documentation/scsi/scsi_eh.txt |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/scsi/scsi_eh.txt b/Documentation/scsi/scsi_eh.txt
index 8638f61..e6d0de2 100644
--
Hi, Christoph,
On 2016/5/29 14:54, Christoph Hellwig wrote:
> On Sat, May 28, 2016 at 11:51:11AM +0800, Wei Fang wrote:
>> async_sas_ata_eh(), which will call scsi_eh_finish_cmd() in some case,
>> would be performed simultaneously in sas_ata_strategy_handler(). In this
>> ca
Hi James, Christoph,
On 2016/5/29 23:41, James Bottomley wrote:
> On Sat, 2016-05-28 at 23:54 -0700, Christoph Hellwig wrote:
>> On Sat, May 28, 2016 at 11:51:11AM +0800, Wei Fang wrote:
>>> async_sas_ata_eh(), which will call scsi_eh_finish_cmd() in some
>>&g
ual between ->host_failed and
->host_busy. Then SCSI error handler thread won't become running,
SCSI errors after that won't be handled forever.
Use atomic type for ->host_failed to fix this race.
Signed-off-by: Wei Fang
---
drivers/ata/libata-eh.c |2 +
Hi John,
On 2015/11/10 0:32, John Garry wrote:
> This patch also includes relevant memory/pool
> free'ing and sas/scsi host removal
>
> Signed-off-by: John Garry
> ---
> drivers/scsi/hisi_sas/hisi_sas_main.c | 71
> ++-
> 1 file changed, 70 insertions(+), 1 dele
38 matches
Mail list logo