Lines Matching refs:region
27 libnvdimm: region
28 libndctl: region enumeration example
182 regions. For simplicity a DIMM is allowed a PMEM "region" per each
226 by a region device with a dynamically assigned id (REGION0 - REGION5).
432 "nstype" indicates the integer type of namespace-device this region
436 the case where the region is defined by a SPA.
438 LIBNVDIMM: region
470 LIBNDCTL: region enumeration example
472 Sample region retrieval routines based on NFIT-unique data like
479 struct ndctl_region *region;
481 ndctl_region_foreach(bus, region) {
482 if (ndctl_region_get_type(region) != ND_DEVICE_REGION_PMEM)
484 if (ndctl_region_get_spa_index(region) == spa_index)
485 return region;
493 struct ndctl_region *region;
495 ndctl_region_foreach(bus, region) {
498 if (ndctl_region_get_type(region) != ND_DEVICE_REGION_BLOCK)
500 ndctl_mapping_foreach(region, map) {
504 return region;
518 region-attributes for four reasons:
524 implementations. The exact distinction of what a region contains is in
525 the region-attributes not the region-name or the region-devtype.
527 2. A region with zero child-namespaces is a possible configuration. For
539 region-types. Userspace can always rely on the generic region
546 region than a device name. See the next section, How Do I Determine the
558 The whole point of region/namespace device type differentiation is to
566 In fact, a vendor may also want to have a vendor-specific region-driver
568 format it would need its own region driver to parse that LABEL and emit
570 accurate than a region-name or region-devtype.
589 ...and is available as a region attribute, but keep in mind that the
595 As it currently stands a BLK-aperture region will never have a
596 "nfit/spa_index" attribute, but neither will a non-NFIT PMEM region. A
597 BLK region with a "mappings" value of 0 is, as mentioned above, a DIMM
598 that does not allow I/O. A PMEM region with a "mappings" value of zero
659 Namespaces are indexed relative to their parent region, example below.
664 static struct ndctl_namespace *get_namespace_by_id(struct ndctl_region *region,
669 ndctl_namespace_foreach(region, ndns)
678 region has enough available capacity to create a new namespace.
685 static int configure_namespace(struct ndctl_region *region,
692 ndctl_region_get_id(region), paramaters->id);
725 Every region will start out with at least one BTT device which is the
728 nd_blk driver depending on the region type.
743 region. Each time this "seed" btt device is configured and enabled a new
747 static struct ndctl_btt *get_idle_btt(struct ndctl_region *region)
751 ndctl_btt_foreach(region, btt)
759 static int configure_btt(struct ndctl_region *region,
762 btt = get_idle_btt(region);
774 the region.