<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/lightnvm.h, branch v4.9.5</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-09-21T13:57:31Z</updated>
<entry>
<title>lightnvm: expose device geometry through sysfs</title>
<updated>2016-09-21T13:57:31Z</updated>
<author>
<name>Simon A. F. Lund</name>
<email>slund@cnexlabs.com</email>
</author>
<published>2016-09-16T12:25:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=40267efddc296190d50c61d96daf277151447cf6'/>
<id>urn:sha1:40267efddc296190d50c61d96daf277151447cf6</id>
<content type='text'>
For a host to access an Open-Channel SSD, it has to know its geometry,
so that it writes and reads at the appropriate device bounds.

Currently, the geometry information is kept within the kernel, and not
exported to user-space for consumption. This patch exposes the
configuration through sysfs and enables user-space libraries, such as
liblightnvm, to use the sysfs implementation to get the geometry of an
Open-Channel SSD.

The sysfs entries are stored within the device hierarchy, and can be
found using the "lightnvm" device type.

An example configuration looks like this:

/sys/class/nvme/
└── nvme0n1
   ├── capabilities: 3
   ├── device_mode: 1
   ├── erase_max: 1000000
   ├── erase_typ: 1000000
   ├── flash_media_type: 0
   ├── media_capabilities: 0x00000001
   ├── media_type: 0
   ├── multiplane: 0x00010101
   ├── num_blocks: 1022
   ├── num_channels: 1
   ├── num_luns: 4
   ├── num_pages: 64
   ├── num_planes: 1
   ├── page_size: 4096
   ├── prog_max: 100000
   ├── prog_typ: 100000
   ├── read_max: 10000
   ├── read_typ: 10000
   ├── sector_oob_size: 0
   ├── sector_size: 4096
   ├── media_manager: gennvm
   ├── ppa_format: 0x380830082808001010102008
   ├── vendor_opcode: 0
   ├── max_phys_secs: 64
   └── version: 1

Signed-off-by: Simon A. F. Lund &lt;slund@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: control life of nvm_dev in driver</title>
<updated>2016-09-21T13:56:18Z</updated>
<author>
<name>Matias Bjørling</name>
<email>m@bjorling.me</email>
</author>
<published>2016-09-16T12:25:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b0b4e09c1ae71c4ec33df0616b830ae050006e9b'/>
<id>urn:sha1:b0b4e09c1ae71c4ec33df0616b830ae050006e9b</id>
<content type='text'>
LightNVM compatible device drivers does not have a method to expose
LightNVM specific sysfs entries.

To enable LightNVM sysfs entries to be exposed, lightnvm device
drivers require a struct device to attach it to. To allow both the
actual device driver and lightnvm sysfs entries to coexist, the device
driver tracks the lifetime of the nvm_dev structure.

This patch refactors NVMe and null_blk to handle the lifetime of struct
nvm_dev, which eliminates the need for struct gendisk when a lightnvm
compatible device is provided.

Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: make ppa_list const in nvm_set_rqd_list</title>
<updated>2016-07-07T14:51:52Z</updated>
<author>
<name>Matias Bjørling</name>
<email>m@bjorling.me</email>
</author>
<published>2016-07-07T07:54:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8680f165eaa56cc9812d7d9b4903f449df0f6a45'/>
<id>urn:sha1:8680f165eaa56cc9812d7d9b4903f449df0f6a45</id>
<content type='text'>
The passed by reference ppa list in nvm_set_rqd_list() is updated when
multiple planes are available. In that case, each PPA plane is
incremented when the device side PPA list is created. This prevents the
caller to rely on the PPA list to be unmodified after a call.

Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: remove _unlocked variant of [get/put]_blk</title>
<updated>2016-07-07T14:51:52Z</updated>
<author>
<name>Matias Bjørling</name>
<email>m@bjorling.me</email>
</author>
<published>2016-07-07T07:54:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=41285fad511a2c3746bee7ccb3b2f21b70305c14'/>
<id>urn:sha1:41285fad511a2c3746bee7ccb3b2f21b70305c14</id>
<content type='text'>
The [get/put]_blk API enables targets to get ownership of blocks at
runtime. This information is currently not recorded on disk, and the
information is therefore lost on power failure. To restore the
metadata, the [get/put]_blk must persist its metadata. In that case,
we need to control the outer lock, so that we can disable them while
updating the on-disk metadata. Fortunately, the _unlocked versions can
be removed, which allows us to move the lock into the [get/put]_blk
functions.

Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: move target mgmt into media mgr</title>
<updated>2016-07-07T14:51:52Z</updated>
<author>
<name>Matias Bjørling</name>
<email>m@bjorling.me</email>
</author>
<published>2016-07-07T07:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b76eb20bb0c6f4f9c2e1ad493f73c52817b8aaff'/>
<id>urn:sha1:b76eb20bb0c6f4f9c2e1ad493f73c52817b8aaff</id>
<content type='text'>
To enable persistent block management to easily control creation and
removal of targets, we move target management into the media
manager. The LightNVM core continues to maintain which target types are
registered, while the media manager now keeps track of its initialized
targets.

