diff options
author | Igor Konopko <igor.j.konopko@intel.com> | 2019-05-04 20:37:52 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-05-06 18:19:17 +0200 |
commit | 75c89bef6a54943ea0053dc3d27479edfb31b699 (patch) | |
tree | 983227be044b9f04735196e97880e71ab29c093b /drivers/lightnvm/pblk-map.c | |
parent | lightnvm: pblk: fix race during put line (diff) | |
download | linux-75c89bef6a54943ea0053dc3d27479edfb31b699.tar.xz linux-75c89bef6a54943ea0053dc3d27479edfb31b699.zip |
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>
Diffstat (limited to 'drivers/lightnvm/pblk-map.c')
-rw-r--r-- | drivers/lightnvm/pblk-map.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/lightnvm/pblk-map.c b/drivers/lightnvm/pblk-map.c index 7fbc99b60cac..5408e32b2f13 100644 --- a/drivers/lightnvm/pblk-map.c +++ b/drivers/lightnvm/pblk-map.c @@ -162,6 +162,7 @@ int pblk_map_erase_rq(struct pblk *pblk, struct nvm_rq *rqd, *erase_ppa = ppa_list[i]; erase_ppa->a.blk = e_line->id; + erase_ppa->a.reserved = 0; spin_unlock(&e_line->lock); |