]> asedeno.scripts.mit.edu Git - linux.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)
commit6ad2f619b2b278467242e7a084c4f77d79c31a63
tree48aa156fb8f59749ec8cb7a67e10f2b394e5173d
parent253babc3f677461a9f73b707bbbd56d2962e48c0
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