is_error_sane(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so this is the is_error_sane(9) page from the Kernel API Manual, and the main character energy is: is_error_sane β€” check whether a read error is sane. πŸ’–

✨ SYNOPSIS ✨

int is_error_sane (int err );

🌸 ARGUMENTS 🌸

  • err β€” the code of the error that happened during reading.

πŸ’… DESCRIPTION πŸ’…

okay bestie, here's the tea: this is a helper function for 'ubi_eba_copy_leb', and it gets called when we cannot read data from the target PEB β€” like, an error err happened. If the error code is sane, then we treat this error as non-fatal. Otherwise the error is fatal and UBI will be switched to R/O mode later.

The idea is that we try not to switch to R/O mode if the read error is something which suggests there was a real read problem. E.g., -EIO. Or a memory allocation failed (-ENOMEM). Otherwise, it is safer to switch to R/O mode, simply because we do not know what happened at the MTD level, and we cannot handle this. E.g., the underlying driver may have become crazy, and it is safer to switch to R/O mode to preserve the data.

And bear in mind, this is about reading from the target PEB, i.e. the PEB which we have just written. πŸ‘‘

πŸ¦‹ SEE ALSO πŸ¦‹


this page is signing off from ./drivers/mtd/ubi (source/version vibes) and October 2026 (date vibes) β€” is_error_sane(9) OUT, stay sane bestie πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from