@@ -787,6 +787,12 @@ static int check_dax_create(struct ndctl_region *region,
for (i = 0; i < ARRAY_SIZE(dax_s->locs); i++) {
fprintf(stderr, "%s: %ld\n", __func__, ARRAY_SIZE(dax_s->aligns));
for (j = 0; j < ARRAY_SIZE(dax_s->aligns); j++) {
+ /*
+ * The kernel enforces invalidating the previous
+ * info block when the current uuid is does not
+ * validate with the contents of the info block.
+ */
+ dax_s->uuid[0]++;
rc = __check_dax_create(region, ndns, namespace,
dax_s->locs[i], dax_s->aligns[j],
dax_s->uuid);
@@ -923,6 +929,12 @@ static int check_pfn_create(struct ndctl_region *region,
for (i = 0; i < ARRAY_SIZE(pfn_s->locs); i++) {
for (j = 0; j < ARRAY_SIZE(pfn_s->aligns); j++) {
+ /*
+ * The kernel enforces invalidating the previous
+ * info block when the current uuid is does not
+ * validate with the contents of the info block.
+ */
+ pfn_s->uuid[0]++;
rc = __check_pfn_create(region, ndns, namespace, buf,
pfn_s->locs[i], pfn_s->aligns[j],
pfn_s->uuid);
A recent kernel fix addressed cases where a live setting change mismatches with the current contents of the info block. Rather than silently overwrite the new settings with the info block contents the kernel now invalidates the info block if the uuid changes, but otherwise warns if a setting is mismatched. Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- test/libndctl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)