<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/lightnvm/core.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-12-11T19:22:35Z</updated>
<entry>
<title>lightnvm: dynamic DMA pool entry size</title>
<updated>2018-12-11T19:22:35Z</updated>
<author>
<name>Igor Konopko</name>
<email>igor.j.konopko@intel.com</email>
</author>
<published>2018-12-11T19:16:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=24828d0536bbedc9b265f2b01ffca99de3f6a7c7'/>
<id>urn:sha1:24828d0536bbedc9b265f2b01ffca99de3f6a7c7</id>
<content type='text'>
Currently lightnvm and pblk uses single DMA pool, for which the entry
size always is equal to PAGE_SIZE. The contents of each entry allocated
from the DMA pool consists of a PPA list (8bytes * 64), leaving
56bytes * 64 space for metadata. Since the metadata field can be bigger,
such as 128 bytes, the static size does not cover this use-case.

This patch adds support for I/O metadata above 56 bytes by changing DMA
pool size based on device meta size and allows pblk to use OOB metadata
&gt;=16B.

Reviewed-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Igor Konopko &lt;igor.j.konopko@intel.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: simplify geometry enumeration</title>
<updated>2018-12-11T19:22:34Z</updated>
<author>
<name>Matias Bjørling</name>
<email>mb@lightnvm.io</email>
</author>
<published>2018-12-11T19:16:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=85136c0102852fe505c0fbd3f1bf9d17038bb94d'/>
<id>urn:sha1:85136c0102852fe505c0fbd3f1bf9d17038bb94d</id>
<content type='text'>
Currently the geometry of an OCSSD is enumerated using a two step
approach:

First, nvm_register is called, the OCSSD identify command is issued,
and second the geometry sos and csecs values are read either from the
OCSSD identify if it is a 1.2 drive, or from the NVMe namespace data
structure if it is a 2.0 device.

This patch recombines it into a single step, such that nvm_register can
use the csecs and sos fields independent of which version is used. This
enables one to dynamically size the lightnvm subsystem dma pool.

Reviewed-by: Igor Konopko &lt;igor.j.konopko@intel.com&gt;
Reviewed-by: Javier González &lt;javier@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: Fix uninitialized return value in nvm_get_chunk_meta()</title>
<updated>2018-12-11T19:22:33Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2018-12-11T19:16:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=55e58c5e78aad9d3246f57e7718cf5ee7adde9e3'/>
<id>urn:sha1:55e58c5e78aad9d3246f57e7718cf5ee7adde9e3</id>
<content type='text'>
With gcc 4.1:

    drivers/lightnvm/core.c: In function ‘nvm_get_bb_meta’:
    drivers/lightnvm/core.c:977: warning: ‘ret’ may be used uninitialized in this function

and

    drivers/nvme/host/lightnvm.c: In function ‘nvme_nvm_get_chk_meta’:
    drivers/nvme/host/lightnvm.c:580: warning: ‘ret’ may be used uninitialized in this function

Indeed, if (for the former) the number of channels or LUNs is zero, or
(for both) the passed number of chunks is zero, ret will be returned
uninitialized.

Fix this by preinitializing ret to zero.

Fixes: aff3fb18f957de93 ("lightnvm: move bad block and chunk state logic to core")
Fixes: a294c199455187d1 ("lightnvm: implement get log report chunk helpers")
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&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>block: remove the lock argument to blk_alloc_queue_node</title>
<updated>2018-11-15T19:13:35Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-11-14T16:02:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6d46964230d182c4b6097379738849a809d791dc'/>
<id>urn:sha1:6d46964230d182c4b6097379738849a809d791dc</id>
<content type='text'>
With the legacy request path gone there is no real need to override the
queue_lock.

Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: introduce nvm_rq_to_ppa_list</title>
<updated>2018-10-09T14:25:07Z</updated>
<author>
<name>Hans Holmberg</name>
<email>hans.holmberg@cnexlabs.com</email>
</author>
<published>2018-10-09T11:11:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d68a9344041b6dd304ff382d0c7805869f09944f'/>
<id>urn:sha1:d68a9344041b6dd304ff382d0c7805869f09944f</id>
<content type='text'>
There is a number of places in the lightnvm subsystem where the user
iterates over the ppa list. Before iterating, the user must know if it
is a single or multiple LBAs due to vector commands using either the
nvm_rq -&gt;ppa_addr or -&gt;ppa_list fields on command submission, which
leads to open-coding the if/else statement.

Instead of having multiple if/else's, move it into a function that can
be called by its users.

