• Javier González's avatar
    lightnvm: pblk: fix min size for page mempool · bd432417
    Javier González authored
    pblk uses an internal page mempool for allocating pages on internal
    bios. The main two users of this memory pool are partial reads (reads
    with some sectors in cache and some on media) and padded writes, which
    need to add dummy pages to an existing bio already containing valid
    data (and with a large enough bioset allocated). In both cases, the
    maximum number of pages per bio is defined by the maximum number of
    physical sectors supported by the underlying device.
    
    This patch fixes a bad mempool allocation, where the min_nr of elements
    on the pool was fixed (to 16), which is lower than the maximum number
    of sectors supported by NVMe (as of the time for this patch). Instead,
    use the maximum number of allowed sectors reported by the device.
    Reported-by: default avatarJens Axboe <axboe@kernel.dk>
    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>
    bd432417
pblk.h 35.7 KB