All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Konopko <igor.j.konopko@intel.com>
To: mb@lightnvm.io, javier@javigon.com, hans.holmberg@cnexlabs.com
Cc: linux-block@vger.kernel.org, igor.j.konopko@intel.com
Subject: [PATCH v3 06/10] lightnvm: pblk: remove internal IO timeout
Date: Wed, 27 Mar 2019 13:38:57 +0100	[thread overview]
Message-ID: <20190327123901.12323-7-igor.j.konopko@intel.com> (raw)
In-Reply-To: <20190327123901.12323-1-igor.j.konopko@intel.com>

Currently during pblk padding, there is internal IO timeout introduced,
which is smaller than default NVMe timeout. This can lead to various
use-after-free issues. Since in case of any IO timeouts NVMe and block
layer will handle timeout by themselves and report it back to use,
there is no need to keep this internal timeout in pblk.

Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
---
 drivers/lightnvm/pblk-recovery.c | 7 +------
 drivers/lightnvm/pblk.h          | 2 --
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/lightnvm/pblk-recovery.c b/drivers/lightnvm/pblk-recovery.c
index 6765d7c..a9085b0 100644
--- a/drivers/lightnvm/pblk-recovery.c
+++ b/drivers/lightnvm/pblk-recovery.c
@@ -290,12 +290,7 @@ static int pblk_recov_pad_line(struct pblk *pblk, struct pblk_line *line,
 
 fail_complete:
 	kref_put(&pad_rq->ref, pblk_recov_complete);
-
-	if (!wait_for_completion_io_timeout(&pad_rq->wait,
-				msecs_to_jiffies(PBLK_COMMAND_TIMEOUT_MS))) {
-		pblk_err(pblk, "pad write timed out\n");
-		ret = -ETIME;
-	}
+	wait_for_completion(&pad_rq->wait);
 
 	if (!pblk_line_is_full(line))
 		pblk_err(pblk, "corrupted padded line: %d\n", line->id);
diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h
index e284a93..3a84c8a 100644
--- a/drivers/lightnvm/pblk.h
+++ b/drivers/lightnvm/pblk.h
@@ -43,8 +43,6 @@
 
 #define PBLK_CACHE_NAME_LEN (DISK_NAME_LEN + 16)
 
-#define PBLK_COMMAND_TIMEOUT_MS 30000
-
 /* Max 512 LUNs per device */
 #define PBLK_MAX_LUNS_BITMAP (4)
 
-- 
2.9.5


  parent reply	other threads:[~2019-03-27 12:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-27 12:38 [PATCH v3 00/10] lightnvm: next set of improvements for 5.2 Igor Konopko
2019-03-27 12:38 ` [PATCH v3 01/10] lightnvm: pblk: IO path reorganization Igor Konopko
2019-03-27 12:38 ` [PATCH v3 02/10] lightnvm: pblk: simplify partial read path Igor Konopko
2019-03-29  9:12   ` Hans Holmberg
2019-03-30  5:02     ` Heiner Litz
2019-04-01 15:29       ` Igor Konopko
2019-03-27 12:38 ` [PATCH v3 03/10] lightnvm: pblk: propagate errors when reading meta Igor Konopko
2019-03-27 20:25   ` Matias Bjørling
2019-03-27 12:38 ` [PATCH v3 04/10] lightnvm: pblk: recover only written metadata Igor Konopko
2019-03-27 12:38 ` [PATCH v3 05/10] lightnvm: pblk: wait for inflight IOs in recovery Igor Konopko
2019-03-27 12:38 ` Igor Konopko [this message]
2019-03-27 12:38 ` [PATCH v3 07/10] lightnvm: pblk: store multiple copies of smeta Igor Konopko
2019-03-27 12:38 ` [PATCH v3 08/10] lightnvm: pblk: GC error handling Igor Konopko
2019-03-27 12:39 ` [PATCH v3 09/10] lightnvm: pblk: use nvm_rq_to_ppa_list() Igor Konopko
2019-03-27 12:39 ` [PATCH v3 10/10] lightnvm: track inflight target creations Igor Konopko
2019-04-05 13:48   ` Matias Bjørling
2019-04-03  7:12 ` [PATCH v3 00/10] lightnvm: next set of improvements for 5.2 Hans Holmberg
2019-04-05  6:31   ` Igor Konopko
2019-04-05 13:40 ` Matias Bjørling

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=20190327123901.12323-7-igor.j.konopko@intel.com \
    --to=igor.j.konopko@intel.com \
    --cc=hans.holmberg@cnexlabs.com \
    --cc=javier@javigon.com \
    --cc=linux-block@vger.kernel.org \
    --cc=mb@lightnvm.io \
    /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.