diff options
author | Vishal Verma <vishal.l.verma@intel.com> | 2017-08-30 21:36:01 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2017-08-31 18:05:10 -0400 |
commit | 75892004508260df72ed3d319f10d2acd516220e (patch) | |
tree | 773a223d84c3b39c6440b030f56597e95f96842c | |
parent | 1398199d849047c59acef0c04e550b47bb9b4be6 (diff) |
libnvdimm, btt: cache sector_size in arena_info
In preparation for the error clearing rework, add sector_size in the
arena_info struct.
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | drivers/nvdimm/btt.c | 1 | ||||
-rw-r--r-- | drivers/nvdimm/btt.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 15d1b071746b..9c96530ea6d5 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c | |||
@@ -566,6 +566,7 @@ static struct arena_info *alloc_arena(struct btt *btt, size_t size, | |||
566 | if (!arena) | 566 | if (!arena) |
567 | return NULL; | 567 | return NULL; |
568 | arena->nd_btt = btt->nd_btt; | 568 | arena->nd_btt = btt->nd_btt; |
569 | arena->sector_size = btt->sector_size; | ||
569 | 570 | ||
570 | if (!size) | 571 | if (!size) |
571 | return arena; | 572 | return arena; |
diff --git a/drivers/nvdimm/btt.h b/drivers/nvdimm/btt.h index 09fabf5a5590..2bc0d10b8438 100644 --- a/drivers/nvdimm/btt.h +++ b/drivers/nvdimm/btt.h | |||
@@ -108,6 +108,7 @@ struct aligned_lock { | |||
108 | * handle incoming writes. | 108 | * handle incoming writes. |
109 | * @version_major: Metadata layout version major. | 109 | * @version_major: Metadata layout version major. |
110 | * @version_minor: Metadata layout version minor. | 110 | * @version_minor: Metadata layout version minor. |
111 | * @sector_size: The Linux sector size - 512 or 4096 | ||
111 | * @nextoff: Offset in bytes to the start of the next arena. | 112 | * @nextoff: Offset in bytes to the start of the next arena. |
112 | * @infooff: Offset in bytes to the info block of this arena. | 113 | * @infooff: Offset in bytes to the info block of this arena. |
113 | * @dataoff: Offset in bytes to the data area of this arena. | 114 | * @dataoff: Offset in bytes to the data area of this arena. |
@@ -135,6 +136,7 @@ struct arena_info { | |||
135 | u32 nfree; | 136 | u32 nfree; |
136 | u16 version_major; | 137 | u16 version_major; |
137 | u16 version_minor; | 138 | u16 version_minor; |
139 | u32 sector_size; | ||
138 | /* Byte offsets to the different on-media structures */ | 140 | /* Byte offsets to the different on-media structures */ |
139 | u64 nextoff; | 141 | u64 nextoff; |
140 | u64 infooff; | 142 | u64 infooff; |