• J
    lightnvm: pblk: fix erase counters on error fail · a44f53fa
    Javier González 提交于
    When block erases fail, these blocks are marked bad. The number of valid
    blocks in the line was not updated, which could cause an infinite loop
    on the erase path.
    
    Fix this atomic counter and, in order to avoid taking an irq lock on the
    interrupt context, make the erase counters atomic too.
    
    Also, in the case that a significant number of blocks become bad in a
    line, the result is the double shared metadata buffer (emeta) to stop
    the pipeline until all metadata is flushed to the media. Increase the
    number of metadata lines from 2 to 4 to avoid this case.
    
    Fixes: a4bd217b "lightnvm: physical block device (pblk) target"
    Signed-off-by: NJavier González <javier@cnexlabs.com>
    Reviewed-by: NMatias Bjørling <matias@cnexlabs.com>
    Signed-off-by: NJens Axboe <axboe@fb.com>
    a44f53fa
pblk.h 31.4 KB