All of lore.kernel.org
 help / color / mirror / Atom feed
* [ndctl PATCH 0/7] ndctl: automatically initialize labels
@ 2017-08-29 20:01 Dan Williams
  2017-08-29 20:01 ` [ndctl PATCH 1/7] ndctl, init-labels: fix '--label-version' option Dan Williams
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Dan Williams @ 2017-08-29 20:01 UTC (permalink / raw)
  To: linux-nvdimm

The QEMU-KVM enabling for a virtual NVDIMM is an example of a
configuration where label-less namespaces are created by default. I.e.
the ACPI NFIT produced by SeaBIOS publishes un-aliased pmem regions. The
first operation an administrator is likely to perform is to reconfigure
the namespace into "memory" mode to enable full-featured DAX support.

The reconfiguration of the label-less namespace into "memory" mode is an
opportunity to also enable labels. This series effectively runs the
following sequence:

    ndctl disable-region all
    ndctl init-labels
    ndctl enabled-region all

...in 'create-namespace' whenever a label-less namespace is encountered.
The implementation is careful to try v1.2 labels and validate that the
kernel supports that scheme. Otherwise, it falls back to v1.1 labels.

For other utilities built on top of libndctl, the following new helpers
are provided to enable a similar flow:

    ndctl_dimm_read_labels()
    ndctl_dimm_validate_labels()
    ndctl_dimm_init_labels()

...where 'read_labels' enables the other apis, 'validate_labels' checks
whether the data retrieved from the read corresponds to a valid set of
namespace label index blocks, and 'init_labels' writes namespace index
blocks to the dimm. In order to check that the kernel supports a given
index block version / format the result from
ndctl_dimm_get_available_labels() can be compared to the result from
ndctl_dimm_init_labels() to make sure the kernel sees the same number of
available slots as userspace.

---

Dan Williams (7):
      ndctl, init-labels: fix '--label-version' option
      ndctl: drop the "libndctl-" prefix on library source files
      ndctl: move label manipulation routines to their own file
      ndctl: consolidate namespace definitions in namespace.h
      ndctl: refactor read_labels() helper into a library call
      ndctl: introduce ndctl_dimm_{validate_labels,init_labels}
      ndctl: auto initialize labels


 Documentation/ndctl/ndctl-create-namespace.txt |    7 
 Makefile.am                                    |    1 
 ndctl/check.c                                  |   52 ++
 ndctl/check.h                                  |  130 ------
 ndctl/dimm.c                                   |  547 +----------------------
 ndctl/lib/Makefile.am                          |   11 
 ndctl/lib/ars.c                                |    2 
 ndctl/lib/dimm.c                               |  565 ++++++++++++++++++++++++
 ndctl/lib/hpe1.c                               |    4 
 ndctl/lib/hpe1.h                               |    0 
 ndctl/lib/libndctl.c                           |  154 -------
 ndctl/lib/libndctl.sym                         |    4 
 ndctl/lib/msft.c                               |    4 
 ndctl/lib/msft.h                               |    0 
 ndctl/lib/private.h                            |  151 +++---
 ndctl/lib/smart.c                              |    2 
 ndctl/libndctl.h.in                            |    9 
 ndctl/namespace.c                              |  101 ++++
 ndctl/namespace.h                              |  163 +++++++
 util/fletcher.c                                |   35 -
 util/fletcher.h                                |   19 +
 21 files changed, 1021 insertions(+), 940 deletions(-)
 delete mode 100644 ndctl/check.h
 rename ndctl/lib/{libndctl-ars.c => ars.c} (99%)
 create mode 100644 ndctl/lib/dimm.c
 rename ndctl/lib/{libndctl-hpe1.c => hpe1.c} (99%)
 rename ndctl/lib/{ndctl-hpe1.h => hpe1.h} (100%)
 rename ndctl/lib/{libndctl-msft.c => msft.c} (98%)
 rename ndctl/lib/{ndctl-msft.h => msft.h} (100%)
 rename ndctl/lib/{libndctl-private.h => private.h} (69%)
 rename ndctl/lib/{libndctl-smart.c => smart.c} (99%)
 create mode 100644 ndctl/namespace.h
 delete mode 100644 util/fletcher.c
_______________________________________________
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:[~2017-08-29 22:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-29 20:01 [ndctl PATCH 0/7] ndctl: automatically initialize labels Dan Williams
2017-08-29 20:01 ` [ndctl PATCH 1/7] ndctl, init-labels: fix '--label-version' option Dan Williams
2017-08-29 20:01 ` [ndctl PATCH 2/7] ndctl: drop the "libndctl-" prefix on library source files Dan Williams
2017-08-29 20:01 ` [ndctl PATCH 3/7] ndctl: move label manipulation routines to their own file Dan Williams
2017-08-29 20:01 ` [ndctl PATCH 4/7] ndctl: consolidate namespace definitions in namespace.h Dan Williams
2017-08-29 20:01 ` [ndctl PATCH 5/7] ndctl: refactor read_labels() helper into a library call Dan Williams
2017-08-29 20:02 ` [ndctl PATCH 6/7] ndctl: introduce ndctl_dimm_{validate_labels, init_labels} Dan Williams
2017-08-29 20:02 ` [ndctl PATCH 7/7] ndctl: auto initialize labels Dan Williams
2017-08-29 21:32   ` Verma, Vishal L
2017-08-29 21:48     ` Dan Williams
2017-08-29 21:52       ` Verma, Vishal L
2017-08-29 22:43         ` Vishal Verma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.