lightnvm: pblk: add trace events for chunk states
Introduce trace points for tracking chunk states in pblk - this is useful for inspection of the entire state of the drive, and real handy for both fw and pblk debugging. 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
43241cfe47
commit
4c44abf43d
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "pblk.h"
|
||||
#include "pblk-trace.h"
|
||||
|
||||
static unsigned int write_buffer_size;
|
||||
|
||||
@@ -664,6 +665,9 @@ static int pblk_setup_line_meta_chk(struct pblk *pblk, struct pblk_line *line,
|
||||
chunk->cnlb = chunk_meta->cnlb;
|
||||
chunk->wp = chunk_meta->wp;
|
||||
|
||||
trace_pblk_chunk_state(pblk_disk_name(pblk), &ppa,
|
||||
chunk->state);
|
||||
|
||||
if (chunk->type & NVM_CHK_TP_SZ_SPEC) {
|
||||
WARN_ONCE(1, "pblk: custom-sized chunks unsupported\n");
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user