A nice side effect of this cleanup is that this patch fixes up a
bunch of cases where we don't consider the single-ppa case in pblk.

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: move bad block and chunk state logic to core</title>
<updated>2018-10-09T14:25:06Z</updated>
<author>
<name>Matias Bjørling</name>
<email>mb@lightnvm.io</email>
</author>
<published>2018-10-09T11:11:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aff3fb18f957de93e629c7d3d2c4ef1f360aa511'/>
<id>urn:sha1:aff3fb18f957de93e629c7d3d2c4ef1f360aa511</id>
<content type='text'>
pblk implements two data paths for recovery line state. One for 1.2
and another for 2.0, instead of having pblk implement these, combine
them in the core to reduce complexity and make available to other
targets.

The new interface will adhere to the 2.0 chunk definition,
including managing open chunks with an active write pointer. To provide
this interface, a 1.2 device recovers the state of the chunks by
manually detecting if a chunk is either free/open/close/offline, and if
open, scanning the flash pages sequentially to find the next writeable
page. This process takes on average ~10 seconds on a device with 64 dies,
1024 blocks and 60us read access time. The process can be parallelized
but is left out for maintenance simplicity, as the 1.2 specification is
deprecated. For 2.0 devices, the logic is maintained internally in the
drive and retrieved through the 2.0 interface.

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: move device L2P detection to core</title>
<updated>2018-10-09T14:25:06Z</updated>
<author>
<name>Matias Bjørling</name>
<email>mb@lightnvm.io</email>
</author>
<published>2018-10-09T11:11:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=656e33ca3d405196f94133babc4e38454a49cb73'/>
<id>urn:sha1:656e33ca3d405196f94133babc4e38454a49cb73</id>
<content type='text'>
A 1.2 device is able to manage the logical to physical mapping
table internally or leave it to the host.

A target only supports one of those approaches, and therefore must
check on initialization. Move this check to core to avoid each target
implement the check.

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: combine 1.2 and 2.0 command flags</title>
<updated>2018-10-09T14:25:05Z</updated>
<author>
<name>Matias Bjørling</name>
<email>mb@lightnvm.io</email>
</author>
<published>2018-10-09T11:11:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d7b6801673f95e5f72efd3ffba1bcbb606883049'/>
<id>urn:sha1:d7b6801673f95e5f72efd3ffba1bcbb606883049</id>
<content type='text'>
Add nvm_set_flags helper to enable core to appropriately
set the command flags for read/write/erase depending on which version
a drive supports.

The flags arguments can be distilled into the access hint,
scrambling, and program/erase suspend. Replace the access hint with
a "is_seq" parameter. The rest of the flags are dependent on the
command opcode, which is trivial to detect and set.

Signed-off-by: Matias Bjørling &lt;mb@lightnvm.io&gt;
Reviewed-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>lightnvm: pass flag on graceful teardown to targets</title>
<updated>2018-06-01T13:43:53Z</updated>
<author>
<name>Javier González</name>
<email>javier@javigon.com</email>
</author>
<published>2018-06-01T13:04:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a7c9e9109ca1142f33b882615cc5fa048e07f3ea'/>
<id>urn:sha1:a7c9e9109ca1142f33b882615cc5fa048e07f3ea</id>
<content type='text'>
If the namespace is unregistered before the LightNVM target is removed
(e.g., on hot unplug) it is too late for the target to store any metadata
on the device - any attempt to write to the device will fail. In this
case, pass on a "gracefull teardown" flag to the target to let it know
when this happens.

In the case of pblk, we pad the open line (close all open chunks) to
improve data retention. In the event of an ungraceful shutdown, avoid
this part and just clean up.

Signed-off-by: Javier González &lt;javier@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: implement get log report chunk helpers</title>
<updated>2018-03-29T23:29:09Z</updated>
<author>
<name>Javier González</name>
<email>javier@cnexlabs.com</email>
</author>
<published>2018-03-29T22:05:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a294c199455187d124b0760fa8f86c13cdaa4b25'/>
<id>urn:sha1:a294c199455187d124b0760fa8f86c13cdaa4b25</id>
<content type='text'>
The 2.0 spec provides a report chunk log page that can be retrieved
using the stangard nvme get log page. This replaces the dedicated
get/put bad block table in 1.2.

This patch implements the helper functions to allow targets retrieve the
chunk metadata using get log page. It makes nvme_get_log_ext available
outside of nvme core so that we can use it form lightnvm.

Signed-off-by: Javier González &lt;javier@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>
