{
  "slug": "ubi-volume-update",
  "term": "UBI volume update",
  "aliases": [
    "UBI_IOCVOLUP",
    "UBI whole-volume update"
  ],
  "definition": "A UBI volume update replaces a volume's contents using a declared byte count and a persistent marker that identifies interrupted replacement.",
  "note": "In Linux v6.16, UBI_IOCVOLUP declares the image length on the volume character device, followed by writes supplying that payload. This is whole-volume replacement, unlike the single-LEB UBI_IOCEBCH operation. [uapi]\n\nThe update marker is stored before old logical eraseblocks are unmapped. An interrupted replacement can leave the marker set and ordinary I/O restricted until another update; the old image is not automatically restored. A zero-byte update still wipes the volume, so it is not a harmless capability probe. [update]\n\nClosing with payload missing does not finish the update. A write extending past the declared length is limited to the remaining bytes; callers must inspect returned counts and errors. [character] [update]\n\nAfter payload completion, ubi_check_volume scans static-volume data with CRC checks but skips dynamic volumes. A positive corruption result sets the corrupted flag while the final write can still return its byte count; negative check errors are returned. Successful input delivery alone is therefore not an integrity verdict. [check] [character]\n\nFor read-only diagnostics, Linux v6.16 exposes upd_marker and corrupted under /sys/class/ubi/ubiX_Y/. The sysfs handler reports two separate in-memory flags; reading them does not perform a fresh integrity scan, and separate reads are not an atomic snapshot. A cleared upd_marker alone is not an integrity verdict. [sysfs] [check]",
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "related": [
    "ubi",
    "ubi-atomic-leb-change",
    "ubifs"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-12-01",
  "citations": [
    {
      "id": "uapi",
      "title": "Linux v6.16, UBI userspace volume-update and atomic-LEB-change contracts",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/include/uapi/mtd/ubi-user.h",
      "accessed": "2026-11-30"
    },
    {
      "id": "update",
      "title": "Linux v6.16, ubi_start_update and ubi_more_update_data",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/drivers/mtd/ubi/upd.c",
      "accessed": "2026-11-30"
    },
    {
      "id": "character",
      "title": "Linux v6.16, vol_cdev_release and vol_cdev_write",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/drivers/mtd/ubi/cdev.c",
      "accessed": "2026-11-30"
    },
    {
      "id": "check",
      "title": "Linux v6.16, ubi_check_volume: static-volume CRC scan and dynamic-volume bypass",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/drivers/mtd/ubi/misc.c",
      "accessed": "2026-11-30"
    },
    {
      "id": "sysfs",
      "title": "Linux v6.16, UBI volume sysfs attributes: independent update and corruption flags",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/drivers/mtd/ubi/vmt.c",
      "accessed": "2026-12-01"
    }
  ],
  "provenance": [
    "Source review pinned to Linux v6.16. No flash update, power-cut experiment or image-boot validation was performed."
  ]
}
