suggestion, just set cq_vector to -1 if io queue setup
fails.
- Change patch name and comment
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 4a7c420.
Currently, we will unquiesce the queues after the controller is
shutdown to avoid residual requests to be stuck. In fact, we can
do it more cleanly, just wait freeze and drain them before
nvme_dev_disable return.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 18
d kill the
controller)
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 192 +++-
1 file changed, 157 insertions(+), 35 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index f3e0eae..a0ff18e 100644
--- a/drivers
Quiesce IO queues prior to disabling device HMB accesses. A controller
using HMB may relay on it to efficiently complete IO commands.
Reviewed-by: Keith Busch
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a
nvme_remove_namespaces and nvme_remove_invalid_namespaces reference
the ctrl->namespaces list w/o holding namespaces_mutext. It is ok
to invoke nvme_ns_remove there, but what if there is others.
To be safer, reference the ctrl->namespaces list under
namespaces_mutext.
Signed-off-by: Ji
No functional change, just make blk_mq_rq_update_aborted_gstate a
external interface.
Signed-off-by: Jianchao Wang
---
block/blk-mq.c | 3 ++-
include/linux/blk-mq.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 01f271d
.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/core.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index bc05bc4..7425124 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1117,14
nvme_dev_disable, then handle the
outstanding requests. This will race with the request timeout path.
To fix it, just use wait_for_completion instead of the timeout one.
The request timeout path will wakeup it.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 6 +-
1 file changed, 1
namespaces_mutext is used to synchronize the operations on ctrl
namespaces list. Most of the time, it is a read operation. It is
better to change it from mutex to rwsem.
On the other hand, the namespaces mutex could introduce circular
dependency easily.
Signed-off-by: Jianchao Wang
---
drivers
troduced. It let nvme_delete_io_queues can
only be wakeup by completion path.
This patchset was tested under debug patch for some days.
And some bugfix have been done.
The patches are available in following it branch:
https://github.com/jianchwa/linux-blcok.git nvme_fixes_V3_plus_rwsem
Jianchao Wang (9)
0
ine_queues.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 41 ++---
1 file changed, 26 insertions(+), 15 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 00cffed..c5c1365 100644
--- a/drivers/nvme/host/pci.c
+++ b/dr
with kick_requeue_list == true.
Cc: Christoph Hellwig
Signed-off-by: Jianchao Wang
---
drivers/scsi/scsi_lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index a86df9c..06d8110 100644
--- a/drivers/scsi/scsi_lib.c
+++ b
No functional changes. Just fix two wrong indentation cases in
scsi_finish_command and scsi_decide_disposition.
Signed-off-by: Jianchao Wang
---
drivers/scsi/scsi.c | 2 +-
drivers/scsi/scsi_error.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/scsi.c
nvme_dev_disable, then handle the
outstanding requests. This will race with the request timeout path.
To fix it, just use wait_for_completion instead of the timeout one.
The request timeout path will wakeup it.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 6 +-
1 file changed, 1
path.
6th fixes a bug found when test, it is not related with 4th patch.
This patchset was tested under debug patch for some days.
And some bugfix have been done.
The debug patch and other patches are available in following it branch:
https://github.com/jianchwa/linux-blcok.git nvme_fixes_test
Jia
he error.
With this patch, we could avoid nvme_dev_disable to be invoked
by nvme_timeout and eliminate the race between nvme_timeout and
nvme_dev_disable on outstanding requests.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 146
Move clearing host mem behind stopping queues. Prepare for
following patch which will grab all the outstanding requests.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme
ine_queues.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 31 ---
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index a838713c..e37f209 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/
controller has been shutdown.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 36
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 00cffed..a7fa397 100644
--- a/drivers/nvme/host/pci.c
No functional change, just make blk_mq_rq_update_aborted_gstate a
external interface.
Signed-off-by: Jianchao Wang
---
block/blk-mq.c | 3 ++-
include/linux/blk-mq.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 01f271d
controller has been shutdown.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 36
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 00cffed..a7fa397 100644
--- a/drivers/nvme/host/pci.c
he error.
With this patch, we could avoid nvme_dev_disable to be invoked
by nvme_timeout and eliminate the race between nvme_timeout and
nvme_dev_disable on outstanding requests.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 146
path.
6th fixes a bug found when test, it is not related with 4th patch.
This patchset was tested under debug patch for some days.
And some bugfix have been done.
The debug patch and other patches are available in following it branch:
https://github.com/jianchwa/linux-blcok.git nvme_fixes_test
Jia
ine_queues.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 31 ---
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index a838713c..e37f209 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/
Move clearing host mem behind stopping queues. Prepare for
following patch which will grab all the outstanding requests.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme
No functional change, just make blk_mq_rq_update_aborted_gstate a
external interface.
Signed-off-by: Jianchao Wang
---
block/blk-mq.c | 3 ++-
include/linux/blk-mq.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 01f271d
nvme_dev_disable, then handle the
outstanding requests. This will race with the request timeout path.
To fix it, just use wait_for_completion instead of the timeout one.
The request timeout path will wakeup it.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 6 +-
1 file changed, 1
one.
The patches are available in following it branch:
https://github.com/jianchwa/linux-blcok.git nvme_fixes_V2
Jianchao Wang (6)
0001-nvme-pci-quiesce-IO-queues-prior-to-disabling-device.patch
0002-nvme-pci-fix-the-freeze-and-quiesce-for-shutdown-and.patch
0003-blk-mq-make-blk_mq_rq_update_aborted_
controller has been shutdown.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 36
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 00cffed..a7fa397 100644
--- a/drivers/nvme/host/pci.c
nvme_dev_disable, then handle the
outstanding requests. This will race with the request timeout path.
To fix it, just use wait_for_completion instead of the timeout one.
The request timeout path will wakeup it.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 6 +-
1 file changed, 1
CELLED and
return BLK_EH_HANDLED. nvme_dev_disable/nvme_reset_work will
see the error.
With this patch, we could avoid nvme_dev_disable to be invoked
by nvme_timeout and implementat synchronization between them.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/p
ine_queues.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 30 +++---
1 file changed, 19 insertions(+), 11 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index a7fa397..117b837 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/
No functional change, just make blk_mq_rq_update_aborted_gstate a
external interface.
Signed-off-by: Jianchao Wang
---
block/blk-mq.c | 3 ++-
include/linux/blk-mq.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 01f271d
Quiesce IO queues prior to disabling device HMB accesses. A controller
using HMB may relay on it to efficiently complete IO commands.
Reviewed-by: Keith Busch
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a
.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/core.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index d05855b..a051c2f 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1119,14 +1119,19
, circular dependency could be
introduced easily. For example:
context A context B
nvme_xxx nvme_xxx
hold namespaces_mutext require namespaces_mutext
sync context B
So it is better to change it from mutex to rwsem.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host
Currently, we will unquiesce the queues after the controller is
shutdown to avoid residual requests to be stuck. In fact, we can
do it more cleanly, just wait freeze and drain the queue in
nvme_dev_disable and finally leave the queues quiesced.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host
Quiesce IO queues prior to disabling device HMB accesses. A controller
using HMB may relay on it to efficiently complete IO commands.
Reviewed-by: Keith Busch
Reviewed-by: Sagi Grimberg
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 9 -
1 file changed, 4 insertions(+), 5
nvme_remove_namespaces and nvme_remove_invalid_namespaces reference
the ctrl->namespaces list w/o holding namespaces_mutext. It is ok
to invoke nvme_ns_remove there, but what if there is others.
To be safer, reference the ctrl->namespaces list under
namespaces_mutext.
Signed-off-by: Ji
ine_queues.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 41 ++---
1 file changed, 26 insertions(+), 15 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 0cba8d8..2106681 100644
--- a/drivers/nvme/host/pci.c
+++ b/dr
ine_queues.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 41 ++---
1 file changed, 26 insertions(+), 15 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 6e5d2ca..9b3cc2c 100644
--- a/drivers/nvme/host/pci.c
+++ b/dr
vectors for adminq and
ioq0, and not set irq affinity for adminq one.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 73036d2..7f421b7 100644
--- a/drivers
ctrl.tagset maybe NULL due to failure of io queue setup or blk-mq
tagset allocation in nvme_reset_work. Then panic would come up.
To fix this, just add ctrl.tagset check in nvme_scan_work.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1
: Jianchao Wang
---
drivers/nvme/host/pci.c | 26 +-
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index f5800c3..6e58de1 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -99,6 +99,9 @@ struct
No fucntional change. Add nvme_pci_pre_init to package the nvme
specified initialization work before configuring admin queue.
Then nvme_pci_enable and nvme_pci_configure_admin_queue could be
clearer.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 145
No functional change. Just change name of functions corresponding
to setup adminq to make it more readable.
nvme_pci_configure_admin_queue -> nvme_pci_setup_adminq
nvme_alloc_admin_tags -> nvme_pci_start_adminq
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 8 -
identify information. Then nvme_pci_enable,
nvme_pci_configure_admin_queue and nvme_reset_work could be clearer.
Change functions' name, nvme_pci_configure_admin_queue and
nvme_alloc_admin_tags to nvme_pci_setup_adminq and
nvme_pci_start_adminq to make it more readable.
Jianchao Wang (3)
0001-nvm
No functional change. Add new interface nvme_pci_post_init to get
in the nvme sepcific initialization work after identify.
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/pci.c | 58 +
1 file changed, 34 insertions(+), 24 deletions(-)
diff
_LIVE.
- Change patch name and comment.
Suggested-by: Sagi Grimberg
Signed-off-by: Jianchao Wang
---
drivers/nvme/host/core.c | 20 +---
drivers/nvme/host/nvme.h | 1 +
drivers/nvme/host/pci.c | 31 ++-
3 files changed, 40 insertions(+), 12 dele
requeued
in the failure branch of queue_rq callback and it is just needed
there.
Signed-off-by: Jianchao Wang
---
block/blk-mq.c | 19 +--
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 4603b11..19f848e 100644
--- a/block/blk-mq.c
If the bio_integrity_merge_rq() return false or nr_phys_segments exceeds
the max_segments, the merging fails, but the bi_front/back_seg_size may
have been modified. To avoid it, move the sanity checking ahead.
Signed-off-by: Jianchao Wang
---
block/blk-merge.c | 16 ++--
1 file
structure.
Signed-off-by: Jianchao Wang
---
block/blk-merge.c | 98 ---
1 file changed, 64 insertions(+), 34 deletions(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 14b6e37..b2f54fd 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
of segments merging check in
ll_front/back_merge_fn() together into ll_new_hw_segment().
Change since v1:
Add more comment to elaborate how this issue found and result after
apply the patch.
Signed-off-by: Jianchao Wang
---
block/blk-merge.c | 49
ll_new_hw_segment().
Change since v1:
Add more comment to elaborate how this issue found and result after
apply the patch.
Signed-off-by: Jianchao Wang
---
block/blk-merge.c | 49 +++--
1 file changed, 35 insertions(+), 14 deletions(-)
diff --git a/block/blk
this issue found and result after
apply the patch.
Signed-off-by: Jianchao Wang
---
block/blk-merge.c | 98 ---
1 file changed, 64 insertions(+), 34 deletions(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 14b6e37..b2f54fd 100644
this issue found and result after
apply the patch.
Signed-off-by: Jianchao Wang
---
block/blk-merge.c | 98 ---
1 file changed, 64 insertions(+), 34 deletions(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 14b6e37..b2f54fd 100644
101 - 156 of 156 matches
Mail list logo