lightnvm: pblk: add tracing for chunk resets
Trace state of chunk resets. 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:

committed by
Jens Axboe

parent
1b0dd0bf3d
commit
4209c31c0c
@@ -90,9 +90,15 @@ static void __pblk_end_io_erase(struct pblk *pblk, struct nvm_rq *rqd)
|
||||
atomic_dec(&line->left_seblks);
|
||||
|
||||
if (rqd->error) {
|
||||
trace_pblk_chunk_reset(pblk_disk_name(pblk),
|
||||
&rqd->ppa_addr, PBLK_CHUNK_RESET_FAILED);
|
||||
|
||||
chunk->state = NVM_CHK_ST_OFFLINE;
|
||||
pblk_mark_bb(pblk, line, rqd->ppa_addr);
|
||||
} else {
|
||||
trace_pblk_chunk_reset(pblk_disk_name(pblk),
|
||||
&rqd->ppa_addr, PBLK_CHUNK_RESET_DONE);
|
||||
|
||||
chunk->state = NVM_CHK_ST_FREE;
|
||||
}
|
||||
|
||||
@@ -923,6 +929,9 @@ static int pblk_blk_erase_sync(struct pblk *pblk, struct ppa_addr ppa)
|
||||
struct nvm_rq rqd = {NULL};
|
||||
int ret;
|
||||
|
||||
trace_pblk_chunk_reset(pblk_disk_name(pblk), &ppa,
|
||||
PBLK_CHUNK_RESET_START);
|
||||
|
||||
pblk_setup_e_rq(pblk, &rqd, ppa);
|
||||
|
||||
/* The write thread schedules erases so that it minimizes disturbances
|
||||
@@ -1736,6 +1745,9 @@ int pblk_blk_erase_async(struct pblk *pblk, struct ppa_addr ppa)
|
||||
rqd->end_io = pblk_end_io_erase;
|
||||
rqd->private = pblk;
|
||||
|
||||
trace_pblk_chunk_reset(pblk_disk_name(pblk),
|
||||
&ppa, PBLK_CHUNK_RESET_START);
|
||||
|
||||
/* The write thread schedules erases so that it minimizes disturbances
|
||||
* with writes. Thus, there is no need to take the LUN semaphore.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user