{
  "slug": "ubi-fastmap",
  "term": "UBI Fastmap",
  "aliases": [
    "UBI fast attach"
  ],
  "definition": "UBI Fastmap stores an on-flash checkpoint of volume mappings and eraseblock state to reduce scanning when attaching a UBI device.",
  "note": "Fastmap reconstructs UBI state below UBIFS; it is not a filesystem index or a backup. On its Fastmap attach path, Linux v6.16 searches the first 64 physical eraseblocks for an anchor, then reads the checkpoint and scans pools for later changes. The anchor region is not a limit of 64 total reads. [attach] [checkpoint] [format]\n\nFallback: a missing Fastmap continues ordinary scanning after the searched prefix. An invalid Fastmap or an uncorrectable ECC error returned from this path causes a fresh scan; other negative errors can fail attachment. Devices with at most 64 physical eraseblocks force a full scan. Debug verification can also scan the whole device after a successful Fastmap attach. [attach]\n\nConfiguration: Linux v6.16 labels CONFIG_MTD_UBI_FASTMAP experimental and defaults it off. fm_autoconvert controls creation on images without Fastmap, while a per-device disable flag forces scanning even if a checkpoint exists. Build support alone does not establish the active path. [config] [setup]\n\nCost: space is reserved for two Fastmaps, and each checkpoint can span multiple blocks. Its calculated size includes terms proportional to the physical eraseblock count. Reduced scanning does not imply constant total startup time or eliminate upper-layer recovery. [config] [checkpoint]",
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "related": [
    "ubi",
    "ubifs",
    "mtd",
    "nand-erase-block"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-30",
  "citations": [
    {
      "id": "config",
      "title": "Linux v6.16, UBI Fastmap configuration and reserved eraseblocks",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/drivers/mtd/ubi/Kconfig",
      "accessed": "2026-11-30"
    },
    {
      "id": "attach",
      "title": "Linux v6.16, scan_fast and ubi_attach: discovery, fallback and errors",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/drivers/mtd/ubi/attach.c",
      "accessed": "2026-11-30"
    },
    {
      "id": "checkpoint",
      "title": "Linux v6.16, ubi_calc_fm_size and scan_pool: checkpoint size and changed blocks",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/drivers/mtd/ubi/fastmap.c",
      "accessed": "2026-11-30"
    },
    {
      "id": "setup",
      "title": "Linux v6.16, UBI setup: Fastmap conversion and per-device disable flag",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/drivers/mtd/ubi/build.c",
      "accessed": "2026-11-30"
    },
    {
      "id": "format",
      "title": "Linux v6.16, UBI_FM_MAX_START: Fastmap anchor-search region",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/drivers/mtd/ubi/ubi-media.h",
      "accessed": "2026-11-30"
    }
  ],
  "provenance": [
    "Source review pinned to Linux v6.16; no hardware, attach-time or power-loss experiment was performed.",
    "UBI Fastmap is unrelated to the FastMap mmap research system. The configuration label is not a claim that the implementation is absent."
  ]
}
