Re: [PATCH] libnvdimm, btt: add btt startup debug

From: Verma, Vishal L
Date: Fri Apr 15 2016 - 13:00:42 EST


On Thu, 2016-04-14 at 19:40 -0700, Dan Williams wrote:
> Report the reason for btt probe failures when debug is enabled.
>
> Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
> ---
> Âdrivers/nvdimm/btt.c |ÂÂÂÂ6 +++++-
> Â1 file changed, 5 insertions(+), 1 deletion(-)

Reveiwed-by: Vishal Verma <Vishal.l.verma@xxxxxxxxx>

>
> diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
> index cc9fafed9362..68a7c3c1eed9 100644
> --- a/drivers/nvdimm/btt.c
> +++ b/drivers/nvdimm/btt.c
> @@ -1383,11 +1383,15 @@ int nvdimm_namespace_attach_btt(struct
> nd_namespace_common *ndns)
> Â struct btt *btt;
> Â size_t rawsize;
> Â
> - if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize)
> + if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize) {
> + dev_dbg(&nd_btt->dev, "incomplete btt
> configuration\n");
> Â return -ENODEV;
> + }
> Â
> Â rawsize = nvdimm_namespace_capacity(ndns) - SZ_4K;
> Â if (rawsize < ARENA_MIN_SIZE) {
> + dev_dbg(&nd_btt->dev, "%s must be at least %ld
> bytes\n",
> + dev_name(&ndns->dev), ARENA_MIN_SIZE
> + SZ_4K);
> Â return -ENXIO;
> Â }
> Â nd_region = to_nd_region(nd_btt->dev.parent);
>
> _______________________________________________
> Linux-nvdimm mailing list
> Linux-nvdimm@xxxxxxxxxxxx
> https://lists.01.org/mailman/listinfo/linux-nvdimm