diff options
author | Vishal Verma <vishal.l.verma@intel.com> | 2016-07-28 01:38:59 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-08-08 19:26:14 +0300 |
commit | abe8b4e3cef88b8202641d63f5ad58141b970b0f (patch) | |
tree | b52e23c0f87ac191907395db7d5fae85fd1383f7 /drivers/nvdimm/btt.c | |
parent | 68202c9f0ad6e16ee806fbadbc5838d55fe5aa5c (diff) | |
download | linux-abe8b4e3cef88b8202641d63f5ad58141b970b0f.tar.xz |
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.c | 1 |
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; |