<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/lightnvm, branch v5.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-04-10T18:17:01Z</updated>
<entry>
<title>lightnvm: pblk: fix crash in pblk_end_partial_read due to multipage bvecs</title>
<updated>2019-04-10T18:17:01Z</updated>
<author>
<name>Hans Holmberg</name>
<email>hans.holmberg@cnexlabs.com</email>
</author>
<published>2019-04-10T17:56:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b2b3a70cd9984fe39ed5aaa9ce596476051ce5de'/>
<id>urn:sha1:b2b3a70cd9984fe39ed5aaa9ce596476051ce5de</id>
<content type='text'>
The introduction of multipage bio vectors broke pblk's partial read
logic due to it not being prepared for multipage bio vectors.

Use bio vector iterators instead of direct bio vector indexing.

Fixes: 07173c3ec276 ("block: enable multipage bvecs")
Reported-by: Klaus Jensen &lt;klaus.jensen@cnexlabs.com&gt;
Signed-off-by: Hans Holmberg &lt;hans.holmberg@cnexlabs.com&gt;
Updated description.
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>pblk: fix max_io calculation</title>
<updated>2019-03-07T15:59:26Z</updated>
<author>
<name>Javier González</name>
<email>javier@javigon.com</email>
</author>
<published>2019-03-07T12:18:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9205e44916b2ca2e959be4210133292a19e79b0d'/>
<id>urn:sha1:9205e44916b2ca2e959be4210133292a19e79b0d</id>
<content type='text'>
When calculating the maximun I/O size allowed into the buffer, consider
the write size (ws_opt) used by the write thread in order to cover the
case in which, due to flushes, the mem and subm pointers are disaligned
by (ws_opt - 1). This case currently translates into a stall when
an I/O of the largest possible size is submitted.

Fixes: f9f9d1ae2c66 ("lightnvm: pblk: prevent stall due to wb threshold")

Signed-off-by: Javier González &lt;javier@javigon.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: fix race condition on GC</title>
<updated>2019-02-11T15:18:08Z</updated>
<author>
<name>Heiner Litz</name>
<email>hlitz@ucsc.edu</email>
</author>
<published>2019-02-11T12:25:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0586942f03b71bc95b0ee356ff6b09d53acbad06'/>
<id>urn:sha1:0586942f03b71bc95b0ee356ff6b09d53acbad06</id>
<content type='text'>
This patch fixes a race condition where a write is mapped to the last
sectors of a line. The write is synced to the device but the L2P is not
updated yet. When the line is garbage collected before the L2P update
is performed, the sectors are ignored by the GC logic and the line is
freed before all sectors are moved. When the L2P is finally updated, it
contains a mapping to a freed line, subsequent reads of the
corresponding LBAs fail.

This patch introduces a per line counter specifying the number of
sectors that are synced to the device but have not been updated in the
L2P. Lines with a counter of greater than zero will not be selected
for GC.

Signed-off-by: Heiner Litz &lt;hlitz@ucsc.edu&gt;
Reviewed-by: Hans Holmberg &lt;hans.holmberg@cnexlabs.com&gt;
Reviewed-by: Javier González &lt;javier@javigon.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: prevent stall due to wb threshold</title>
<updated>2019-02-11T15:18:08Z</updated>
<author>
<name>Javier González</name>
<email>javier@javigon.com</email>
</author>
<published>2019-02-11T12:25:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b4cdc4260edf7e03d8b6fabb88aec2cdda95917e'/>
<id>urn:sha1:b4cdc4260edf7e03d8b6fabb88aec2cdda95917e</id>
<content type='text'>
In order to respect mw_cuinits, pblk's write buffer maintains a
backpointer to protect data not yet persisted; when writing to the write
buffer, this backpointer defines a threshold that pblk's rate-limiter
enforces.

On small PU configurations, the following scenarios might take place: (i)
the threshold is larger than the write buffer and (ii) the threshold is
smaller than the write buffer, but larger than the maximun allowed
split bio - 256KB at this moment (Note that writes are not always
split - we only do this when we the size of the buffer is smaller
than the buffer). In both cases, pblk's rate-limiter prevents the I/O to
be written to the buffer, thus stalling.

This patch fixes the original backpointer implementation by considering
the threshold both on buffer creation and on the rate-limiters path,
when bio_split is triggered (case (ii) above).

Fixes: 766c8ceb16fc ("lightnvm: pblk: guarantee that backpointer is respected on writer stall")
Signed-off-by: Javier González &lt;javier@javigon.com&gt;
Reviewed-by: Hans Holmberg &lt;hans.holmberg@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: extend line wp balance check</title>
<updated>2019-02-11T15:18:07Z</updated>
<author>
<name>Hans Holmberg</name>
<email>hans.holmberg@cnexlabs.com</email>
</author>
<published>2019-02-11T12:25:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa8759d80a755cb32f1707b360a265f3695770ef'/>
<id>urn:sha1:aa8759d80a755cb32f1707b360a265f3695770ef</id>
<content type='text'>
pblk stripes writes of minimal write size across all non-offline chunks
in a line, which means that the maximum write pointer delta should not
exceed the minimal write size.

