[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181211191627.15542-14-mb@lightnvm.io>
Date: Tue, 11 Dec 2018 20:16:19 +0100
From: Matias Bjørling <mb@...htnvm.io>
To: axboe@...com
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
Javier González <javier@...igon.com>,
Javier González <javier@...xlabs.com>,
Matias Bjørling <mb@...htnvm.io>
Subject: [GIT PULL 13/21] lightnvm: pblk: add comments wrt locking in recovery path
From: Javier González <javier@...igon.com>
pblk's recovery path is single threaded and therefore a number of
assumptions regarding concurrency can be made. To avoid confusion, make
this explicit with a couple of comments in the code.
Signed-off-by: Javier González <javier@...xlabs.com>
Signed-off-by: Matias Bjørling <mb@...htnvm.io>
---
drivers/lightnvm/pblk-core.c | 1 +
drivers/lightnvm/pblk-recovery.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
index 44c5dc046912..f1b411e7c7c9 100644
--- a/drivers/lightnvm/pblk-core.c
+++ b/drivers/lightnvm/pblk-core.c
@@ -1276,6 +1276,7 @@ static int pblk_line_prepare(struct pblk *pblk, struct pblk_line *line)
return 0;
}
+/* Line allocations in the recovery path are always single threaded */
int pblk_line_recov_alloc(struct pblk *pblk, struct pblk_line *line)
{
struct pblk_line_mgmt *l_mg = &pblk->l_mg;
diff --git a/drivers/lightnvm/pblk-recovery.c b/drivers/lightnvm/pblk-recovery.c
index 416d9840544b..4c726506a831 100644
--- a/drivers/lightnvm/pblk-recovery.c
+++ b/drivers/lightnvm/pblk-recovery.c
@@ -13,6 +13,9 @@
* General Public License for more details.
*
* pblk-recovery.c - pblk's recovery path
+ *
+ * The L2P recovery path is single threaded as the L2P table is updated in order
+ * following the line sequence ID.
*/
#include "pblk.h"
--
2.17.1
Powered by blists - more mailing lists