• Javier González's avatar
    lightnvm: pblk: check lba sanity on read path · a4809fee
    Javier González authored
    As part of pblk's recovery scheme, we store the lba mapped to each
    physical sector on the device's out-of-bound (OOB) area.
    
    On the read path, we can use this information to validate that the data
    being delivered to the upper layers corresponds to the lba being
    requested. The cost of this check is an extra copy on the DMA region on
    the device and an extra comparison in the host, given that (i) the OOB
    area is being read together with the data in the media, and (ii) the DMA
    region allocated for the ppa list can be reused for the metadata stored
    on the OOB area.
    Signed-off-by: default avatarJavier González <javier@cnexlabs.com>
    Signed-off-by: default avatarMatias Bjørling <m@bjorling.me>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    a4809fee
pblk-read.c 14.4 KB