@@ -254,8 +254,9 @@ static unsigned long blk_sector_sizes[] = { 512, 520, 528, 4096, 4104, 4160, 422
static unsigned long pmem_sector_sizes[] = { 512, 4096 };
static unsigned long io_sector_sizes[] = { 0 };
+/* region 0 consist of two interleaved dimms*/
static struct namespace namespace0_pmem0 = {
- 0, "namespace_pmem", &btt_settings, &pfn_settings, &dax_settings, SZ_18M,
+ 0, "namespace_pmem", &btt_settings, &pfn_settings, &dax_settings, SZ_16M,
{ 1, 1, 1, 1,
1, 1, 1, 1,
1, 1, 1, 1,
@@ -263,8 +264,9 @@ static struct namespace namespace0_pmem0 = {
ARRAY_SIZE(pmem_sector_sizes), pmem_sector_sizes,
};
+/* region 1 consist of 4 interleaved dimms*/
static struct namespace namespace1_pmem0 = {
- 0, "namespace_pmem", &btt_settings, &pfn_settings, &dax_settings, SZ_20M,
+ 0, "namespace_pmem", &btt_settings, &pfn_settings, &dax_settings, SZ_16M,
{ 2, 2, 2, 2,
2, 2, 2, 2,
2, 2, 2, 2,
@@ -349,7 +351,7 @@ static struct region regions0[] = {
[0] = &default_pfn,
},
},
- { { DIMM_HANDLE(0, 0, 0, 0, 0) }, 1, 1, "blk", SZ_18M, SZ_32M,
+ { { DIMM_HANDLE(0, 0, 0, 0, 0) }, 1, 1, "blk", SZ_20M, SZ_32M,
.namespaces = {
[0] = &namespace2_blk0,
[1] = &namespace2_blk1,
@@ -358,7 +360,7 @@ static struct region regions0[] = {
[0] = &default_btt,
},
},
- { { DIMM_HANDLE(0, 0, 0, 0, 1) }, 1, 1, "blk", SZ_18M, SZ_32M,
+ { { DIMM_HANDLE(0, 0, 0, 0, 1) }, 1, 1, "blk", SZ_20M, SZ_32M,
.namespaces = {
[0] = &namespace3_blk0,
[1] = &namespace3_blk1,
@@ -367,7 +369,7 @@ static struct region regions0[] = {
[0] = &default_btt,
},
},
- { { DIMM_HANDLE(0, 0, 1, 0, 0) }, 1, 1, "blk", SZ_27M, SZ_32M,
+ { { DIMM_HANDLE(0, 0, 1, 0, 0) }, 1, 1, "blk", SZ_28M, SZ_32M,
.namespaces = {
[0] = &namespace4_blk0,
},
@@ -375,7 +377,7 @@ static struct region regions0[] = {
[0] = &default_btt,
},
},
- { { DIMM_HANDLE(0, 0, 1, 0, 1) }, 1, 1, "blk", SZ_27M, SZ_32M,
+ { { DIMM_HANDLE(0, 0, 1, 0, 1) }, 1, 1, "blk", SZ_28M, SZ_32M,
.namespaces = {
[0] = &namespace5_blk0,
},
@@ -992,8 +994,8 @@ static int check_btt_size(struct ndctl_btt *btt)
int size_select, sect_select;
unsigned long long expect_table[][2] = {
[0] = {
- [0] = 0x11b5400,
- [1] = 0x8daa000,
+ [0] = 0xfb9400,
+ [1] = 0x7dca000,
},
[1] = {
[0] = 0x13b1400,
@@ -1017,7 +1019,7 @@ static int check_btt_size(struct ndctl_btt *btt)
}
switch (ns_size) {
- case SZ_18M:
+ case SZ_16M:
size_select = 0;
break;
case SZ_20M:
The minimum size of a namespace should be SUB_SECTION_SIZE * interleaved DIMM count. Update the test to use the correct size. Also, adjust the available size of blk namespace using the same interleaved DIMMs to account for the new pmem namespace size. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> --- test/libndctl.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)