From: <gregkh@linuxfoundation.org>
To: ww.tao0320@gmail.com, alexander.levin@verizon.com, axboe@fb.com,
gregkh@linuxfoundation.org, m@bjorling.me
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "[PATCH 027/135] lightnvm: fix bio submission issue" has been added to the 4.4-stable tree
Date: Fri, 09 Sep 2016 15:37:56 +0200 [thread overview]
Message-ID: <147342827623957@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
[PATCH 027/135] lightnvm: fix bio submission issue
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
0027-lightnvm-fix-bio-submission-issue.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 8419ef00ea07eaaca57b21fae9f10b79a70fe7b4 Mon Sep 17 00:00:00 2001
From: Wenwei Tao <ww.tao0320@gmail.com>
Date: Tue, 12 Jan 2016 07:49:15 +0100
Subject: [PATCH 027/135] lightnvm: fix bio submission issue
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ Upstream commit 3cd485b1f8e25a6534eb4c542e7eba1b944fbaaf ]
Put bio when submission fails, since we get it
before submission. And return error when backend
device driver doesn't provide a submit_io method,
thus we can end IO properly.
Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/lightnvm/gennvm.c | 2 +-
drivers/lightnvm/rrpc.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/lightnvm/gennvm.c
+++ b/drivers/lightnvm/gennvm.c
@@ -345,7 +345,7 @@ static void gennvm_generic_to_addr_mode(
static int gennvm_submit_io(struct nvm_dev *dev, struct nvm_rq *rqd)
{
if (!dev->ops->submit_io)
- return 0;
+ return -ENODEV;
/* Convert address space */
gennvm_generic_to_addr_mode(dev, rqd);
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -650,11 +650,12 @@ static int rrpc_end_io(struct nvm_rq *rq
if (bio_data_dir(rqd->bio) == WRITE)
rrpc_end_io_write(rrpc, rrqd, laddr, npages);
+ bio_put(rqd->bio);
+
if (rrqd->flags & NVM_IOTYPE_GC)
return 0;
rrpc_unlock_rq(rrpc, rqd);
- bio_put(rqd->bio);
if (npages > 1)
nvm_dev_dma_free(rrpc->dev, rqd->ppa_list, rqd->dma_ppa_list);
@@ -841,6 +842,7 @@ static int rrpc_submit_io(struct rrpc *r
err = nvm_submit_io(rrpc->dev, rqd);
if (err) {
pr_err("rrpc: I/O submission failed: %d\n", err);
+ bio_put(bio);
return NVM_IO_ERR;
}
Patches currently in stable-queue which might be from ww.tao0320@gmail.com are
queue-4.4/0030-lightnvm-unlock-rq-and-free-ppa_list-on-submission-f.patch
queue-4.4/0033-NVMe-fix-build-with-CONFIG_NVM-enabled.patch
queue-4.4/0031-lightnvm-fix-locking-and-mempool-in-rrpc_lun_gc.patch
queue-4.4/0027-lightnvm-fix-bio-submission-issue.patch
reply other threads:[~2016-09-09 13:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=147342827623957@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alexander.levin@verizon.com \
--cc=axboe@fb.com \
--cc=m@bjorling.me \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=ww.tao0320@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.