Two new callbacks for the media manager are introduced. create_tgt and
remove_tgt. Note that remove_tgt returns 0 on successfully removing a
target, and returns 1 if the target was not found.

Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: remove open/close statistics for gennvm</title>
<updated>2016-07-07T14:51:52Z</updated>
<author>
<name>Matias Bjørling</name>
<email>m@bjorling.me</email>
</author>
<published>2016-07-07T07:54:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=077d2389994197277f4f7662b13d11b2f67646a7'/>
<id>urn:sha1:077d2389994197277f4f7662b13d11b2f67646a7</id>
<content type='text'>
The responsibility of the media manager is not to keep track of
open/closed blocks. This is better maintained within a target,
that already manages this information on writes.

Remove the statistics and merge the states NVM_BLK_ST_OPEN and
NVM_BLK_ST_CLOSED.

Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: initialize ppa_addr in dev_to_generic_addr()</title>
<updated>2016-07-07T14:51:52Z</updated>
<author>
<name>Javier González</name>
<email>javier@cnexlabs.com</email>
</author>
<published>2016-07-07T07:54:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5389a1dfb39786df08d4f6a482bd2734b1b50e33'/>
<id>urn:sha1:5389a1dfb39786df08d4f6a482bd2734b1b50e33</id>
<content type='text'>
The -&gt;reserved bit is not initialized when allocated on stack.
This may lead targets to misinterpret the PPA as cached.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: add media manager mark_blk helper</title>
<updated>2016-07-07T14:51:52Z</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2016-07-07T07:54:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=529435e8188674fa1071235f50e6fbbbe020c93f'/>
<id>urn:sha1:529435e8188674fa1071235f50e6fbbbe020c93f</id>
<content type='text'>
Expose media manager mark_blk() to targets, as done for the rest of the
media manager callback functions.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Updated description
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;

Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: reserved space calculation incorrect</title>
<updated>2016-05-06T18:51:10Z</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2016-05-06T18:03:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=116f7d4a21fe450efc652c4850eb27cda36c9db0'/>
<id>urn:sha1:116f7d4a21fe450efc652c4850eb27cda36c9db0</id>
<content type='text'>
The nvm_dev-&gt;max_pages_per_blk variable was removed in favor of the new
nvm-&gt;sec_per_blk variable. The -&gt;max_pages_per_blk variable was still
used in rrpc_capacity, reporting the reserved capacity to zero. Replace
with -&gt;sec_per_blk to calculate the reserved area again.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Updated patch description. Was "lightnvm: eliminate redundant variable"
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: rename nr_pages to nr_ppas on nvm_rq</title>
<updated>2016-05-06T18:51:10Z</updated>
<author>
<name>Javier González</name>
<email>jg@lightnvm.io</email>
</author>
<published>2016-05-06T18:03:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6d5be9590b5e15124e3c8b319c8d7ce01abcf07d'/>
<id>urn:sha1:6d5be9590b5e15124e3c8b319c8d7ce01abcf07d</id>
<content type='text'>
The number of ppas contained on a request is not necessarily the number
of pages that it maps to neither on the target nor on the device side.
In order to avoid confusion, rename nr_pages to nr_ppas since it is what
the variable actually contains.

Signed-off-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
</feed>
