• Javier González's avatar
    lightnvm: pblk: recover open lines on 2.0 devices · 6ad2f619
    Javier González authored
    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: default avatarJavier González <javier@cnexlabs.com>
    Signed-off-by: default avatarMatias Bjørling <mb@lightnvm.io>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    6ad2f619
pblk-recovery.c 20.1 KB