linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
* [ndctl PATCH 0/8] Improve support + testing for labels + info-blocks
@ 2019-02-12 21:28 Dan Williams
  2019-02-12 21:28 ` [ndctl PATCH 1/8] ndctl/dimm: Add 'flags' field to read-labels output Dan Williams
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Dan Williams @ 2019-02-12 21:28 UTC (permalink / raw)
  To: linux-nvdimm

As noted in the kernel patches for this issue:

    Lately Linux has encountered platforms that collide Persistent
    Memory regions between each other, specifically cases where
    ->start_pad needed to be non-zero. This lead to commit ae86cbfef381
    "libnvdimm, pfn: Pad pfn namespaces relative to other regions". That
    commit allowed namespaces to be mapped with devm_memremap_pages().
    However dax operations on those configurations currently fail if
    attempted within the ->start_pad range because
    pmem_device->data_offset was still relative to raw resource base not
    relative to the section aligned resource range mapped by
    devm_memremap_pages().

    Luckily __bdev_dax_supported() caught these failures and simply
    disabled dax. However, to fix this situation a non-backwards
    compatible change needs to be made to the interpretation of the
    nd_pfn info-block.  ->start_pad needs to be accounted in
    ->map.map_offset (formerly ->data_offset), and ->map.map_base
    (formerly ->phys_addr) needs to be adjusted to the section aligned
    resource base used to establish ->map.map formerly (formerly
    ->virt_addr).

Towards preventing similar bugs in this area introduce a regression
test "test/collide.sh" to validate support for pre- and post-fixed
kernels. In the course of developing this test a few missing
capabilities and fixes also surfaced.

---

Dan Williams (8):
      ndctl/dimm: Add 'flags' field to read-labels output
      ndctl/dimm: Add --human support to read-labels
      ndctl/build: Drop -Wpointer-arith
      ndctl/namespace: Add read-info-block command
      ndctl/test: Update dax-dev to handle multiple e820 ranges
      ndctl/test: Make dax.sh more robust vs small namespaces
      ndctl/namespace: Always zero info-blocks
      ndctl/test: Test inter-region collision handling


 configure.ac         |    1 
 ndctl/action.h       |    1 
 ndctl/builtin.h      |    1 
 ndctl/check.c        |   20 --
 ndctl/dimm.c         |   21 ++-
 ndctl/namespace.c    |  416 +++++++++++++++++++++++++++++++++++++++++++++++++-
 ndctl/namespace.h    |   51 ++++++
 ndctl/ndctl.c        |    1 
 test/Makefile.am     |    1 
 test/collide.sh      |  226 +++++++++++++++++++++++++++
 test/dax-dev.c       |   17 ++
 test/dax.sh          |    4 
 test/fsdax-info0.xxd |   11 +
 test/fsdax-info1.xxd |   11 +
 test/fsdax-info2.xxd |   11 +
 test/fsdax-info3.xxd |   11 +
 util/fletcher.h      |    1 
 util/size.h          |    1 
 18 files changed, 763 insertions(+), 43 deletions(-)
 create mode 100755 test/collide.sh
 create mode 100644 test/fsdax-info0.xxd
 create mode 100644 test/fsdax-info1.xxd
 create mode 100644 test/fsdax-info2.xxd
 create mode 100644 test/fsdax-info3.xxd
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-03-19 23:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-12 21:28 [ndctl PATCH 0/8] Improve support + testing for labels + info-blocks Dan Williams
2019-02-12 21:28 ` [ndctl PATCH 1/8] ndctl/dimm: Add 'flags' field to read-labels output Dan Williams
2019-02-12 21:28 ` [ndctl PATCH 2/8] ndctl/dimm: Add --human support to read-labels Dan Williams
2019-03-19 22:39   ` Verma, Vishal L
2019-03-19 22:51     ` Dan Williams
2019-02-12 21:29 ` [ndctl PATCH 3/8] ndctl/build: Drop -Wpointer-arith Dan Williams
2019-02-12 21:29 ` [ndctl PATCH 4/8] ndctl/namespace: Add read-info-block command Dan Williams
2019-03-19 23:11   ` Verma, Vishal L
2019-02-12 21:29 ` [ndctl PATCH 5/8] ndctl/test: Update dax-dev to handle multiple e820 ranges Dan Williams
2019-02-12 21:29 ` [ndctl PATCH 6/8] ndctl/test: Make dax.sh more robust vs small namespaces Dan Williams
2019-02-12 21:29 ` [ndctl PATCH 7/8] ndctl/namespace: Always zero info-blocks Dan Williams
2019-02-12 21:29 ` [ndctl PATCH 8/8] ndctl/test: Test inter-region collision handling Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).