luo_file_freeze(9)
π
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β thefile_setwhose files are to be frozen. π§file_set_serβ where to put the serializedfile_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:
- Freezes the File β it calls the handlerβs
.freezecallback 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. π§π - 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.freezeoperation fails, the entire live update is aborted. The__luo_file_unfreezehelper is immediately called to invoke the.unfreezeop 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:
LUO File Descriptors(9)struct luo_file(9)luo_preserve_file(9)luo_file_unpreserve_files(9)luo_file_unfreeze(9)luo_retrieve_file(9)luo_file_finish(9)luo_file_deserialize(9)liveupdate_register_file_handler(9)liveupdate_unregister_file_handler(9)
xoxo, from ./kernel/liveupdate π β October 2026 π bye bestie π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms