Atomic LEB change (UBI)
An atomic LEB change replaces one UBI logical eraseblock as a failure-atomic unit while retaining its logical number.
The Linux v6.16 kernel API is ubi_leb_change; its supplied length must fit the usable LEB and satisfy minimum-I/O alignment. This is a dynamic-volume operation, not a transaction across several LEBs or files. [1]
For userspace, UBI_IOCEBCH starts a request followed by writes of the declared byte count. This differs from UBI_IOCVOLUP's whole-volume update. Name the actual interface when documenting a recovery guarantee. [2]
Completion of logical replacement is distinct from physical removal of obsolete copies. UBI unmap schedules erasure; the old mapping may return after an unclean reboot before that erasure. An erase call waits for the associated physical erasure. [1]
Use this primitive only within a protocol that also defines publication, error handling and recovery. This is an engineering inference from its one-LEB scope, not evidence that a complete firmware update or secure deletion has been tested.
Relations
Citations
- Linux v6.16, ubi_leb_change, ubi_leb_unmap and ubi_leb_erase
- Linux v6.16, UBI userspace interface and ioctl contracts
Sources & caveats
- Source review pinned to Linux v6.16. No raw-flash, power-cut or sanitization experiment was performed.