lightnvm: pblk: fix chunk close trace event check
The check for chunk closes suffers from an off-by-one issue, leading
to chunk close events not being traced.
Fixes: 4c44abf43d
("lightnvm: pblk: add trace events for chunk states")
Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
55e58c5e78
commit
96076f7dde
@ -531,7 +531,7 @@ void pblk_check_chunk_state_update(struct pblk *pblk, struct nvm_rq *rqd)
|
||||
if (caddr == 0)
|
||||
trace_pblk_chunk_state(pblk_disk_name(pblk),
|
||||
ppa, NVM_CHK_ST_OPEN);
|
||||
else if (caddr == chunk->cnlb)
|
||||
else if (caddr == (chunk->cnlb - 1))
|
||||
trace_pblk_chunk_state(pblk_disk_name(pblk),
|
||||
ppa, NVM_CHK_ST_CLOSED);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user