lightnvm: A host-side driver for Open-Channel SSDs

Open-channel SSDs are devices which exposes direct access to its physical
flash storage, while keeping a subset of the internal features of SSDs.

A common SSD consists of a flash translation layer (FTL), bad block
management, and hardware units such as flash controller and host
interface controller and a large amount of flash chips.

LightNVM moves part of the FTL responsibility into the host, allowing
the host to manage data placement, garbage collection and parallelism. The
device continues to maintain information about bad block management, and implements a
simpler FTL, that still allows extensions such as atomic IOs, metadata
persistence and similar.

The architecture of LightNVM consists of a core and multiple targets. The core
has the part of the driver that is shared across targets, initialization and
teardown and statistics. The targets are how physical flash are exposed to
user-land. This can be as the block device, key-value store, object-store, or
anything else.

LightNVM is currently hooked up through the null_blk and NVMe driver. The NVMe
extension allow development using the LightNVM-extended QEMU implementation,
using Keith Busch's qemu-nvme branch.
lightnvm: NVMe integration

NVMe devices are identified by the vendor specific bits:

Bit 3 in OACS (device-wide). Currently made per device, as the nvme
namespace is missing in the completion path.
Bit 1 in DSM (per-namespace).

The OACS change can be removed when the namespace is resolvable from the
completion path.

From there, the NVMe specification is extended with the following
commands:

LightNVM Identify
LightNVM Channel identify
LightNVM Synchronious/Asynchronious erase
LightNVM Get Features
LightNVM Set Responsibility
LightNVM Get Logical to Physical map
LightNVM Get Physical to Logical map

The NVMe integration can be tested using Keith Busch NVMe qemu simulator
Lwith ightNVM patches on top. This can be found at:
https://github/LightNVM/qemu-nvme
lightnvm: null_blk integration

Allows the null_blk driver to hook into LightNVM for performance
evaluation. The number of channels exposed to LightNVM can be configured
through the lightnvm_num_channels module parameter.
lightnvm: ATA/SCSI integration

LightNVM is integrated into the ATA/SCSI stack by devices identifying
themselves as LightNVM devices.

ATA devices should export bit 2 as set in its Data Set Management byte.
SCSI devices should set bit 1 at offset 0x44 in its VPD b0 page.

Currently the patch limits the incoming I/O size to 4K. This is done to allow
LightNVM to rewrite the destination address to the appropriate physical
flash address. A future approach is to extend the IO size to incorporate
appropriate mapping techniques.

For evaluation, the OpenSSD Jasmine board can be used. The source for a LightNVM
compatible firmware can be found at: https://github.com/LightNVM/OpenSSDJasmine