mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: hans.ml.holmberg@owltronix.com
To: "Matias Bjørling" <mb@lightnvm.io>
Cc: "Javier González" <jg@lightnvm.io>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Hans Holmberg" <hans.holmberg@cnexlabs.com>
Subject: [PATCH 2/3] lightnvm: pblk: allow allocation of new lines during shutdown
Date: Wed, 21 Feb 2018 09:03:00 +0100	[thread overview]
Message-ID: <1519200181-10886-3-git-send-email-hans.ml.holmberg@owltronix.com> (raw)
In-Reply-To: <1519200181-10886-1-git-send-email-hans.ml.holmberg@owltronix.com>

From: Hans Holmberg <hans.holmberg@cnexlabs.com>

When shutting down pblk the write buffer is flushed and if the
current line can't fit the data in the write buffer we need
to allocate a new line, so remove the check that prevents this.

Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
---
 drivers/lightnvm/pblk-core.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
index 22e61cd..8848443 100644
--- a/drivers/lightnvm/pblk-core.c
+++ b/drivers/lightnvm/pblk-core.c
@@ -1407,13 +1407,6 @@ struct pblk_line *pblk_line_replace_data(struct pblk *pblk)
 	l_mg->data_line = new;
 
 	spin_lock(&l_mg->free_lock);
-	if (pblk->state != PBLK_STATE_RUNNING) {
-		l_mg->data_line = NULL;
-		l_mg->data_next = NULL;
-		spin_unlock(&l_mg->free_lock);
-		goto out;
-	}
-
 	pblk_line_setup_metadata(new, l_mg, &pblk->lm);
 	spin_unlock(&l_mg->free_lock);
 
-- 
2.7.4

  parent reply	other threads:[~2018-02-21  8:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21  8:02 [PATCH 0/3] pblk bugfixes hans.ml.holmberg
2018-02-21  8:02 ` [PATCH 1/3] lightnvm: pblk: delete writer kick timer before stopping thread hans.ml.holmberg
2018-02-21  8:03 ` hans.ml.holmberg [this message]
2018-02-21  8:03 ` [PATCH 3/3] lightnvm: pblk: prevent race in pblk_rb_flush_point_set hans.ml.holmberg
2018-02-21  8:09 ` [PATCH 0/3] pblk bugfixes Matias Bjørling
2018-02-21  8:12   ` 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=1519200181-10886-3-git-send-email-hans.ml.holmberg@owltronix.com \
    --to=hans.ml.holmberg@owltronix.com \
    --cc=hans.holmberg@cnexlabs.com \
    --cc=jg@lightnvm.io \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®