]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: pblk: recover open lines on 2.0 devices
authorJavier González <javier@javigon.com>
Tue, 9 Oct 2018 11:12:05 +0000 (13:12 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 9 Oct 2018 14:25:08 +0000 (08:25 -0600)
commit4c672f5bbada5c9b16f51780fad1c87b2b7bfd92
tree48aa156fb8f59749ec8cb7a67e10f2b394e5173d
parent945ac9c9b7a277e6a553fd7353dc5ae5c2af184b
lightnvm: pblk: recover open lines on 2.0 devices

In the OCSSD 2.0 spec, each chunk reports its write pointer. This means
that pblk does not need to scan open lines to find the write pointer,
but instead, it can retrieve it directly (and verify it).

This patch uses the write pointer on open lines to (i) recover the line
up until the last written lba and (ii) reconstruct the map bitmap and
rest of line metadata so that the line can be used for new data.

Since the 1.2 path in lightnvm core has been re-implemented to populate
the chunk structure and thus recover the write pointer on
initialization, this patch removes 1.2 specific recovery, as the 2.0
path can be reused.

Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-recovery.c