aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/btt.c
diff options
context:
space:
mode:
authorVishal Verma <vishal.l.verma@intel.com>2016-07-27 16:38:59 -0600
committerDan Williams <dan.j.williams@intel.com>2016-08-08 09:26:14 -0700
commitabe8b4e3cef88b8202641d63f5ad58141b970b0f (patch)
treeb52e23c0f87ac191907395db7d5fae85fd1383f7 /drivers/nvdimm/btt.c
parent68202c9f0ad6e16ee806fbadbc5838d55fe5aa5c (diff)
nvdimm, btt: add a size attribute for BTTs
To be consistent with other namespaces, expose a 'size' attribute for BTT devices also. Cc: Dan Williams <dan.j.williams@intel.com> Reported-by: Linda Knippers <linda.knippers@hpe.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/btt.c')
-rw-r--r--drivers/nvdimm/btt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index 88e91666f145..368795aad5c9 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -1269,6 +1269,7 @@ static int btt_blk_init(struct btt *btt)
}
}
set_capacity(btt->btt_disk, btt->nlba * btt->sector_size >> 9);
+ btt->nd_btt->size = btt->nlba * (u64)btt->sector_size;
revalidate_disk(btt->btt_disk);
return 0;

Privacy Policy