]> Git Repo - linux.git/commitdiff
Merge tag 'libnvdimm-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdim...
authorLinus Torvalds <[email protected]>
Thu, 25 Oct 2018 13:31:56 +0000 (06:31 -0700)
committerLinus Torvalds <[email protected]>
Thu, 25 Oct 2018 13:31:56 +0000 (06:31 -0700)
Pull libnvdimm updates from Dan Williams:

 - Improve the efficiency and performance of reading nvdimm-namespace
   labels. Reduce the amount of label data read at driver load time by a
   few orders of magnitude. Reduce heavyweight call-outs to
   platform-firmware routines.

 - Handle media errors located in the 'struct page' array stored on a
   persistent memory namespace. Let the kernel clear these errors rather
   than an awkward userspace workaround.

 - Fix Address Range Scrub (ARS) completion tracking. Correct occasions
   where the kernel indicates completion of ARS before submission.

 - Fix asynchronous device registration reference counting.

 - Add support for reporting an nvdimm dirty-shutdown-count via sysfs.

 - Fix various small libnvdimm core and uapi issues.

* tag 'libnvdimm-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (21 commits)
  acpi, nfit: Further restrict userspace ARS start requests
  acpi, nfit: Fix Address Range Scrub completion tracking
  UAPI: ndctl: Remove use of PAGE_SIZE
  UAPI: ndctl: Fix g++-unsupported initialisation in headers
  tools/testing/nvdimm: Populate dirty shutdown data
  acpi, nfit: Collect shutdown status
  acpi, nfit: Introduce nfit_mem flags
  libnvdimm, label: Fix sparse warning
  nvdimm: Use namespace index data to reduce number of label reads needed
  nvdimm: Split label init out from the logic for getting config data
  nvdimm: Remove empty if statement
  nvdimm: Clarify comment in sizeof_namespace_index
  nvdimm: Sanity check labeloff
  libnvdimm, dimm: Maximize label transfer size
  libnvdimm, pmem: Fix badblocks population for 'raw' namespaces
  libnvdimm, namespace: Drop the repeat assignment for variable dev->parent
  libnvdimm, region: Fail badblocks listing for inactive regions
  libnvdimm, pfn: during init, clear errors in the metadata area
  libnvdimm: Set device node in nd_device_register
  libnvdimm: Hold reference on parent while scheduling async init
  ...

1  2 
drivers/nvdimm/pmem.c

diff --combined drivers/nvdimm/pmem.c
index a75d10c23d80d2dcd76008a45665bb6853690adc,2082ae01b9c8755c8eb52e49ca283d9071ec1db2..0e39e3d1846fe07d7e77bdb2b25439d627b50ffb
@@@ -421,9 -421,11 +421,11 @@@ static int pmem_attach_disk(struct devi
                addr = devm_memremap_pages(dev, &pmem->pgmap);
                pmem->pfn_flags |= PFN_MAP;
                memcpy(&bb_res, &pmem->pgmap.res, sizeof(bb_res));
-       } else
+       } else {
                addr = devm_memremap(dev, pmem->phys_addr,
                                pmem->size, ARCH_MEMREMAP_PMEM);
+               memcpy(&bb_res, &nsio->res, sizeof(bb_res));
+       }
  
        /*
         * At release time the queue must be frozen before
        gendev = disk_to_dev(disk);
        gendev->groups = pmem_attribute_groups;
  
 -      device_add_disk(dev, disk);
 +      device_add_disk(dev, disk, NULL);
        if (devm_add_action_or_reset(dev, pmem_release_disk, pmem))
                return -ENOMEM;
  
This page took 0.077673 seconds and 4 git commands to generate.