Extend the line write pointer balance check to cover this case, and
ignore the offline chunk wps.

This will render us a warning during recovery if something unexpected
has happened to the chunk write pointers (i.e. powerloss,  a spurious
chunk reset, ..).

Reported-by: Zhoujie Wu &lt;zjwu@marvell.com&gt;
Tested-by: Zhoujie Wu &lt;zjwu@marvell.com&gt;
Reviewed-by: Javier González &lt;javier@javigon.com&gt;
Signed-off-by: Hans Holmberg &lt;hans.holmberg@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: fix TRACE_INCLUDE_PATH</title>
<updated>2019-02-11T15:18:07Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2019-02-11T12:25:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b7fce8f79d947abbe84e577d89ded3c3d5345c23'/>
<id>urn:sha1:b7fce8f79d947abbe84e577d89ded3c3d5345c23</id>
<content type='text'>
As the comment block in include/trace/define_trace.h says,
TRACE_INCLUDE_PATH should be a relative path to the define_trace.h

../../drivers/lightnvm is the correct relative path.

../../../drivers/lightnvm is working by coincidence because the top
Makefile adds -I$(srctree)/arch/$(SRCARCH)/include as a header
search path, but we should not rely on it.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Hans Holmberg &lt;hans.holmberg@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: Switch to use new generic UUID API</title>
<updated>2019-02-11T15:18:07Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2019-02-11T12:25:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7e0a0847ed7ea02f03dd1442136a0cd684d91218'/>
<id>urn:sha1:7e0a0847ed7ea02f03dd1442136a0cd684d91218</id>
<content type='text'>
There are new types and helpers that are supposed to be used in new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Javier González &lt;javier@javigon.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: Use u64 instead of __le64 for CPU visible side</title>
<updated>2019-02-11T15:18:07Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2019-02-11T12:25:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e74ecf63ef9c3ff92bda531ed41a43ad4e75682e'/>
<id>urn:sha1:e74ecf63ef9c3ff92bda531ed41a43ad4e75682e</id>
<content type='text'>
Sparse complains about using strict data types:

drivers/lightnvm/pblk-read.c:254:43: warning: incorrect type in assignment (different base types)
drivers/lightnvm/pblk-read.c:254:43:    expected restricted __le64 &lt;noident&gt;
drivers/lightnvm/pblk-read.c:254:43:    got unsigned long long [unsigned] [usertype] &lt;noident&gt;
drivers/lightnvm/pblk-read.c:255:29: warning: cast from restricted __le64
drivers/lightnvm/pblk-read.c:268:29: warning: cast from restricted __le64
drivers/lightnvm/pblk-read.c:328:41: warning: incorrect type in assignment (different base types)
drivers/lightnvm/pblk-read.c:328:41:    expected restricted __le64 &lt;noident&gt;
drivers/lightnvm/pblk-read.c:328:41:    got unsigned long long [unsigned] [usertype] &lt;noident&gt;

In the code it seems explicit that lba_list_mem and lba_list_media members
of struct pblk_pr_ctx are used on CPU side, which means they should not be
of strict types.

Change types of lba_list_mem and lba_list_media members to be u64.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Javier González &lt;javier@javigon.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: use vfree to free metadata on error path</title>
<updated>2019-02-11T15:18:07Z</updated>
<author>
<name>Hans Holmberg</name>
<email>hans.holmberg@cnexlabs.com</email>
</author>
<published>2019-02-11T12:25:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6916cf5426d08ea8be50ab4ba7ff86ea022cdff3'/>
<id>urn:sha1:6916cf5426d08ea8be50ab4ba7ff86ea022cdff3</id>
<content type='text'>
As chunk metadata is allocated using vmalloc, we need to free it
using vfree.

Fixes: 090ee26fd512 ("lightnvm: use internal allocation for chunk log page")
Signed-off-by: Hans Holmberg &lt;hans.holmberg@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pblk: stop taking the free lock in in pblk_lines_free</title>
<updated>2019-02-11T15:18:07Z</updated>
<author>
<name>Hans Holmberg</name>
<email>hans.holmberg@cnexlabs.com</email>
</author>
<published>2019-02-11T12:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f9324980d7300f961e9895ad94d5ea71c0fe187e'/>
<id>urn:sha1:f9324980d7300f961e9895ad94d5ea71c0fe187e</id>
<content type='text'>
pblk_line_meta_free might sleep (it can end up calling vfree, depending
on how we allocate lba lists), and this can lead to a BUG()
if we wake up on a different cpu and release the lock.

As there is no point of grabbing the free lock when pblk has shut down,
remove the lock.

Signed-off-by: Hans Holmberg &lt;hans.holmberg@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
