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 1/3] lightnvm: pblk: delete writer kick timer before stopping thread
Date: Wed, 21 Feb 2018 09:02:59 +0100 [thread overview]
Message-ID: <1519200181-10886-2-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>
Unless we delete the timer that wakes up the write thread
before we stop the thread we risk re-starting the thread, so
delete the timer first.
Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
---
drivers/lightnvm/pblk-init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
index a2b54a8..862ac4e 100644
--- a/drivers/lightnvm/pblk-init.c
+++ b/drivers/lightnvm/pblk-init.c
@@ -923,9 +923,9 @@ static void pblk_writer_stop(struct pblk *pblk)
WARN(pblk_rb_sync_count(&pblk->rwb),
"Stopping not fully synced write buffer\n");
+ del_timer_sync(&pblk->wtimer);
if (pblk->writer_ts)
kthread_stop(pblk->writer_ts);
- del_timer(&pblk->wtimer);
}
static void pblk_free(struct pblk *pblk)
--
2.7.4
next prev parent reply other threads:[~2018-02-21 8:07 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 ` hans.ml.holmberg [this message]
2018-02-21 8:03 ` [PATCH 2/3] lightnvm: pblk: allow allocation of new lines during shutdown hans.ml.holmberg
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-2-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®