1. 11 12月, 2016 1 次提交
  2. 06 12月, 2016 1 次提交
  3. 05 12月, 2016 3 次提交
  4. 29 11月, 2016 2 次提交
    • N
      libnvdimm, namespace: fix the type of name variable · 238b323a
      Nicolas Iooss 提交于
      In create_namespace_blk(), the local variable "name" is defined as an
      array of NSLABEL_NAME_LEN pointers:
      
          char *name[NSLABEL_NAME_LEN];
      
      This variable is then used in calls to memcpy() and kmemdup() as if it
      were char[NSLABEL_NAME_LEN]. Remove the star in the variable definition
      to makes it look right.
      Signed-off-by: NNicolas Iooss <nicolas.iooss_linux@m4x.org>
      Reviewed-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      238b323a
    • D
      libnvdimm: use consistent naming for request_mem_region() · 450c6633
      Dan Williams 提交于
      Here is an example /proc/iomem listing for a system with 2 namespaces,
      one in "sector" mode and one in "memory" mode:
      
        1fc000000-2fbffffff : Persistent Memory (legacy)
          1fc000000-2fbffffff : namespace1.0
        340000000-34fffffff : Persistent Memory
          340000000-34fffffff : btt0.1
      
      Here is the corresponding ndctl listing:
      
        # ndctl list
        [
          {
            "dev":"namespace1.0",
            "mode":"memory",
            "size":4294967296,
            "blockdev":"pmem1"
          },
          {
            "dev":"namespace0.0",
            "mode":"sector",
            "size":267091968,
            "uuid":"f7594f86-badb-4592-875f-ded577da2eaf",
            "sector_size":4096,
            "blockdev":"pmem0s"
          }
        ]
      
      Notice that the ndctl listing is purely in terms of namespace devices,
      while the iomem listing leaks the internal "btt0.1" implementation
      detail. Given that ndctl requires the namespace device name to change
      the mode, for example:
      
        # ndctl create-namespace --reconfig=namespace0.0 --mode=raw --force
      
      ...use the namespace name in the iomem listing to keep the claiming
      device name consistent across different mode settings.
      
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      450c6633
  5. 12 11月, 2016 2 次提交
  6. 19 10月, 2016 2 次提交
    • D
      libnvdimm: allow a platform to force enable label support · 42237e39
      Dan Williams 提交于
      Platforms like QEMU-KVM implement an NFIT table and label DSMs.
      However, since that environment does not define an aliased
      configuration, the labels are currently ignored and the kernel registers
      a single full-sized pmem-namespace per region. Now that the kernel
      supports sub-divisions of pmem regions the labels have a purpose.
      Arrange for the labels to be honored when we find an existing / valid
      namespace index block.
      
      Cc: <qemu-devel@nongnu.org>
      Cc: Haozhong Zhang <haozhong.zhang@intel.com>
      Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      42237e39
    • T
      libnvdimm: use generic iostat interfaces · 8d7c22ac
      Toshi Kani 提交于
      nd_iostat_start() and nd_iostat_end() implement the same functionality
      that generic_start_io_acct() and generic_end_io_acct() already provide.
      
      Change nd_iostat_start() and nd_iostat_end() to call the generic iostat
      interfaces.  There is no change in the nd interfaces.
      Signed-off-by: NToshi Kani <toshi.kani@hpe.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      8d7c22ac
  7. 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
  8. 06 10月, 2016 2 次提交
  9. 01 10月, 2016 5 次提交
  10. 25 9月, 2016 1 次提交
  11. 22 9月, 2016 3 次提交
  12. 19 9月, 2016 1 次提交
  13. 10 9月, 2016 1 次提交
  14. 02 9月, 2016 2 次提交
  15. 30 8月, 2016 1 次提交
  16. 09 8月, 2016 1 次提交
  17. 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