luo_file_freeze(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… luo_file_freeze(9) β€” Kernel API Manual 🌈

πŸŽ€ NAME πŸŽ€

luo_file_freeze β€” freezes all preserved files and serializes their metadata. No cap, that’s the whole gig. πŸ’–


✨ SYNOPSIS ✨

Bestie, the signature is literally this:

int luo_file_freeze (struct luo_file_set *file_set , struct
       luo_file_set_ser *file_set_ser );

🫢 ARGUMENTS 🫢

  • file_set β€” the file_set whose files are to be frozen. 🧊
  • file_set_ser β€” where to put the serialized file_set. πŸ“¦

🌸 DESCRIPTION 🌸

okay so this function is called from the reboot syscall path, just before the kernel transitions to the new image via kexec. Its purpose is to do the final preparation and serialization of all preserved files in the file_set. main character energy fr fr. ✨

It iterates through each preserved file in FIFO order (the order of preservation) and performs two main actions:

  1. Freezes the File β€” it calls the handler’s .freeze callback for each file. This gives the handler a final opportunity to quiesce the device or prepare its state for the upcoming reboot. The handler may update its private data handle during this step. πŸ§ŠπŸ’…
  2. Serializes Metadata β€” after a successful freeze, it copies the final file metadataβ€”the handler’s compatible string, the user token, and the final private data handleβ€”into the pre-allocated contiguous memory buffer (file_set->files) that will be handed over to the next kernel via KHO. πŸ“¦πŸŒˆ

πŸ’€ Error Handling (Rollback) πŸ’€

⚠️ This function is atomic. If any handler’s .freeze operation fails, the entire live update is aborted. The __luo_file_unfreeze helper is immediately called to invoke the .unfreeze op on all files that were successfully frozen before the point of failure, rolling them back to a running state. The function then returns an error, causing the reboot syscall to fail. πŸ’€πŸ˜­

πŸ›‘ CONTEXT πŸ›‘

Called only from the liveupdate_reboot path. That’s the vibe check, periodt. 🫢


πŸ’– RETURN πŸ’–

0 on success, or a negative errno on failure. That’s it, that’s the return story. πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./kernel/liveupdate/luo_file.c:


xoxo, from ./kernel/liveupdate πŸ’– β€” October 2026 πŸŽ€ bye bestie 🫢

πŸ“¦ where this page comes from