[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <148143774706.10950.14457441051651852899.stgit@dwillia2-desk3.amr.corp.intel.com>
Date: Sat, 10 Dec 2016 22:29:07 -0800
From: Dan Williams <dan.j.williams@...el.com>
To: linux-nvdimm@...ts.01.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH 8/8] dax: add debug for region available_size
Add dynamic debug statements to dump the per-dax-dev resource
allocations and device offsets.
Signed-off-by: Dan Williams <dan.j.williams@...el.com>
---
drivers/dax/dax.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/dax/dax.c b/drivers/dax/dax.c
index b130eff91b83..d1641e69a088 100644
--- a/drivers/dax/dax.c
+++ b/drivers/dax/dax.c
@@ -97,8 +97,11 @@ static unsigned long long dax_region_avail_size(
WARN_ON_ONCE(!mutex_is_locked(&dax_region->lock));
size = resource_size(&dax_region->res);
- for_each_dax_region_resource(dax_region, res)
+ for_each_dax_region_resource(dax_region, res) {
+ dev_dbg(dax_region->dev, "%s: %pr offset: %lx\n",
+ res->name, res, res->desc);
size -= resource_size(res);
+ }
return size;
}
@@ -372,6 +375,7 @@ struct dax_region *alloc_dax_region(struct device *parent, int region_id,
dax_region->res.name = dev_name(parent);
dax_region->res.start = res->start;
dax_region->res.end = res->end;
+ dax_region->res.flags = IORESOURCE_MEM;
dax_region->pfn_flags = pfn_flags;
mutex_init(&dax_region->lock);
kref_init(&dax_region->kref);
Powered by blists - more mailing lists