luo_file_finish(9)
π NAME π
okay bestie, welcome to luo_file_finish(9) from the Kernel API Manual β the function that completes the lifecycle for all files in a file_set. She is the final-teardown icon, the clean-up main character, and yes, she has receipts for every tracked file. π
β¨ SYNOPSIS β¨
int luo_file_finish (struct luo_file_set *file_set );
π ARGUMENTS π
file_setβ thefile_setto be finalized. this is the one getting her finishing touches, bestie.
πΈ DESCRIPTION πΈ
This function orchestrates the final teardown of a live update file_set in the new kernel. It should be called after all necessary files have been retrieved and the userspace agent is ready to release the preserved state.
The function iterates through all tracked files. For each file, it performs the following sequence of cleanup actions:
- If the file is not yet retrieved, it retrieves it, and calls
can_finishon every file in thefile_set. If allcan_finishreturn true, continue to finish. - Calls the handler's
.finishcallback (vialuo_file_finish_one) to allow for final resource cleanup within the handler. - Releases LUO's ownership reference on the
struct fileviafput. This is the counterpart to theget_filecall inluo_retrieve_file. - Removes the
struct luo_filefrom thefile_set's internal list. - Frees the memory for the
struct luo_fileinstance itself.
After successfully finishing all individual files, it frees the contiguous memory block that was used to transfer the serialized metadata from the previous kernel. bye bye, metadata block, you did your thing π«Ά
Error Handling (Atomic Failure): this operation is atomic, periodt. If any handler's .can_finish op fails, the entire function aborts immediately and returns an error. no partial-slay energy here β it's all or nothing π
π¦ CONTEXT π¦
Can be called from an ioctl handler in the new kernel. yes bestie, that's the vibe check for where she's allowed to show up. β¨
π₯ RETURN π₯
0 on success, or a negative errno on failure. simple, iconic, no cap. π
π 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_freeze(9)luo_file_unfreeze(9)luo_retrieve_file(9)luo_file_deserialize(9)liveupdate_register_file_handler(9)liveupdate_unregister_file_handler(9)
mwah π β this page came from source/version ./kernel/liveupdate, dated October 2026. bye bestie, go finish those files π«Ά
π¦ 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