diff options
author | Javier González <javier@javigon.com> | 2015-11-16 15:34:47 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-11-16 15:20:41 -0700 |
commit | d09f9581b235a92abbe372531660b468fadabc17 (patch) | |
tree | 14cc6c36c0b48fd1db98ed0eab17f8e853c90ea9 /drivers/lightnvm | |
parent | dad1b00977f9dc8120b48f9711deb4aa6462a3a6 (diff) | |
download | talos-op-linux-d09f9581b235a92abbe372531660b468fadabc17.tar.gz talos-op-linux-d09f9581b235a92abbe372531660b468fadabc17.zip |
lightnvm: cleanup queue before target removal
This prevents outstanding IOs to be sent for completion to target after
the target has been removed. The flow is now: stop new IOs > cleanup
queue > remove target.
Signed-off-by: Javier Gonzalez <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r-- | drivers/lightnvm/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index 790b1d7a8d43..8a556f3f36bb 100644 --- a/drivers/lightnvm/core.c +++ b/drivers/lightnvm/core.c @@ -460,11 +460,11 @@ static void nvm_remove_target(struct nvm_target *t) lockdep_assert_held(&nvm_lock); del_gendisk(tdisk); + blk_cleanup_queue(q); + if (tt->exit) tt->exit(tdisk->private_data); - blk_cleanup_queue(q); - put_disk(tdisk); list_del(&t->list); |