1. 07 3月, 2018 1 次提交
  2. 03 2月, 2018 1 次提交
  3. 08 10月, 2017 1 次提交
  4. 29 9月, 2017 1 次提交
  5. 19 9月, 2017 1 次提交
    • D
      libnvdimm, namespace: fix btt claim class crash · 33a56086
      Dan Williams 提交于
      Maurice reports:
      
          BUG: unable to handle kernel NULL pointer dereference at 0000000000000028
          IP: holder_class_store+0x253/0x2b0 [libnvdimm]
      
      ...while trying to reconfigure an NVDIMM-N namespace into 'sector' /
      'btt' mode. The crash points to this line:
      
          (gdb) li *(holder_class_store+0x253)
          0x7773 is in holder_class_store (drivers/nvdimm/namespace_devs.c:1420).
          1415            for (i = 0; i < nd_region->ndr_mappings; i++) {
          1416                    struct nd_mapping *nd_mapping = &nd_region->mapping[i];
          1417                    struct nvdimm_drvdata *ndd = to_ndd(nd_mapping);
          1418                    struct nd_namespace_index *nsindex;
          1419
          1420                    nsindex = to_namespace_index(ndd, ndd->ns_current);
      
      ...where we are failing because ndd is NULL due to NVDIMM-N dimms not
      supporting labels.
      
      Long story short, default to the BTTv1 format in the label-less /
      NVDIMM-N case.
      
      Fixes: 14e49454 ("libnvdimm, btt: BTT updates for UEFI 2.7 format")
      Cc: <stable@vger.kernel.org>
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Reported-by: NMaurice A. Saldivar <maurice.a.saldivar@hpe.com>
      Tested-by: NMaurice A. Saldivar <maurice.a.saldivar@hpe.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      33a56086
  6. 12 8月, 2017 1 次提交
  7. 30 6月, 2017 1 次提交
  8. 28 6月, 2017 2 次提交
    • D
      libnvdimm, nfit: enable support for volatile ranges · c9e582aa
      Dan Williams 提交于
      Allow volatile nfit ranges to participate in all the same infrastructure
      provided for persistent memory regions. A resulting resulting namespace
      device will still be called "pmem", but the parent region type will be
      "nd_volatile". This is in preparation for disabling the dax ->flush()
      operation in the pmem driver when it is hosted on a volatile range.
      
      Cc: Jan Kara <jack@suse.cz>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      c9e582aa
    • D
      x86, libnvdimm, pmem: remove global pmem api · ca6a4657
      Dan Williams 提交于
      Now that all callers of the pmem api have been converted to dax helpers that
      call back to the pmem driver, we can remove include/linux/pmem.h and
      asm/pmem.h.
      
      Cc: <x86@kernel.org>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Toshi Kani <toshi.kani@hpe.com>
      Cc: Oliver O'Halloran <oohall@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      ca6a4657
  9. 16 6月, 2017 5 次提交
  10. 05 5月, 2017 2 次提交
  11. 01 3月, 2017 1 次提交
    • D
      nfit, libnvdimm: fix interleave set cookie calculation · 86ef58a4
      Dan Williams 提交于
      The interleave-set cookie is a sum that sanity checks the composition of
      an interleave set has not changed from when the namespace was initially
      created.  The checksum is calculated by sorting the DIMMs by their
      location in the interleave-set. The comparison for the sort must be
      64-bit wide, not byte-by-byte as performed by memcmp() in the broken
      case.
      
      Fix the implementation to accept correct cookie values in addition to
      the Linux "memcmp" order cookies, but only allow correct cookies to be
      generated going forward. It does mean that namespaces created by
      third-party-tooling, or created by newer kernels with this fix, will not
      validate on older kernels. However, there are a couple mitigating
      conditions:
      
          1/ platforms with namespace-label capable NVDIMMs are not widely
             available.
      
          2/ interleave-sets with a single-dimm are by definition not affected
             (nothing to sort). This covers the QEMU-KVM NVDIMM emulation case.
      
      The cookie stored in the namespace label will be fixed by any write the
      namespace label, the most straightforward way to achieve this is to
      write to the "alt_name" attribute of a namespace in sysfs.
      
      Cc: <stable@vger.kernel.org>
      Fixes: eaf96153 ("libnvdimm, nfit: add interleave-set state-tracking infrastructure")
      Reported-by: NNicholas Moulin <nicholas.w.moulin@linux.intel.com>
      Tested-by: NNicholas Moulin <nicholas.w.moulin@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      86ef58a4
  12. 01 2月, 2017 2 次提交
    • D
      libnvdimm, namespace: do not delete namespace-id 0 · 9d032f42
      Dan Williams 提交于
      Given that the naming of pmem devices changes from the pmemX form to the
      pmemX.Y form when namespace id is greater than 0, arrange for namespaces
      with id-0 to be exempt from deletion. Otherwise a simple reconfiguration
      of an existing namespace to a new mode results in a name change of the
      resulting block device:
      
          # ndctl list --namespace=namespace1.0
          {
            "dev":"namespace1.0",
            "mode":"raw",
            "size":2147483648,
            "uuid":"3dadf3dc-89b9-4b24-b20e-abc8a4707ce3",
            "blockdev":"pmem1"
          }
      
          # ndctl create-namespace --reconfig=namespace1.0 --mode=memory --force
          {
            "dev":"namespace1.1",
            "mode":"memory",
            "size":2111832064,
            "uuid":"7b4a6341-7318-4219-a02c-fb57c0bbf613",
            "blockdev":"pmem1.1"
          }
      
      This change does require tooling changes to explicitly look for
      namespaceX.0 if the seed has already advanced to another namespace.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 98a29c39 ("libnvdimm, namespace: allow creation of multiple pmem-namespaces per region")
      Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      9d032f42
    • B
      nvdimm: constify device_type structures · 970d14e3
      Bhumika Goyal 提交于
      Declare device_type structure as const as it is only stored in the
      type field of a device structure. This field is of type const, so add
      const to declaration of device_type structure.
      
      File size before:
        text	   data	    bss	    dec	    hex	filename
        19278	   3199	     16	  22493	   57dd	nvdimm/namespace_devs.o
      
      File size after:
        text	   data	    bss	    dec	    hex	filename
        19929	   3160	     16	  23105	   5a41	nvdimm/namespace_devs.o
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      970d14e3
  13. 14 1月, 2017 1 次提交
  14. 16 12月, 2016 1 次提交
  15. 05 12月, 2016 1 次提交
  16. 29 11月, 2016 1 次提交
  17. 20 10月, 2016 1 次提交
  18. 08 10月, 2016 7 次提交
  19. 06 10月, 2016 2 次提交
  20. 01 10月, 2016 1 次提交
  21. 22 9月, 2016 1 次提交
  22. 02 9月, 2016 1 次提交
  23. 10 5月, 2016 1 次提交
    • D
      libnvdimm, dax: introduce device-dax infrastructure · cd03412a
      Dan Williams 提交于
      Device DAX is the device-centric analogue of Filesystem DAX
      (CONFIG_FS_DAX).  It allows persistent memory ranges to be allocated and
      mapped without need of an intervening file system.  This initial
      infrastructure arranges for a libnvdimm pfn-device to be represented as
      a different device-type so that it can be attached to a driver other
      than the pmem driver.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      cd03412a
  24. 23 4月, 2016 1 次提交
  25. 06 3月, 2016 1 次提交
  26. 27 1月, 2016 1 次提交