Re: [PATCH 4/4] lightnvm: pblk: add tracing for chunk resets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On 29 Aug 2018, at 14.31, Hans Holmberg <hans.ml.holmberg@xxxxxxxxxxxxx> wrote:
> 
> From: Hans Holmberg <hans.holmberg@xxxxxxxxxxxx>
> 
> Trace state of chunk resets.
> 
> Signed-off-by: Hans Holmberg <hans.holmberg@xxxxxxxxxxxx>
> ---
> drivers/lightnvm/pblk-core.c  | 12 ++++++++++++
> drivers/lightnvm/pblk-trace.h | 31 +++++++++++++++++++++++++++++++
> drivers/lightnvm/pblk.h       |  6 ++++++
> 3 files changed, 49 insertions(+)
> 
> diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
> index 566a5d3165ee..b874001d1175 100644
> --- a/drivers/lightnvm/pblk-core.c
> +++ b/drivers/lightnvm/pblk-core.c
> @@ -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;
> 	}
> 
> @@ -958,6 +964,9 @@ int pblk_line_erase(struct pblk *pblk, struct pblk_line *line)
> 		WARN_ON(test_and_set_bit(bit, line->erase_bitmap));
> 		spin_unlock(&line->lock);
> 
> +		trace_pblk_chunk_reset(pblk_disk_name(pblk),
> +				&ppa, PBLK_CHUNK_RESET_START);
> +

Can you move this inside of pblk_blk_erase_sync() instead? I was looking
at the code now to implement a different thing and it is confusing to
see tracing inside erase_async and not in erase_sync.

Thanks,
Javier

Attachment: signature.asc
Description: Message signed with OpenPGP


[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux