1. 28 10月, 2016 1 次提交
    • A
      nvdimm: make CONFIG_NVDIMM_DAX 'bool' · 867dfe34
      Arnd Bergmann 提交于
      A bugfix just tried to address a randconfig build problem and introduced
      a variant of the same problem: with CONFIG_LIBNVDIMM=y and
      CONFIG_NVDIMM_DAX=m, the nvdimm module now fails to link:
      
      drivers/nvdimm/built-in.o: In function `to_nd_device_type':
      bus.c:(.text+0x1b5d): undefined reference to `is_nd_dax'
      drivers/nvdimm/built-in.o: In function `nd_region_notify_driver_action.constprop.2':
      region_devs.c:(.text+0x6b6c): undefined reference to `is_nd_dax'
      region_devs.c:(.text+0x6b8c): undefined reference to `to_nd_dax'
      drivers/nvdimm/built-in.o: In function `nd_region_probe':
      region.c:(.text+0x70f3): undefined reference to `nd_dax_create'
      drivers/nvdimm/built-in.o: In function `mode_show':
      namespace_devs.c:(.text+0xa196): undefined reference to `is_nd_dax'
      drivers/nvdimm/built-in.o: In function `nvdimm_namespace_common_probe':
      (.text+0xa55f): undefined reference to `is_nd_dax'
      drivers/nvdimm/built-in.o: In function `nvdimm_namespace_common_probe':
      (.text+0xa56e): undefined reference to `to_nd_dax'
      
      This reverts the earlier fix, making NVDIMM_DAX a 'bool' option again
      as it should be (it gets linked into the libnvdimm module). To fix
      the original problem, I'm adding a dependency on LIBNVDIMM to
      DEV_DAX_PMEM, which ensures we can't have that one built-in if the
      rest is a module.
      
      Fixes: 4e65e938 ("/dev/dax: fix Kconfig dependency build breakage")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      867dfe34
  2. 20 10月, 2016 2 次提交
  3. 08 10月, 2016 10 次提交
    • R
      /dev/dax: fix Kconfig dependency build breakage · 4e65e938
      Ross Zwisler 提交于
      The function dax_pmem_probe() in drivers/dax/pmem.c is compiled under the
      CONFIG_DEV_DAX_PMEM tri-state config option.  This config option currently
      only depends on CONFIG_NVDIMM_DAX, a bool, which means that the following
      configuration is possible:
      
      CONFIG_LIBNVDIMM=m
      ...
      CONFIG_NVDIMM_DAX=y
      CONFIG_DEV_DAX=y
      CONFIG_DEV_DAX_PMEM=y
      
      With this config LIBNVDIMM is compiled as a module with NVDIMM_DAX=y just
      meaning that we will compile drivers/nvdimm/dax_devs.c into that module.
      However, dax_pmem_probe() depends on several symbols defined in
      drivers/nvdimm/dax_devs.c, which results in the following build errors:
      
      drivers/built-in.o: In function `dax_pmem_probe':
      linux/drivers/dax/pmem.c:70: undefined reference to `to_nd_dax'
      linux/drivers/dax/pmem.c:74: undefined reference to
      `nvdimm_namespace_common_probe'
      linux/drivers/dax/pmem.c:80: undefined reference to `devm_nsio_enable'
      linux/drivers/dax/pmem.c:81: undefined reference to `nvdimm_setup_pfn'
      linux/drivers/dax/pmem.c:84: undefined reference to `devm_nsio_disable'
      linux/drivers/dax/pmem.c:122: undefined reference to `to_nd_region'
      drivers/built-in.o: In function `dax_pmem_init':
      linux/drivers/dax/pmem.c:147: undefined reference to `__nd_driver_register'
      
      Fix this by making NVDIMM_DAX a tristate.  DEV_DAX_PMEM depends on
      NVDIMM_DAX which depends on LIBNVDIMM.  Since they are all now tristates,
      if LIBNVDIMM is built as a kernel module DEV_DAX_PMEM will be as well.
      This prevents dax_devs.c from being built as a built-in while its
      dependencies are in the libnvdimm.ko module.
      Signed-off-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      4e65e938
    • D
      libnvdimm, namespace: allow creation of multiple pmem-namespaces per region · 98a29c39
      Dan Williams 提交于
      Similar to BLK regions, publish new seed namespace devices to allow
      unused PMEM region capacity to be consumed by additional namespaces.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      98a29c39
    • D
      libnvdimm, namespace: lift single pmem limit in scan_labels() · 991d9020
      Dan Williams 提交于
      Now that the rest of the infrastructure has been converted to handle
      multi-pmem configurations, lift the artificial barrier at scan time.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      991d9020
    • D
      libnvdimm, namespace: filter out of range labels in scan_labels() · c969e24c
      Dan Williams 提交于
      Short-circuit doomed-to-fail label validation attempts by skipping
      labels that are outside the given region.  For example a DIMM that has
      multiple PMEM regions will waste time attempting to create namespaces
      only to find that the interleave-set-cookie does not validate, e.g.:
      
          nd_region region6: invalid cookie in label: 73e608dc-47b9-4b2a-b5c7-2d55a32e0c2
      
      Similar to how we skip BLK labels when performing PMEM validation we can
      skip out-of-range labels early.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      c969e24c
    • D
      libnvdimm, namespace: enable allocation of multiple pmem namespaces · 762d067d
      Dan Williams 提交于
      Now that we have nd_region_available_dpa() able to handle the presence
      of multiple PMEM allocations in aliased PMEM regions, reuse that same
      infrastructure to track allocations from free space.  In particular
      handle allocating from an aliased PMEM region in the case where there
      are dis-contiguous holes.  The allocation for BLK and PMEM are
      documented in the space_valid() helper:
      
          BLK-space is valid as long as it does not precede a PMEM
          allocation in a given region. PMEM-space must be contiguous
          and adjacent to an existing existing allocation (if one
          exists).
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      762d067d
    • D
      libnvdimm, namespace: update label implementation for multi-pmem · 16660eae
      Dan Williams 提交于
      Instead of assuming that there will only ever be one allocated range at
      the start of the region, account for additional namespaces that might
      start at an offset from the region base.
      
      After this change pmem namespaces now have a reason to carry an array of
      resources similar to blk.  Unifying the resource tracking infrastructure
      in nd_namespace_common is a future cleanup candidate.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      16660eae
    • D
      libnvdimm, namespace: expand pmem device naming scheme for multi-pmem · 01220733
      Dan Williams 提交于
      pmem devices are currently named /dev/pmem<region-index>. Preserve the
      naming of the 0th device, but add a ".<namespace-index>" for other
      devices.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      01220733
    • D
      libnvdimm, region: update nd_region_available_dpa() for multi-pmem support · a1f3e4d6
      Dan Williams 提交于
      The free dpa (dimm-physical-address) space calculation reports how much
      free space is available with consideration for aliased BLK + PMEM
      regions.  Recall that BLK capacity is allocated from high addresses and
      PMEM is allocated from low addresses in their respective regions.
      
      nd_region_available_dpa() accounts for the fact that the largest
      encroachment (lowest starting address) into PMEM capacity by a BLK
      allocation limits the available capacity to that point, regardless if
      there is BLK allocation hole at a higher address.  Similarly, for the
      multi-pmem case we need to track the largest encroachment (highest
       ending address) of a PMEM allocation in BLK capacity regardless of
      whether there is an allocation hole that a BLK allocation could fill at
      a lower address.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      a1f3e4d6
    • D
      libnvdimm, namespace: sort namespaces by dpa at init · 6ff3e912
      Dan Williams 提交于
      Add more determinism to initial namespace device-name assignments by
      sorting the namespaces by starting dpa.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      6ff3e912
    • D
      libnvdimm, namespace: allow multiple pmem-namespaces per region at scan time · 0e3b0d12
      Dan Williams 提交于
      If label scanning finds multiple valid pmem namespaces allow them to be
      surfaced rather than fail namespace scanning. Support for creating
      multiple namespaces per region is saved for a later patch.
      
      Note that this adds some new error messages to clarify which of the pmem
      namespaces in the set are potentially impacted by invalid labels.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      0e3b0d12
  4. 06 10月, 2016 2 次提交
  5. 01 10月, 2016 5 次提交
  6. 25 9月, 2016 1 次提交
  7. 22 9月, 2016 3 次提交
  8. 19 9月, 2016 1 次提交
  9. 10 9月, 2016 1 次提交
  10. 02 9月, 2016 2 次提交
  11. 30 8月, 2016 1 次提交
  12. 09 8月, 2016 1 次提交
  13. 08 8月, 2016 2 次提交
    • J
      block: rename bio bi_rw to bi_opf · 1eff9d32
      Jens Axboe 提交于
      Since commit 63a4cc24, bio->bi_rw contains flags in the lower
      portion and the op code in the higher portions. This means that
      old code that relies on manually setting bi_rw is most likely
      going to be broken. Instead of letting that brokeness linger,
      rename the member, to force old and out-of-tree code to break
      at compile time instead of at runtime.
      
      No intended functional changes in this commit.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      1eff9d32
    • J
      block/mm: make bdev_ops->rw_page() take a bool for read/write · c11f0c0b
      Jens Axboe 提交于
      Commit abf54548 changed it from an 'rw' flags type to the
      newer ops based interface, but now we're effectively leaking
      some bdev internals to the rest of the kernel. Since we only
      care about whether it's a read or a write at that level, just
      pass in a bool 'is_write' parameter instead.
      
      Then we can also move op_is_write() and friends back under
      CONFIG_BLOCK protection.
      Reviewed-by: NMike Christie <mchristi@redhat.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      c11f0c0b
  14. 05 8月, 2016 1 次提交
  15. 24 7月, 2016 4 次提交
  16. 22 7月, 2016 1 次提交
  17. 21 7月, 2016 1 次提交
  18. 13 7月, 2016 1 次提交
    • D
      pmem: kill __pmem address space · 7a9eb206
      Dan Williams 提交于
      The __pmem address space was meant to annotate codepaths that touch
      persistent memory and need to coordinate a call to wmb_pmem().  Now that
      wmb_pmem() is gone, there is little need to keep this annotation.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      7a9eb206