diff options
author | Igor Konopko <[email protected]> | 2019-05-04 20:37:52 +0200 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2019-05-06 10:19:17 -0600 |
commit | 75c89bef6a54943ea0053dc3d27479edfb31b699 (patch) | |
tree | 983227be044b9f04735196e97880e71ab29c093b | |
parent | 4ca885241950265a82e922a018b90ff8047d7aac (diff) |
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 <[email protected]>
Reviewed-by: Javier González <[email protected]>
Reviewed-by: Hans Holmberg <[email protected]>
Signed-off-by: Matias Bjørling <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
-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); |