Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lightnvm: pblk: ensure that erase is chunk aligned

The sector bits in the erase command may be uninitialized are
uninitialized, causing the erase LBA to be unaligned to the chunk size.

This is unexpected situation, since erase shall always be chunk
aligned based on OCSSD the 2.0 specification.

Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
Reviewed-by: Javier González <javier@javigon.com>
Reviewed-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Igor Konopko and committed by
Jens Axboe
75c89bef 4ca88524

+1
+1
drivers/lightnvm/pblk-map.c
··· 162 162 163 163 *erase_ppa = ppa_list[i]; 164 164 erase_ppa->a.blk = e_line->id; 165 + erase_ppa->a.reserved = 0; 165 166 166 167 spin_unlock(&e_line->lock); 167 168