Nick noticed that his implementation of the isetcookie calculation was producing different results than the Linux enabling. Linux is broken in its usage of memcmp() to sort the components of an array that is hashed by a fletcher64 sum. See patch2 for more details. Patch1 arranges for the unit test infrastructure to produce data that sorts differently under the two schemes. The original simulated data was masking this problem. This implementation is tested with a new "ndctl write-labels" command. It allows namespace labels with broken cookie values to be written and validate that the compatibility code behaves as expected. --- Dan Williams (2): tools/testing/nvdimm: make iset cookie predictable nfit, libnvdimm: fix interleave set cookie calculation drivers/acpi/nfit/core.c | 16 +++++++++++++++- drivers/nvdimm/namespace_devs.c | 18 ++++++++++++++---- drivers/nvdimm/nd.h | 1 + drivers/nvdimm/region_devs.c | 9 +++++++++ include/linux/libnvdimm.h | 2 ++ tools/testing/nvdimm/test/nfit.c | 14 +++++++------- 6 files changed, 48 insertions(+), 12 deletions(-)