From: "Javier González" <jg@lightnvm.io>
To: linux-block@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, "Javier González" <javier@cnexlabs.com>
Subject: [PATCH] lightnvm: pblk: remove redundant check on read path
Date: Fri, 15 Sep 2017 14:35:50 +0200 [thread overview]
Message-ID: <1505478953-16915-3-git-send-email-javier@cnexlabs.com> (raw)
In-Reply-To: <1505478953-16915-1-git-send-email-javier@cnexlabs.com>
A partial read I/O in pblk is an I/O where some sectors reside in the
write buffer in main memory and some are persisted on the device. Such
an I/O must at least contain 2 lbas, therefore checking for the case
where a single lba is mapped is not necessary.
Signed-off-by: Javier González <javier@cnexlabs.com>
---
drivers/lightnvm/pblk-read.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/lightnvm/pblk-read.c b/drivers/lightnvm/pblk-read.c
index 402f8eff6a2e..71c58503f1a4 100644
--- a/drivers/lightnvm/pblk-read.c
+++ b/drivers/lightnvm/pblk-read.c
@@ -235,7 +235,7 @@ static int pblk_fill_partial_read_bio(struct pblk *pblk, struct nvm_rq *rqd,
rqd->end_io = pblk_end_io_sync;
rqd->private = &wait;
- if (unlikely(nr_secs > 1 && nr_holes == 1)) {
+ if (unlikely(nr_holes == 1)) {
ppa_ptr = rqd->ppa_list;
dma_ppa_list = rqd->dma_ppa_list;
rqd->ppa_addr = rqd->ppa_list[0];
@@ -260,7 +260,7 @@ static int pblk_fill_partial_read_bio(struct pblk *pblk, struct nvm_rq *rqd,
#endif
}
- if (unlikely(nr_secs > 1 && nr_holes == 1)) {
+ if (unlikely(nr_holes == 1)) {
struct ppa_addr ppa;
ppa = rqd->ppa_addr;
--
2.7.4
next prev parent reply other threads:[~2017-09-15 12:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 12:35 [PATCH] lightnvm: pblk: check lba sanity on read path Javier González
2017-09-15 12:35 ` [PATCH] lightnvm: pblk: guarantee line integrity on reads Javier González
2017-09-15 12:35 ` Javier González [this message]
2017-09-15 12:35 ` [PATCH] lightnvm: pblk: remove I/O dependency on write path Javier González
2017-09-15 12:35 ` [PATCH] lightnvm: pblk: enable 1 LUN configuration Javier González
2017-09-15 12:35 ` [PATCH] lightnvm: pblk: ensure right bad block calculation Javier González
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=1505478953-16915-3-git-send-email-javier@cnexlabs.com \
--to=jg@lightnvm.io \
--cc=javier@cnexlabs.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).