sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget'/translations/zh_CN/core-api/liveupdatemodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/zh_TW/core-api/liveupdatemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/it_IT/core-api/liveupdatemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ja_JP/core-api/liveupdatemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ko_KR/core-api/liveupdatemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/sp_SP/core-api/liveupdatemodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhA/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate.rsthKubhsection)}(hhh](htitle)}(hLive Update Orchestratorh]hLive Update Orchestrator}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh field_list)}(hhh]hfield)}(hhh](h field_name)}(hAuthorh]hAuthor}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhKubh field_body)}(h+Pasha Tatashin h]h paragraph)}(h*Pasha Tatashin h](hPasha Tatashin <}(hhhhhNhNubh reference)}(hpasha.tatashin@soleen.comh]hpasha.tatashin@soleen.com}(hhhhhNhNubah}(h]h ]h"]h$]h&]refuri mailto:pasha.tatashin@soleen.comuh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hX4Live Update is a specialized, kexec-based reboot process that allows a running kernel to be updated from one version to another while preserving the state of selected resources and keeping designated hardware devices operational. For these devices, DMA activity may continue throughout the kernel transition.h]hX4Live Update is a specialized, kexec-based reboot process that allows a running kernel to be updated from one version to another while preserving the state of selected resources and keeping designated hardware devices operational. For these devices, DMA activity may continue throughout the kernel transition.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:8: ./kernel/liveupdate/luo_core.chK hhhhubh)}(hXWhile the primary use case driving this work is supporting live updates of the Linux kernel when it is used as a hypervisor in cloud environments, the LUO framework itself is designed to be workload-agnostic. Live Update facilitates a full kernel version upgrade for any type of system.h]hXWhile the primary use case driving this work is supporting live updates of the Linux kernel when it is used as a hypervisor in cloud environments, the LUO framework itself is designed to be workload-agnostic. Live Update facilitates a full kernel version upgrade for any type of system.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:8: ./kernel/liveupdate/luo_core.chKhhhhubh)}(hXFor example, a non-hypervisor system running an in-memory cache like memcached with many gigabytes of data can use LUO. The userspace service can place its cache into a memfd, have its state preserved by LUO, and restore it immediately after the kernel kexec.h]hXFor example, a non-hypervisor system running an in-memory cache like memcached with many gigabytes of data can use LUO. The userspace service can place its cache into a memfd, have its state preserved by LUO, and restore it immediately after the kernel kexec.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:8: ./kernel/liveupdate/luo_core.chKhhhhubh)}(hWhether the system is running virtual machines, containers, a high-performance database, or networking services, LUO's primary goal is to enable a full kernel update by preserving critical userspace state and keeping essential devices operational.h]hWhether the system is running virtual machines, containers, a high-performance database, or networking services, LUO’s primary goal is to enable a full kernel update by preserving critical userspace state and keeping essential devices operational.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:8: ./kernel/liveupdate/luo_core.chKhhhhubh)}(hX)The core of LUO is a mechanism that tracks the progress of a live update, along with a callback API that allows other kernel subsystems to participate in the process. Example subsystems that can hook into LUO include: kvm, iommu, interrupts, vfio, participating filesystems, and memory management.h]hX)The core of LUO is a mechanism that tracks the progress of a live update, along with a callback API that allows other kernel subsystems to participate in the process. Example subsystems that can hook into LUO include: kvm, iommu, interrupts, vfio, participating filesystems, and memory management.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:8: ./kernel/liveupdate/luo_core.chKhhhhubh)}(hLUO uses Kexec Handover to transfer memory state from the current kernel to the next kernel. For more details see Documentation/core-api/kho/concepts.rst.h]hLUO uses Kexec Handover to transfer memory state from the current kernel to the next kernel. For more details see Documentation/core-api/kho/concepts.rst.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:8: ./kernel/liveupdate/luo_core.chK#hhhhubh)}(hhh](h)}(h LUO Sessionsh]h LUO Sessions}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hhhhhK ubh)}(hX1LUO Sessions provide the core mechanism for grouping and managing `struct file *` instances that need to be preserved across a kexec-based live update. Each session acts as a named container for a set of file objects, allowing a userspace agent to manage the lifecycle of resources critical to a workload.h](hBLUO Sessions provide the core mechanism for grouping and managing }(hjhhhNhNubhtitle_reference)}(h`struct file *`h]h struct file *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh instances that need to be preserved across a kexec-based live update. Each session acts as a named container for a set of file objects, allowing a userspace agent to manage the lifecycle of resources critical to a workload.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:13: ./kernel/liveupdate/luo_session.chK hj{hhubh)}(hCore Concepts:h]hCore Concepts:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:13: ./kernel/liveupdate/luo_session.chKhj{hhubh bullet_list)}(hhh](h list_item)}(hNamed Containers: Sessions are identified by a unique, user-provided name, which is used for both creation in the current kernel and retrieval in the next kernel. h]h)}(hNamed Containers: Sessions are identified by a unique, user-provided name, which is used for both creation in the current kernel and retrieval in the next kernel.h]hNamed Containers: Sessions are identified by a unique, user-provided name, which is used for both creation in the current kernel and retrieval in the next kernel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:13: ./kernel/liveupdate/luo_session.chKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h`Userspace Interface: Session management is driven from userspace via ioctls on /dev/liveupdate. h]h)}(h_Userspace Interface: Session management is driven from userspace via ioctls on /dev/liveupdate.h]h_Userspace Interface: Session management is driven from userspace via ioctls on /dev/liveupdate.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:13: ./kernel/liveupdate/luo_session.chKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hX2Serialization: Session metadata is preserved using the KHO framework. When a live update is triggered via kexec, an array of `struct luo_session_ser` is populated and placed in a preserved memory region. An FDT node is also created, containing the count of sessions and the physical address of this array. h]h)}(hX1Serialization: Session metadata is preserved using the KHO framework. When a live update is triggered via kexec, an array of `struct luo_session_ser` is populated and placed in a preserved memory region. An FDT node is also created, containing the count of sessions and the physical address of this array.h](h}Serialization: Session metadata is preserved using the KHO framework. When a live update is triggered via kexec, an array of }(hjhhhNhNubj)}(h`struct luo_session_ser`h]hstruct luo_session_ser}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is populated and placed in a preserved memory region. An FDT node is also created, containing the count of sessions and the physical address of this array.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:13: ./kernel/liveupdate/luo_session.chKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bullet-uh1jhjhKhj{hhubh)}(hSession Lifecycle:h]hSession Lifecycle:}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:13: ./kernel/liveupdate/luo_session.chKhj{hhubhenumerated_list)}(hhh](j)}(hCreation: A userspace agent calls `luo_session_create()` to create a new, empty session and receives a file descriptor for it. h]h)}(h~Creation: A userspace agent calls `luo_session_create()` to create a new, empty session and receives a file descriptor for it.h](h"Creation: A userspace agent calls }(hjBhhhNhNubj)}(h`luo_session_create()`h]hluo_session_create()}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubhF to create a new, empty session and receives a file descriptor for it.}(hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:13: ./kernel/liveupdate/luo_session.chK hj>ubah}(h]h ]h"]h$]h&]uh1jhj;ubj)}(hSerialization: When the `reboot(LINUX_REBOOT_CMD_KEXEC)` syscall is made, `luo_session_serialize()` is called. It iterates through all active sessions and writes their metadata into a memory area preserved by KHO. h]h)}(hSerialization: When the `reboot(LINUX_REBOOT_CMD_KEXEC)` syscall is made, `luo_session_serialize()` is called. It iterates through all active sessions and writes their metadata into a memory area preserved by KHO.h](hSerialization: When the }(hjmhhhNhNubj)}(h `reboot(LINUX_REBOOT_CMD_KEXEC)`h]hreboot(LINUX_REBOOT_CMD_KEXEC)}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh syscall is made, }(hjmhhhNhNubj)}(h`luo_session_serialize()`h]hluo_session_serialize()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubhr is called. It iterates through all active sessions and writes their metadata into a memory area preserved by KHO.}(hjmhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:13: ./kernel/liveupdate/luo_session.chK#hjiubah}(h]h ]h"]h$]h&]uh1jhj;ubj)}(hDeserialization (in new kernel): After kexec, `luo_session_deserialize()` runs, reading the serialized data and creating a list of `struct luo_session` objects representing the preserved sessions. h]h)}(hDeserialization (in new kernel): After kexec, `luo_session_deserialize()` runs, reading the serialized data and creating a list of `struct luo_session` objects representing the preserved sessions.h](h.Deserialization (in new kernel): After kexec, }(hjhhhNhNubj)}(h`luo_session_deserialize()`h]hluo_session_deserialize()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh: runs, reading the serialized data and creating a list of }(hjhhhNhNubj)}(h`struct luo_session`h]hstruct luo_session}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh- objects representing the preserved sessions.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:13: ./kernel/liveupdate/luo_session.chK(hjubah}(h]h ]h"]h$]h&]uh1jhj;ubj)}(hRetrieval: A userspace agent in the new kernel can then call `luo_session_retrieve()` with a session name to get a new file descriptor and access the preserved state. h]h)}(hRetrieval: A userspace agent in the new kernel can then call `luo_session_retrieve()` with a session name to get a new file descriptor and access the preserved state.h](h=Retrieval: A userspace agent in the new kernel can then call }(hjhhhNhNubj)}(h`luo_session_retrieve()`h]hluo_session_retrieve()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhQ with a session name to get a new file descriptor and access the preserved state.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:13: ./kernel/liveupdate/luo_session.chK,hjubah}(h]h ]h"]h$]h&]uh1jhj;ubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1j9hj{hhhNhNubeh}(h] luo-sessionsah ]h"] luo sessionsah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hLUO Preserving File Descriptorsh]hLUO Preserving File Descriptors}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hhhhhKubh)}(hXLUO provides the infrastructure to preserve specific, stateful file descriptors across a kexec-based live update. The primary goal is to allow workloads, such as virtual machines using vfio, memfd, or iommufd, to retain access to their essential resources without interruption.h]hXLUO provides the infrastructure to preserve specific, stateful file descriptors across a kexec-based live update. The primary goal is to allow workloads, such as virtual machines using vfio, memfd, or iommufd, to retain access to their essential resources without interruption.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chK hj!hhubh)}(hsThe framework is built around a callback-based handler model and a well- defined lifecycle for each preserved file.h]hsThe framework is built around a callback-based handler model and a well- defined lifecycle for each preserved file.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chKhj!hhubh)}(hXHandler Registration: Kernel modules responsible for a specific file type (e.g., memfd, vfio) register a :c:type:`struct liveupdate_file_handler `. This handler provides a set of callbacks that LUO invokes at different stages of the update process, most notably:h](hiHandler Registration: Kernel modules responsible for a specific file type (e.g., memfd, vfio) register a }(hjPhhhNhNubh)}(hB:c:type:`struct liveupdate_file_handler `h]hliteral)}(hjZh]hstruct liveupdate_file_handler}(hj^hhhNhNubah}(h]h ](xrefcc-typeeh"]h$]h&]uh1j\hjXubah}(h]h ]h"]h$]h&]refdoccore-api/liveupdate refdomainjireftypetype refexplicitrefwarn reftargetliveupdate_file_handleruh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chKhjPubht. This handler provides a set of callbacks that LUO invokes at different stages of the update process, most notably:}(hjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj}hKhj!hhubh block_quote)}(hX- can_preserve(): A lightweight check to determine if the handler is compatible with a given 'struct file'. - preserve(): The heavyweight operation that saves the file's state and returns an opaque u64 handle. This is typically performed while the workload is still active to minimize the downtime during the actual reboot transition. - unpreserve(): Cleans up any resources allocated by .preserve(), called if the preservation process is aborted before the reboot (i.e. session is closed). - freeze(): A final pre-reboot opportunity to prepare the state for kexec. We are already in reboot syscall, and therefore userspace cannot mutate the file anymore. - unfreeze(): Undoes the actions of .freeze(), called if the live update is aborted after the freeze phase. - retrieve(): Reconstructs the file in the new kernel from the preserved handle. - finish(): Performs final check and cleanup in the new kernel. After succesul finish call, LUO gives up ownership to this file. h]j)}(hhh](j)}(hican_preserve(): A lightweight check to determine if the handler is compatible with a given 'struct file'.h]h)}(hican_preserve(): A lightweight check to determine if the handler is compatible with a given 'struct file'.h]hmcan_preserve(): A lightweight check to determine if the handler is compatible with a given ‘struct file’.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hpreserve(): The heavyweight operation that saves the file's state and returns an opaque u64 handle. This is typically performed while the workload is still active to minimize the downtime during the actual reboot transition.h]h)}(hpreserve(): The heavyweight operation that saves the file's state and returns an opaque u64 handle. This is typically performed while the workload is still active to minimize the downtime during the actual reboot transition.h]hpreserve(): The heavyweight operation that saves the file’s state and returns an opaque u64 handle. This is typically performed while the workload is still active to minimize the downtime during the actual reboot transition.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hunpreserve(): Cleans up any resources allocated by .preserve(), called if the preservation process is aborted before the reboot (i.e. session is closed).h]h)}(hunpreserve(): Cleans up any resources allocated by .preserve(), called if the preservation process is aborted before the reboot (i.e. session is closed).h]hunpreserve(): Cleans up any resources allocated by .preserve(), called if the preservation process is aborted before the reboot (i.e. session is closed).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hfreeze(): A final pre-reboot opportunity to prepare the state for kexec. We are already in reboot syscall, and therefore userspace cannot mutate the file anymore.h]h)}(hfreeze(): A final pre-reboot opportunity to prepare the state for kexec. We are already in reboot syscall, and therefore userspace cannot mutate the file anymore.h]hfreeze(): A final pre-reboot opportunity to prepare the state for kexec. We are already in reboot syscall, and therefore userspace cannot mutate the file anymore.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chK hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hiunfreeze(): Undoes the actions of .freeze(), called if the live update is aborted after the freeze phase.h]h)}(hiunfreeze(): Undoes the actions of .freeze(), called if the live update is aborted after the freeze phase.h]hiunfreeze(): Undoes the actions of .freeze(), called if the live update is aborted after the freeze phase.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chK#hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hNretrieve(): Reconstructs the file in the new kernel from the preserved handle.h]h)}(hNretrieve(): Reconstructs the file in the new kernel from the preserved handle.h]hNretrieve(): Reconstructs the file in the new kernel from the preserved handle.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chK%hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hfinish(): Performs final check and cleanup in the new kernel. After succesul finish call, LUO gives up ownership to this file. h]h)}(h~finish(): Performs final check and cleanup in the new kernel. After succesul finish call, LUO gives up ownership to this file.h]h~finish(): Performs final check and cleanup in the new kernel. After succesul finish call, LUO gives up ownership to this file.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chK'hj'ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]j(j)uh1jhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjhKhj!hhubh)}(h'File Preservation Lifecycle happy path:h]h'File Preservation Lifecycle happy path:}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chK*hj!hhubj:)}(hhh](j)}(hXPreserve (Normal Operation): A userspace agent preserves files one by one via an ioctl. For each file, luo_preserve_file() finds a compatible handler, calls its .preserve() operation, and creates an internal :c:type:`struct luo_file ` to track the live state. h]h)}(hX Preserve (Normal Operation): A userspace agent preserves files one by one via an ioctl. For each file, luo_preserve_file() finds a compatible handler, calls its .preserve() operation, and creates an internal :c:type:`struct luo_file ` to track the live state.h](hPreserve (Normal Operation): A userspace agent preserves files one by one via an ioctl. For each file, luo_preserve_file() finds a compatible handler, calls its .preserve() operation, and creates an internal }(hjbhhhNhNubh)}(h$:c:type:`struct luo_file `h]j])}(hjlh]hstruct luo_file}(hjnhhhNhNubah}(h]h ](jhjic-typeeh"]h$]h&]uh1j\hjjubah}(h]h ]h"]h$]h&]refdocju refdomainjireftypetype refexplicitrefwarnj{luo_fileuh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chK,hjbubh to track the live state.}(hjbhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK,hj^ubah}(h]h ]h"]h$]h&]uh1jhj[ubj)}(hXFreeze (Pre-Reboot): Just before the kexec, luo_file_freeze() is called. It iterates through all preserved files, calls their respective .freeze() operation, and serializes their final metadata (compatible string, token, and data handle) into a contiguous memory block for KHO. h]h)}(hXFreeze (Pre-Reboot): Just before the kexec, luo_file_freeze() is called. It iterates through all preserved files, calls their respective .freeze() operation, and serializes their final metadata (compatible string, token, and data handle) into a contiguous memory block for KHO.h]hXFreeze (Pre-Reboot): Just before the kexec, luo_file_freeze() is called. It iterates through all preserved files, calls their respective .freeze() operation, and serializes their final metadata (compatible string, token, and data handle) into a contiguous memory block for KHO.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chK1hjubah}(h]h ]h"]h$]h&]uh1jhj[ubj)}(hXVDeserialize: After kexec, luo_file_deserialize() runs when session gets deserialized (which is when /dev/liveupdate is first opened). It reads the serialized data from the KHO memory region and reconstructs the in-memory list of :c:type:`struct luo_file ` instances for the new kernel, linking them to their corresponding handlers. h]h)}(hXUDeserialize: After kexec, luo_file_deserialize() runs when session gets deserialized (which is when /dev/liveupdate is first opened). It reads the serialized data from the KHO memory region and reconstructs the in-memory list of :c:type:`struct luo_file ` instances for the new kernel, linking them to their corresponding handlers.h](hDeserialize: After kexec, luo_file_deserialize() runs when session gets deserialized (which is when /dev/liveupdate is first opened). It reads the serialized data from the KHO memory region and reconstructs the in-memory list of }(hjhhhNhNubh)}(h$:c:type:`struct luo_file `h]j])}(hjh]hstruct luo_file}(hjhhhNhNubah}(h]h ](jhjic-typeeh"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]refdocju refdomainjireftypetype refexplicitrefwarnj{luo_fileuh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chK6hjubhL instances for the new kernel, linking them to their corresponding handlers.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK6hjubah}(h]h ]h"]h$]h&]uh1jhj[ubj)}(hX'Retrieve (New Kernel - Userspace Ready): The userspace agent can now restore file descriptors by providing a token. luo_retrieve_file() searches for the matching token, calls the handler's .retrieve() op to re-create the 'struct file', and returns a new FD. Files can be retrieved in ANY order. h]h)}(hX&Retrieve (New Kernel - Userspace Ready): The userspace agent can now restore file descriptors by providing a token. luo_retrieve_file() searches for the matching token, calls the handler's .retrieve() op to re-create the 'struct file', and returns a new FD. Files can be retrieved in ANY order.h]hX,Retrieve (New Kernel - Userspace Ready): The userspace agent can now restore file descriptors by providing a token. luo_retrieve_file() searches for the matching token, calls the handler’s .retrieve() op to re-create the ‘struct file’, and returns a new FD. Files can be retrieved in ANY order.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:18: ./kernel/liveupdate/luo_file.chK; luo-session { compatible = "luo-session-v1"; luo-session-header = ; }; }; h](hterm)}(hFDT Structure Overview:h]hFDT Structure Overview:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:23: ./include/linux/kho/abi/luo.hhK&hjubh definition)}(hhh](h)}(hThe entire LUO state is encapsulated within a single KHO entry named "LUO". This entry contains an FDT with the following layout:h]hThe entire LUO state is encapsulated within a single KHO entry named “LUO”. This entry contains an FDT with the following layout:}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:23: ./include/linux/kho/abi/luo.hhKhj&ubh literal_block)}(h/ { compatible = "luo-v1"; liveupdate-number = <...>; luo-session { compatible = "luo-session-v1"; luo-session-header = ; }; };h]h/ { compatible = "luo-v1"; liveupdate-number = <...>; luo-session { compatible = "luo-session-v1"; luo-session-header = ; }; };}hj:sbah}(h]h ]h"]h$]h&]hhforcelanguagenonehighlight_args}uh1j8h_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:23: ./include/linux/kho/abi/luo.hhKhj&ubeh}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hj#hK&hj ubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubh)}(hMain LUO Node (/):h]hMain LUO Node (/):}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:23: ./include/linux/kho/abi/luo.hhK(hjhhubj)}(h- compatible: "luo-v1" Identifies the overall LUO ABI version. - liveupdate-number: u64 A counter tracking the number of successful live updates performed. h]j)}(hhh](j)}(hhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhcompound)}(hhh]htoctree)}(hhh]h}(h]h ]h"]h$]h&]hjuentries]Nmm/memfd_preservationa includefiles]j^amaxdepthKcaptionNglobhidden includehiddennumberedK titlesonly rawentries]uh1jQhhhKhjNubah}(h]h ]toctree-wrapperah"]h$]h&]uh1jLhjhhhhhNubeh}(h]live-update-orchestrator-abiah ]h"]live update orchestrator abiah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Public APIh]h Public API}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhhhhhK"ubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single"liveupdate_file_op_args (C struct)c.liveupdate_file_op_argshNtauh1jhjzhhh^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhNubhdesc)}(hhh](hdesc_signature)}(hliveupdate_file_op_argsh]hdesc_signature_line)}(hstruct liveupdate_file_op_argsh](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhKubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhKubh desc_name)}(hliveupdate_file_op_argsh]h desc_sig_name)}(hjh]hliveupdate_file_op_args}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jsphinx_line_type declaratorhjhhhjhKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhKhjhhubh desc_content)}(hhh]h)}(h'Arguments for file operation callbacks.h]h'Arguments for file operation callbacks.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhKhj hhubah}(h]h ]h"]h$]h&]uh1j hjhhhjhKubeh}(h]h ](jistructeh"]h$]h&]domainjiobjtypej desctypej noindex noindexentrynocontentsentryuh1jhhhjzhjhNubh container)}(hX'**Definition**:: struct liveupdate_file_op_args { struct liveupdate_file_handler *handler; bool retrieved; struct file *file; u64 serialized_data; void *private_data; }; **Members** ``handler`` The file handler being called. ``retrieved`` The retrieve status for the 'can_finish / finish' operation. ``file`` The file object. For retrieve: [OUT] The callback sets this to the new file. For other ops: [IN] The caller sets this to the file being operated on. ``serialized_data`` The opaque u64 handle, preserve/prepare/freeze may update this field. ``private_data`` Private data for the file used to hold runtime state that is not preserved. Set by the handler's .preserve() callback, and must be freed in the handler's .unpreserve() callback.h](h)}(h**Definition**::h](hstrong)}(h**Definition**h]h Definition}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj0 ubh:}(hj0 hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhKhj, ubj9)}(hstruct liveupdate_file_op_args { struct liveupdate_file_handler *handler; bool retrieved; struct file *file; u64 serialized_data; void *private_data; };h]hstruct liveupdate_file_op_args { struct liveupdate_file_handler *handler; bool retrieved; struct file *file; u64 serialized_data; void *private_data; };}hjO sbah}(h]h ]h"]h$]h&]hhuh1j8h^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhKhj, ubh)}(h **Members**h]j5 )}(hj` h]hMembers}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj^ ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhK#hj, ubj )}(hhh](j)}(h+``handler`` The file handler being called. h](j)}(h ``handler``h]j])}(hj h]hhandler}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj} ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhKhjy ubj%)}(hhh]h)}(hThe file handler being called.h]hThe file handler being called.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j$hjy ubeh}(h]h ]h"]h$]h&]uh1j hj hKhjv ubj)}(hK``retrieved`` The retrieve status for the 'can_finish / finish' operation. h](j)}(h ``retrieved``h]j])}(hj h]h retrieved}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhKhj ubj%)}(hhh]h)}(h` instances.h](h)}(h**Definition**::h](j5 )}(h**Definition**h]h Definition}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjUubh:}(hjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhKShjQubj9)}(hstruct liveupdate_file_handler { const struct liveupdate_file_ops *ops; const char compatible[LIVEUPDATE_HNDL_COMPAT_LENGTH]; };h]hstruct liveupdate_file_handler { const struct liveupdate_file_ops *ops; const char compatible[LIVEUPDATE_HNDL_COMPAT_LENGTH]; };}hjrsbah}(h]h ]h"]h$]h&]hhuh1j8h^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhKUhjQubh)}(h **Members**h]j5 )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhKZhjQubj )}(hhh](j)}(h``ops`` Callback functions h](j)}(h``ops``h]j])}(hjh]hops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhKQhjubj%)}(hhh]h)}(hCallback functionsh]hCallback functions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKQhjubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hjhKQhjubj)}(h``compatible`` The compatibility string (e.g., "memfd-v1", "vfiofd-v1") that uniquely identifies the file type this handler supports. This is matched against the compatible string associated with individual :c:type:`struct file ` instances.h](j)}(h``compatible``h]j])}(hjh]h compatible}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhKThjubj%)}(hhh]h)}(hThe compatibility string (e.g., "memfd-v1", "vfiofd-v1") that uniquely identifies the file type this handler supports. This is matched against the compatible string associated with individual :c:type:`struct file ` instances.h](hThe compatibility string (e.g., “memfd-v1”, “vfiofd-v1”) that uniquely identifies the file type this handler supports. This is matched against the compatible string associated with individual }(hjhhhNhNubh)}(h:c:type:`struct file `h]j])}(hjh]h struct file}(hjhhhNhNubah}(h]h ](jhjic-typeeh"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]refdocju refdomainjireftypetype refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]sbj{fileuh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhKRhjubh instances.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj#hKRhjubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hjhKThjubeh}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjzhhhjhNubh)}(h**Description**h]j5 )}(hjIh]h Description}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjGubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhKXhjzhhubh)}(hXModules that want to support live update for specific file types should register an instance of this structure. LUO uses this registration to determine if a given file can be preserved and to find the appropriate operations to manage its state across the update.h]hXModules that want to support live update for specific file types should register an instance of this structure. LUO uses this registration to determine if a given file can be preserved and to find the appropriate operations to manage its state across the update.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:35: ./include/linux/liveupdate.hhKUhjzhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jluo_file_ser (C struct)c.luo_file_serhNtauh1jhjzhhh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhNubj)}(hhh](j)}(h luo_file_serh]j)}(hstruct luo_file_serh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(h luo_file_serh]j)}(hjh]h luo_file_ser}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKubah}(h]jzah ](jjeh"]h$]h&]j j )j huh1jhjhKhj}hhubj )}(hhh]h)}(h*Represents the serialized preserves files.h]h*Represents the serialized preserves files.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKahjhhubah}(h]h ]h"]h$]h&]uh1j hj}hhhjhKubeh}(h]h ](jistructeh"]h$]h&]j$ jij% jj& jj' j( j) uh1jhhhjzhj|hNubj+ )}(hX **Definition**:: struct luo_file_ser { char compatible[LIVEUPDATE_HNDL_COMPAT_LENGTH]; u64 data; u64 token; }; **Members** ``compatible`` File handler compatible string. ``data`` Private data ``token`` User provided token for this fileh](h)}(h**Definition**::h](j5 )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKehjubj9)}(histruct luo_file_ser { char compatible[LIVEUPDATE_HNDL_COMPAT_LENGTH]; u64 data; u64 token; };h]histruct luo_file_ser { char compatible[LIVEUPDATE_HNDL_COMPAT_LENGTH]; u64 data; u64 token; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j8h_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKghjubh)}(h **Members**h]j5 )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKmhjubj )}(hhh](j)}(h/``compatible`` File handler compatible string. h](j)}(h``compatible``h]j])}(hj7h]h compatible}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj5ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKchj1ubj%)}(hhh]h)}(hFile handler compatible string.h]hFile handler compatible string.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhKchjMubah}(h]h ]h"]h$]h&]uh1j$hj1ubeh}(h]h ]h"]h$]h&]uh1j hjLhKchj.ubj)}(h``data`` Private data h](j)}(h``data``h]j])}(hjph]hdata}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjnubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKdhjjubj%)}(hhh]h)}(h Private datah]h Private data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKdhjubah}(h]h ]h"]h$]h&]uh1j$hjjubeh}(h]h ]h"]h$]h&]uh1j hjhKdhj.ubj)}(h+``token`` User provided token for this fileh](j)}(h ``token``h]j])}(hjh]htoken}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKdhjubj%)}(hhh]h)}(h!User provided token for this fileh]h!User provided token for this file}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKehjubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hjhKdhj.ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjzhhhj|hNubh)}(h**Description**h]j5 )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhhjzhhubh)}(hFIf this structure is modified, LUO_SESSION_COMPATIBLE must be updated.h]hFIf this structure is modified, LUO_SESSION_COMPATIBLE must be updated.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKehjzhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jluo_file_set_ser (C struct)c.luo_file_set_serhNtauh1jhjzhhhj|hNubj)}(hhh](j)}(hluo_file_set_serh]j)}(hstruct luo_file_set_serh](j)}(hjh]hstruct}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&hhh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKjubj)}(h h]h }(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&hhhj7hKjubj)}(hluo_file_set_serh]j)}(hj$h]hluo_file_set_ser}(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubah}(h]h ](jjeh"]h$]h&]hhuh1jhj&hhhj7hKjubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj"hhhj7hKjubah}(h]jah ](jjeh"]h$]h&]j j )j huh1jhj7hKjhjhhubj )}(hhh]h)}(h/Represents the serialized metadata for file seth]h/Represents the serialized metadata for file set}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKohjihhubah}(h]h ]h"]h$]h&]uh1j hjhhhj7hKjubeh}(h]h ](jistructeh"]h$]h&]j$ jij% jj& jj' j( j) uh1jhhhjzhj|hNubj+ )}(hX**Definition**:: struct luo_file_set_ser { u64 files; u64 count; }; **Members** ``files`` The physical address of a contiguous memory block that holds the serialized state of files (array of luo_file_ser) in this file set. ``count`` The total number of files that were part of this session during serialization. Used for iteration and validation during restoration.h](h)}(h**Definition**::h](j5 )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKshjubj9)}(h:struct luo_file_set_ser { u64 files; u64 count; };h]h:struct luo_file_set_ser { u64 files; u64 count; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j8h_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKuhjubh)}(h **Members**h]j5 )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKzhjubj )}(hhh](j)}(h``files`` The physical address of a contiguous memory block that holds the serialized state of files (array of luo_file_ser) in this file set. h](j)}(h ``files``h]j])}(hjh]hfiles}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKshjubj%)}(hhh]h)}(hThe physical address of a contiguous memory block that holds the serialized state of files (array of luo_file_ser) in this file set.h]hThe physical address of a contiguous memory block that holds the serialized state of files (array of luo_file_ser) in this file set.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKqhjubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hjhKshjubj)}(h``count`` The total number of files that were part of this session during serialization. Used for iteration and validation during restoration.h](j)}(h ``count``h]j])}(hjh]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKuhj ubj%)}(hhh]h)}(hThe total number of files that were part of this session during serialization. Used for iteration and validation during restoration.h]hThe total number of files that were part of this session during serialization. Used for iteration and validation during restoration.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKthj)ubah}(h]h ]h"]h$]h&]uh1j$hj ubeh}(h]h ]h"]h$]h&]uh1j hj(hKuhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjzhhhj|hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!luo_session_header_ser (C struct)c.luo_session_header_serhNtauh1jhjzhhhj|hNubj)}(hhh](j)}(hluo_session_header_serh]j)}(hstruct luo_session_header_serh](j)}(hjh]hstruct}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjihhh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhK|ubj)}(h h]h }(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjihhhjzhK|ubj)}(hluo_session_header_serh]j)}(hjgh]hluo_session_header_ser}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjihhhjzhK|ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjehhhjzhK|ubah}(h]j`ah ](jjeh"]h$]h&]j j )j huh1jhjzhK|hjbhhubj )}(hhh]h)}(h-Header for the serialized session data block.h]h-Header for the serialized session data block.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j hjbhhhjzhK|ubeh}(h]h ](jistructeh"]h$]h&]j$ jij% jj& jj' j( j) uh1jhhhjzhj|hNubj+ )}(h**Definition**:: struct luo_session_header_ser { u64 count; }; **Members** ``count`` The number of `struct luo_session_ser` entries that immediately follow this header in the memory block.h](h)}(h**Definition**::h](j5 )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjubj9)}(h1struct luo_session_header_ser { u64 count; };h]h1struct luo_session_header_ser { u64 count; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j8h_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjubh)}(h **Members**h]j5 )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjubj )}(hhh]j)}(hq``count`` The number of `struct luo_session_ser` entries that immediately follow this header in the memory block.h](j)}(h ``count``h]j])}(hjh]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjubj%)}(hhh]h)}(hgThe number of `struct luo_session_ser` entries that immediately follow this header in the memory block.h](hThe number of }(hj5hhhNhNubj)}(h`struct luo_session_ser`h]hstruct luo_session_ser}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubhA entries that immediately follow this header in the memory block.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj1hKhj2ubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hj1hKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjzhhhj|hNubh)}(h**Description**h]j5 )}(hjph]h Description}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjnubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjzhhubh)}(hThis structure is located at the beginning of a contiguous block of physical memory preserved across the kexec. It provides the necessary metadata to interpret the array of session entries that follow.h]hThis structure is located at the beginning of a contiguous block of physical memory preserved across the kexec. It provides the necessary metadata to interpret the array of session entries that follow.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjzhhubh)}(hLIf this structure is modified, `LUO_FDT_SESSION_COMPATIBLE` must be updated.h](hIf this structure is modified, }(hjhhhNhNubj)}(h`LUO_FDT_SESSION_COMPATIBLE`h]hLUO_FDT_SESSION_COMPATIBLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh must be updated.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjzhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jluo_session_ser (C struct)c.luo_session_serhNtauh1jhjzhhhj|hNubj)}(hhh](j)}(hluo_session_serh]j)}(hstruct luo_session_serh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(hluo_session_serh]j)}(hjh]hluo_session_ser}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]j j )j huh1jhjhKhjhhubj )}(hhh]h)}(h5Represents the serialized metadata for a LUO session.h]h5Represents the serialized metadata for a LUO session.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j hjhhhjhKubeh}(h]h ](jistructeh"]h$]h&]j$ jij% j)j& j)j' j( j) uh1jhhhjzhj|hNubj+ )}(hXD**Definition**:: struct luo_session_ser { char name[LIVEUPDATE_SESSION_NAME_LENGTH]; struct luo_file_set_ser file_set_ser; }; **Members** ``name`` The unique name of the session, provided by the userspace at the time of session creation. ``file_set_ser`` Serialized files belonging to this session,h](h)}(h**Definition**::h](j5 )}(h**Definition**h]h Definition}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj1ubh:}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhj-ubj9)}(htstruct luo_session_ser { char name[LIVEUPDATE_SESSION_NAME_LENGTH]; struct luo_file_set_ser file_set_ser; };h]htstruct luo_session_ser { char name[LIVEUPDATE_SESSION_NAME_LENGTH]; struct luo_file_set_ser file_set_ser; };}hjNsbah}(h]h ]h"]h$]h&]hhuh1j8h_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhj-ubh)}(h **Members**h]j5 )}(hj_h]hMembers}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj]ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhj-ubj )}(hhh](j)}(hd``name`` The unique name of the session, provided by the userspace at the time of session creation. h](j)}(h``name``h]j])}(hj~h]hname}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj|ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjxubj%)}(hhh]h)}(hZThe unique name of the session, provided by the userspace at the time of session creation.h]hZThe unique name of the session, provided by the userspace at the time of session creation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjubah}(h]h ]h"]h$]h&]uh1j$hjxubeh}(h]h ]h"]h$]h&]uh1j hjhKhjuubj)}(h<``file_set_ser`` Serialized files belonging to this session,h](j)}(h``file_set_ser``h]j])}(hjh]h file_set_ser}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjubj%)}(hhh]h)}(h+Serialized files belonging to this session,h]h+Serialized files belonging to this session,}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjuubeh}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjzhhhj|hNubh)}(h**Description**h]j5 )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjzhhubh)}(hThis structure is used to package session-specific metadata for transfer between kernels via Kexec Handover. An array of these structures (one per session) is created and passed to the new kernel, allowing it to reconstruct the session context.h]hThis structure is used to package session-specific metadata for transfer between kernels via Kexec Handover. An array of these structures (one per session) is created and passed to the new kernel, allowing it to reconstruct the session context.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjzhhubh)}(hLIf this structure is modified, `LUO_FDT_SESSION_COMPATIBLE` must be updated.h](hIf this structure is modified, }(hj hhhNhNubj)}(h`LUO_FDT_SESSION_COMPATIBLE`h]hLUO_FDT_SESSION_COMPATIBLE}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh must be updated.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:37: ./include/linux/kho/abi/luo.hhKhjzhhubeh}(h] public-apiah ]h"] public apiah$]h&]uh1hhhhhhhhK"ubh)}(hhh](h)}(h Internal APIh]h Internal API}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhhhhhK/ubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jliveupdate_reboot (C function)c.liveupdate_reboothNtauh1jhjIhhhNhNubj)}(hhh](j)}(hint liveupdate_reboot (void)h]j)}(hint liveupdate_reboot(void)h](hdesc_sig_keyword_type)}(hinth]hint}(hjuhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jshjohhh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:48: ./kernel/liveupdate/luo_core.chKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjohhhjhKubj)}(hliveupdate_rebooth]j)}(hliveupdate_rebooth]hliveupdate_reboot}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjohhhjhKubhdesc_parameterlist)}(h(void)h]hdesc_parameter)}(hvoidh]jt)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjohhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjkhhhjhKubah}(h]jfah ](jjeh"]h$]h&]j j )j huh1jhjhKhjhhhubj )}(hhh]h)}(h;Kernel reboot notifier for live update final serialization.h]h;Kernel reboot notifier for live update final serialization.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:48: ./kernel/liveupdate/luo_core.chKhjhhubah}(h]h ]h"]h$]h&]uh1j hjhhhhjhKubeh}(h]h ](jifunctioneh"]h$]h&]j$ jij% jj& jj' j( j) uh1jhhhjIhNhNubj+ )}(h**Parameters** ``void`` no arguments **Description** This function is invoked directly from the reboot() syscall pathway if kexec is in progress. If any callback fails, this function aborts KHO, undoes the freeze() callbacks, and returns an error.h](h)}(h**Parameters**h]j5 )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:48: ./kernel/liveupdate/luo_core.chKhjubj )}(hhh]j)}(h``void`` no arguments h](j)}(h``void``h]j])}(hj"h]hvoid}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:48: ./kernel/liveupdate/luo_core.chKhjubj%)}(hhh]h)}(h no argumentsh]h no arguments}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hKhj8ubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hj7hKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j5 )}(hj]h]h Description}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj[ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:48: ./kernel/liveupdate/luo_core.chKhjubh)}(h\This function is invoked directly from the reboot() syscall pathway if kexec is in progress.h]h\This function is invoked directly from the reboot() syscall pathway if kexec is in progress.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:48: ./kernel/liveupdate/luo_core.chKhjubh)}(heIf any callback fails, this function aborts KHO, undoes the freeze() callbacks, and returns an error.h]heIf any callback fails, this function aborts KHO, undoes the freeze() callbacks, and returns an error.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:48: ./kernel/liveupdate/luo_core.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjIhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jliveupdate_enabled (C function)c.liveupdate_enabledhNtauh1jhjIhhhNhNubj)}(hhh](j)}(hbool liveupdate_enabled (void)h]j)}(hbool liveupdate_enabled(void)h](jt)}(hboolh]hbool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jshjhhh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:48: ./kernel/liveupdate/luo_core.chKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(hliveupdate_enabledh]j)}(hliveupdate_enabledh]hliveupdate_enabled}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubj)}(h(void)h]j)}(hvoidh]jt)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jshjubah}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]j j )j huh1jhjhKhjhhubj )}(hhh]h)}(h,Check if the live update feature is enabled.h]h,Check if the live update feature is enabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:48: ./kernel/liveupdate/luo_core.chKhjhhubah}(h]h ]h"]h$]h&]uh1j hjhhhjhKubeh}(h]h ](jifunctioneh"]h$]h&]j$ jij% j0j& j0j' j( j) uh1jhhhjIhNhNubj+ )}(hX**Parameters** ``void`` no arguments **Description** This function returns the state of the live update feature flag, which can be controlled via the ``liveupdate`` kernel command-line parameter. **return** true if live update is enabled, false otherwise.h](h)}(h**Parameters**h]j5 )}(hj:h]h Parameters}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj8ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:48: ./kernel/liveupdate/luo_core.chKhj4ubj )}(hhh]j)}(h``void`` no arguments h](j)}(h``void``h]j])}(hjYh]hvoid}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjWubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:48: ./kernel/liveupdate/luo_core.chKhjSubj%)}(hhh]h)}(h no argumentsh]h no arguments}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhKhjoubah}(h]h ]h"]h$]h&]uh1j$hjSubeh}(h]h ]h"]h$]h&]uh1j hjnhKhjPubah}(h]h ]h"]h$]h&]uh1jhj4ubh)}(h**Description**h]j5 )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:48: ./kernel/liveupdate/luo_core.chKhj4ubh)}(hThis function returns the state of the live update feature flag, which can be controlled via the ``liveupdate`` kernel command-line parameter.h](haThis function returns the state of the live update feature flag, which can be controlled via the }(hjhhhNhNubj])}(h``liveupdate``h]h liveupdate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubh kernel command-line parameter.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:48: ./kernel/liveupdate/luo_core.chKhj4ubh)}(h;**return** true if live update is enabled, false otherwise.h](j5 )}(h **return**h]hreturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubh1 true if live update is enabled, false otherwise.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:48: ./kernel/liveupdate/luo_core.chKhj4ubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjIhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jluo_session_header (C struct)c.luo_session_headerhNtauh1jhjIhhhNhNubj)}(hhh](j)}(hluo_session_headerh]j)}(hstruct luo_session_headerh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(hluo_session_headerh]j)}(hjh]hluo_session_header}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]j j )j huh1jhjhKhjhhubj )}(hhh]h)}(h(Header struct for managing LUO sessions.h]h(Header struct for managing LUO sessions.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKOhjGhhubah}(h]h ]h"]h$]h&]uh1j hjhhhjhKubeh}(h]h ](jistructeh"]h$]h&]j$ jij% jbj& jbj' j( j) uh1jhhhjIhNhNubj+ )}(hX**Definition**:: struct luo_session_header { long count; struct list_head list; struct rw_semaphore rwsem; struct luo_session_header_ser *header_ser; struct luo_session_ser *ser; bool active; }; **Members** ``count`` The number of sessions currently tracked in the **list**. ``list`` The head of the linked list of `struct luo_session` instances. ``rwsem`` A read-write semaphore providing synchronized access to the session list and other fields in this structure. ``header_ser`` The header data of serialization array. ``ser`` The serialized session data (an array of `struct luo_session_ser`). ``active`` Set to true when first initialized. If previous kernel did not send session data, active stays false for incoming.h](h)}(h**Definition**::h](j5 )}(h**Definition**h]h Definition}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjjubh:}(hjjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKShjfubj9)}(hstruct luo_session_header { long count; struct list_head list; struct rw_semaphore rwsem; struct luo_session_header_ser *header_ser; struct luo_session_ser *ser; bool active; };h]hstruct luo_session_header { long count; struct list_head list; struct rw_semaphore rwsem; struct luo_session_header_ser *header_ser; struct luo_session_ser *ser; bool active; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j8hc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKUhjfubh)}(h **Members**h]j5 )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chK^hjfubj )}(hhh](j)}(hD``count`` The number of sessions currently tracked in the **list**. h](j)}(h ``count``h]j])}(hjh]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKQhjubj%)}(hhh]h)}(h9The number of sessions currently tracked in the **list**.h](h0The number of sessions currently tracked in the }(hjhhhNhNubj5 )}(h**list**h]hlist}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKQhjubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hjhKQhjubj)}(hH``list`` The head of the linked list of `struct luo_session` instances. h](j)}(h``list``h]j])}(hjh]hlist}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKRhjubj%)}(hhh]h)}(h>The head of the linked list of `struct luo_session` instances.h](hThe head of the linked list of }(hjhhhNhNubj)}(h`struct luo_session`h]hstruct luo_session}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh instances.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKRhjubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hjhKRhjubj)}(hw``rwsem`` A read-write semaphore providing synchronized access to the session list and other fields in this structure. h](j)}(h ``rwsem``h]j])}(hjMh]hrwsem}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjKubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKThjGubj%)}(hhh]h)}(hlA read-write semaphore providing synchronized access to the session list and other fields in this structure.h]hlA read-write semaphore providing synchronized access to the session list and other fields in this structure.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKShjcubah}(h]h ]h"]h$]h&]uh1j$hjGubeh}(h]h ]h"]h$]h&]uh1j hjbhKThjubj)}(h7``header_ser`` The header data of serialization array. h](j)}(h``header_ser``h]j])}(hjh]h header_ser}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKUhjubj%)}(hhh]h)}(h'The header data of serialization array.h]h'The header data of serialization array.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKUhjubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hjhKUhjubj)}(hL``ser`` The serialized session data (an array of `struct luo_session_ser`). h](j)}(h``ser``h]j])}(hjh]hser}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKWhjubj%)}(hhh]h)}(hCThe serialized session data (an array of `struct luo_session_ser`).h](h)The serialized session data (an array of }(hjhhhNhNubj)}(h`struct luo_session_ser`h]hstruct luo_session_ser}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKVhjubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hjhKWhjubj)}(h}``active`` Set to true when first initialized. If previous kernel did not send session data, active stays false for incoming.h](j)}(h ``active``h]j])}(hj h]hactive}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj ubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKXhjubj%)}(hhh]h)}(hrSet to true when first initialized. If previous kernel did not send session data, active stays false for incoming.h]hrSet to true when first initialized. If previous kernel did not send session data, active stays false for incoming.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hKXhj"ubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hj!hKXhjubeh}(h]h ]h"]h$]h&]uh1jhjfubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjIhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jluo_session_global (C struct)c.luo_session_globalhNtauh1jhjIhhhNhNubj)}(hhh](j)}(hluo_session_globalh]j)}(hstruct luo_session_globalh](j)}(hjh]hstruct}(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjahhhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chK_ubj)}(h h]h }(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjahhhjrhK_ubj)}(hluo_session_globalh]j)}(hj_h]hluo_session_global}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjahhhjrhK_ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj]hhhjrhK_ubah}(h]jXah ](jjeh"]h$]h&]j j )j huh1jhjrhK_hjZhhubj )}(hhh]h)}(h+Global container for managing LUO sessions.h]h+Global container for managing LUO sessions.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKdhjhhubah}(h]h ]h"]h$]h&]uh1j hjZhhhjrhK_ubeh}(h]h ](jistructeh"]h$]h&]j$ jij% jj& jj' j( j) uh1jhhhjIhNhNubj+ )}(hX **Definition**:: struct luo_session_global { struct luo_session_header incoming; struct luo_session_header outgoing; }; **Members** ``incoming`` The sessions passed from the previous kernel. ``outgoing`` The sessions that are going to be passed to the next kernel.h](h)}(h**Definition**::h](j5 )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKhhjubj9)}(hnstruct luo_session_global { struct luo_session_header incoming; struct luo_session_header outgoing; };h]hnstruct luo_session_global { struct luo_session_header incoming; struct luo_session_header outgoing; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j8hc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKjhjubh)}(h **Members**h]j5 )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKohjubj )}(hhh](j)}(h;``incoming`` The sessions passed from the previous kernel. h](j)}(h ``incoming``h]j])}(hjh]hincoming}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKfhjubj%)}(hhh]h)}(h-The sessions passed from the previous kernel.h]h-The sessions passed from the previous kernel.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hKfhj*ubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hj)hKfhj ubj)}(hI``outgoing`` The sessions that are going to be passed to the next kernel.h](j)}(h ``outgoing``h]j])}(hjMh]houtgoing}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjKubah}(h]h ]h"]h$]h&]uh1jhc/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:51: ./kernel/liveupdate/luo_session.chKfhjGubj%)}(hhh]h)}(h` that manages this type of file. ``file`` Pointer to the kernel's :c:type:`struct file ` that is being preserved. This is NULL in the new kernel until the file is successfully retrieved. ``serialized_data`` The opaque u64 handle to the serialized state of the file. This handle is passed back to the handler's .freeze(), .retrieve(), and .finish() callbacks, allowing it to track and update its serialized state across phases. ``private_data`` Pointer to the private data for the file used to hold runtime state that is not preserved. Set by the handler's .preserve() callback, and must be freed in the handler's .unpreserve() callback. ``retrieved`` A flag indicating whether a user/kernel in the new kernel has successfully called retrieve() on this file. This prevents multiple retrieval attempts. ``mutex`` A mutex that protects the fields of this specific instance (e.g., **retrieved**, **file**), ensuring that operations like retrieving or finishing a file are atomic. ``list`` The list_head linking this instance into its parent file_set's list of preserved files. ``token`` The user-provided unique token used to identify this file.h](h)}(h**Definition**::h](j5 )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chK~hjubj9)}(hstruct luo_file { struct liveupdate_file_handler *fh; struct file *file; u64 serialized_data; void *private_data; bool retrieved; struct mutex mutex; struct list_head list; u64 token; };h]hstruct luo_file { struct liveupdate_file_handler *fh; struct file *file; u64 serialized_data; void *private_data; bool retrieved; struct mutex mutex; struct list_head list; u64 token; };}hjsbah}(h]h ]h"]h$]h&]hhuh1j8h`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhjubh)}(h **Members**h]j5 )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhjubj )}(hhh](j)}(hy``fh`` Pointer to the :c:type:`struct liveupdate_file_handler ` that manages this type of file. h](j)}(h``fh``h]j])}(hjh]hfh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chK}hjubj%)}(hhh]h)}(hqPointer to the :c:type:`struct liveupdate_file_handler ` that manages this type of file.h](hPointer to the }(hjhhhNhNubh)}(hB:c:type:`struct liveupdate_file_handler `h]j])}(hj h]hstruct liveupdate_file_handler}(hjhhhNhNubah}(h]h ](jhjic-typeeh"]h$]h&]uh1j\hj ubah}(h]h ]h"]h$]h&]refdocju refdomainjireftypetype refexplicitrefwarnjjj{liveupdate_file_handleruh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chK|hjubh that manages this type of file.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj*hK|hjubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hjhK}hjubj)}(h``file`` Pointer to the kernel's :c:type:`struct file ` that is being preserved. This is NULL in the new kernel until the file is successfully retrieved. h](j)}(h``file``h]j])}(hjGh]hfile}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjEubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhjAubj%)}(hhh]h)}(hPointer to the kernel's :c:type:`struct file ` that is being preserved. This is NULL in the new kernel until the file is successfully retrieved.h](hPointer to the kernel’s }(hj`hhhNhNubh)}(h:c:type:`struct file `h]j])}(hjjh]h struct file}(hjlhhhNhNubah}(h]h ](jhjic-typeeh"]h$]h&]uh1j\hjhubah}(h]h ]h"]h$]h&]refdocju refdomainjireftypetype refexplicitrefwarnjjj{fileuh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chK~hj`ubhb that is being preserved. This is NULL in the new kernel until the file is successfully retrieved.}(hj`hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK~hj]ubah}(h]h ]h"]h$]h&]uh1j$hjAubeh}(h]h ]h"]h$]h&]uh1j hj\hKhjubj)}(h``serialized_data`` The opaque u64 handle to the serialized state of the file. This handle is passed back to the handler's .freeze(), .retrieve(), and .finish() callbacks, allowing it to track and update its serialized state across phases. h](j)}(h``serialized_data``h]j])}(hjh]hserialized_data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhjubj%)}(hhh]h)}(hThe opaque u64 handle to the serialized state of the file. This handle is passed back to the handler's .freeze(), .retrieve(), and .finish() callbacks, allowing it to track and update its serialized state across phases.h]hThe opaque u64 handle to the serialized state of the file. This handle is passed back to the handler’s .freeze(), .retrieve(), and .finish() callbacks, allowing it to track and update its serialized state across phases.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhjubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj)}(h``private_data`` Pointer to the private data for the file used to hold runtime state that is not preserved. Set by the handler's .preserve() callback, and must be freed in the handler's .unpreserve() callback. h](j)}(h``private_data``h]j])}(hjh]h private_data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhjubj%)}(hhh]h)}(hPointer to the private data for the file used to hold runtime state that is not preserved. Set by the handler's .preserve() callback, and must be freed in the handler's .unpreserve() callback.h]hPointer to the private data for the file used to hold runtime state that is not preserved. Set by the handler’s .preserve() callback, and must be freed in the handler’s .unpreserve() callback.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhjubah}(h]h ]h"]h$]h&]uh1j$hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj)}(h``retrieved`` A flag indicating whether a user/kernel in the new kernel has successfully called retrieve() on this file. This prevents multiple retrieval attempts. h](j)}(h ``retrieved``h]j])}(hj h]h retrieved}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj ubj%)}(hhh]h)}(hA flag indicating whether a user/kernel in the new kernel has successfully called retrieve() on this file. This prevents multiple retrieval attempts.h]hA flag indicating whether a user/kernel in the new kernel has successfully called retrieve() on this file. This prevents multiple retrieval attempts.}(hj1 hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj. ubah}(h]h ]h"]h$]h&]uh1j$hj ubeh}(h]h ]h"]h$]h&]uh1j hj- hKhjubj)}(h``mutex`` A mutex that protects the fields of this specific instance (e.g., **retrieved**, **file**), ensuring that operations like retrieving or finishing a file are atomic. h](j)}(h ``mutex``h]j])}(hjR h]hmutex}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjP ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhjL ubj%)}(hhh]h)}(hA mutex that protects the fields of this specific instance (e.g., **retrieved**, **file**), ensuring that operations like retrieving or finishing a file are atomic.h](hBA mutex that protects the fields of this specific instance (e.g., }(hjk hhhNhNubj5 )}(h **retrieved**h]h retrieved}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjk ubh, }(hjk hhhNhNubj5 )}(h**file**h]hfile}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjk ubhK), ensuring that operations like retrieving or finishing a file are atomic.}(hjk hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhjh ubah}(h]h ]h"]h$]h&]uh1j$hjL ubeh}(h]h ]h"]h$]h&]uh1j hjg hKhjubj)}(ha``list`` The list_head linking this instance into its parent file_set's list of preserved files. h](j)}(h``list``h]j])}(hj h]hlist}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj ubj%)}(hhh]h)}(hWThe list_head linking this instance into its parent file_set's list of preserved files.h]hYThe list_head linking this instance into its parent file_set’s list of preserved files.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj ubah}(h]h ]h"]h$]h&]uh1j$hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKhjubj)}(hD``token`` The user-provided unique token used to identify this file.h](j)}(h ``token``h]j])}(hj h]htoken}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj ubj%)}(hhh]h)}(h:The user-provided unique token used to identify this file.h]h:The user-provided unique token used to identify this file.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj!ubah}(h]h ]h"]h$]h&]uh1j$hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjIhhhNhNubh)}(h**Description**h]j5 )}(hj-!h]h Description}(hj/!hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj+!ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhjIhhubh)}(hX5This structure is the core in-kernel representation of a single file being managed through a live update. An instance is created by luo_preserve_file() to link a 'struct file' to its corresponding handler, a user-provided token, and the serialized state handle returned by the handler's .preserve() operation.h]hX;This structure is the core in-kernel representation of a single file being managed through a live update. An instance is created by luo_preserve_file() to link a ‘struct file’ to its corresponding handler, a user-provided token, and the serialized state handle returned by the handler’s .preserve() operation.}(hjC!hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhjIhhubh)}(hXYThese instances are tracked in a per-file_set list. The **serialized_data** field, which holds a handle to the file's serialized state, may be updated during the .freeze() callback before being serialized for the next kernel. After reboot, these structures are recreated by luo_file_deserialize() and are finally cleaned up by luo_file_finish().h](h8These instances are tracked in a per-file_set list. The }(hjR!hhhNhNubj5 )}(h**serialized_data**h]hserialized_data}(hjZ!hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjR!ubhX field, which holds a handle to the file’s serialized state, may be updated during the .freeze() callback before being serialized for the next kernel. After reboot, these structures are recreated by luo_file_deserialize() and are finally cleaned up by luo_file_finish().}(hjR!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhjIhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jluo_preserve_file (C function)c.luo_preserve_filehNtauh1jhjIhhhNhNubj)}(hhh](j)}(hHint luo_preserve_file (struct luo_file_set *file_set, u64 token, int fd)h]j)}(hGint luo_preserve_file(struct luo_file_set *file_set, u64 token, int fd)h](jt)}(hinth]hint}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jshj!hhh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!hhhj!hKubj)}(hluo_preserve_fileh]j)}(hluo_preserve_fileh]hluo_preserve_file}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj!hhhj!hKubj)}(h2(struct luo_file_set *file_set, u64 token, int fd)h](j)}(hstruct luo_file_set *file_seth](j)}(hjh]hstruct}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubh)}(hhh]j)}(h luo_file_seth]h luo_file_set}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&] refdomainjireftype identifier reftargetj!modnameN classnameNjj)}j ]j ASTIdentifier)}j!j!sbc.luo_preserve_fileasbuh1hhj!ubj)}(h h]h }(hj "hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubhdesc_sig_punctuation)}(h*h]h*}(hj"hhhNhNubah}(h]h ]pah"]h$]h&]uh1j"hj!ubj)}(hfile_seth]hfile_set}(hj)"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj!ubj)}(h u64 tokenh](h)}(hhh]j)}(hu64h]hu64}(hjE"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjB"ubah}(h]h ]h"]h$]h&] refdomainjireftypej! reftargetjG"modnameN classnameNjj)}j ]j"c.luo_preserve_fileasbuh1hhj>"ubj)}(h h]h }(hjc"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>"ubj)}(htokenh]htoken}(hjq"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>"ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj!ubj)}(hint fdh](jt)}(hinth]hint}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jshj"ubj)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(hfdh]hfd}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj!ubeh}(h]h ]h"]h$]h&]hhuh1jhj!hhhj!hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj!hhhj!hKubah}(h]j!ah ](jjeh"]h$]h&]j j )j huh1jhj!hKhj!hhubj )}(hhh]h)}(h/Initiate the preservation of a file descriptor.h]h/Initiate the preservation of a file descriptor.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj"hhubah}(h]h ]h"]h$]h&]uh1j hj!hhhj!hKubeh}(h]h ](jifunctioneh"]h$]h&]j$ jij% j"j& j"j' j( j) uh1jhhhjIhNhNubj+ )}(hX**Parameters** ``struct luo_file_set *file_set`` The file_set to which the preserved file will be added. ``u64 token`` A unique, user-provided identifier for the file. ``int fd`` The file descriptor to be preserved. **Description** This function orchestrates the first phase of preserving a file. Upon entry, it takes a reference to the 'struct file' via fget(), effectively making LUO a co-owner of the file. This reference is held until the file is either unpreserved or successfully finished in the next kernel, preventing the file from being prematurely destroyed. This function orchestrates the first phase of preserving a file. It performs the following steps: 1. Validates that the **token** is not already in use within the file_set. 2. Ensures the file_set's memory for files serialization is allocated (allocates if needed). 3. Iterates through registered handlers, calling can_preserve() to find one compatible with the given **fd**. 4. Calls the handler's .preserve() operation, which saves the file's state and returns an opaque private data handle. 5. Adds the new instance to the file_set's internal list. On success, LUO takes a reference to the 'struct file' and considers it under its management until it is unpreserved or finished. In case of any failure, all intermediate allocations (file reference, memory for the 'luo_file' struct, etc.) are cleaned up before returning an error. **Context** Can be called from an ioctl handler during normal system operation. **Return** 0 on success. Returns a negative errno on failure: -EEXIST if the token is already used. -EBADF if the file descriptor is invalid. -ENOSPC if the file_set is full. -ENOENT if no compatible handler is found. -ENOMEM on memory allocation failure. Other erros might be returned by .preserve().h](h)}(h**Parameters**h]j5 )}(hj"h]h Parameters}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj"ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj"ubj )}(hhh](j)}(hZ``struct luo_file_set *file_set`` The file_set to which the preserved file will be added. h](j)}(h!``struct luo_file_set *file_set``h]j])}(hj#h]hstruct luo_file_set *file_set}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj#ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj #ubj%)}(hhh]h)}(h7The file_set to which the preserved file will be added.h]h7The file_set to which the preserved file will be added.}(hj*#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&#hKhj'#ubah}(h]h ]h"]h$]h&]uh1j$hj #ubeh}(h]h ]h"]h$]h&]uh1j hj&#hKhj#ubj)}(h?``u64 token`` A unique, user-provided identifier for the file. h](j)}(h ``u64 token``h]j])}(hjJ#h]h u64 token}(hjL#hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjH#ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhjD#ubj%)}(hhh]h)}(h0A unique, user-provided identifier for the file.h]h0A unique, user-provided identifier for the file.}(hjc#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_#hKhj`#ubah}(h]h ]h"]h$]h&]uh1j$hjD#ubeh}(h]h ]h"]h$]h&]uh1j hj_#hKhj#ubj)}(h0``int fd`` The file descriptor to be preserved. h](j)}(h ``int fd``h]j])}(hj#h]hint fd}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj#ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj}#ubj%)}(hhh]h)}(h$The file descriptor to be preserved.h]h$The file descriptor to be preserved.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hKhj#ubah}(h]h ]h"]h$]h&]uh1j$hj}#ubeh}(h]h ]h"]h$]h&]uh1j hj#hKhj#ubeh}(h]h ]h"]h$]h&]uh1jhj"ubh)}(h**Description**h]j5 )}(hj#h]h Description}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj#ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj"ubh)}(hXPThis function orchestrates the first phase of preserving a file. Upon entry, it takes a reference to the 'struct file' via fget(), effectively making LUO a co-owner of the file. This reference is held until the file is either unpreserved or successfully finished in the next kernel, preventing the file from being prematurely destroyed.h]hXTThis function orchestrates the first phase of preserving a file. Upon entry, it takes a reference to the ‘struct file’ via fget(), effectively making LUO a co-owner of the file. This reference is held until the file is either unpreserved or successfully finished in the next kernel, preventing the file from being prematurely destroyed.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj"ubh)}(haThis function orchestrates the first phase of preserving a file. It performs the following steps:h]haThis function orchestrates the first phase of preserving a file. It performs the following steps:}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj"ubj:)}(hhh](j)}(hGValidates that the **token** is not already in use within the file_set.h]h)}(hj#h](hValidates that the }(hj#hhhNhNubj5 )}(h **token**h]htoken}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj#ubh+ is not already in use within the file_set.}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj#ubah}(h]h ]h"]h$]h&]uh1jhj#ubj)}(hYEnsures the file_set's memory for files serialization is allocated (allocates if needed).h]h)}(hYEnsures the file_set's memory for files serialization is allocated (allocates if needed).h]h[Ensures the file_set’s memory for files serialization is allocated (allocates if needed).}(hj#$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj$ubah}(h]h ]h"]h$]h&]uh1jhj#ubj)}(hjIterates through registered handlers, calling can_preserve() to find one compatible with the given **fd**.h]h)}(hjIterates through registered handlers, calling can_preserve() to find one compatible with the given **fd**.h](hcIterates through registered handlers, calling can_preserve() to find one compatible with the given }(hj<$hhhNhNubj5 )}(h**fd**h]hfd}(hjD$hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj<$ubh.}(hj<$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj8$ubah}(h]h ]h"]h$]h&]uh1jhj#ubj)}(hrCalls the handler's .preserve() operation, which saves the file's state and returns an opaque private data handle.h]h)}(hrCalls the handler's .preserve() operation, which saves the file's state and returns an opaque private data handle.h]hvCalls the handler’s .preserve() operation, which saves the file’s state and returns an opaque private data handle.}(hjg$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhjc$ubah}(h]h ]h"]h$]h&]uh1jhj#ubj)}(h7Adds the new instance to the file_set's internal list. h]h)}(h6Adds the new instance to the file_set's internal list.h]h8Adds the new instance to the file_set’s internal list.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj|$ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]jjjhjjuh1j9hj"ubh)}(hOn success, LUO takes a reference to the 'struct file' and considers it under its management until it is unpreserved or finished.h]hOn success, LUO takes a reference to the ‘struct file’ and considers it under its management until it is unpreserved or finished.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj"ubh)}(hIn case of any failure, all intermediate allocations (file reference, memory for the 'luo_file' struct, etc.) are cleaned up before returning an error.h]hIn case of any failure, all intermediate allocations (file reference, memory for the ‘luo_file’ struct, etc.) are cleaned up before returning an error.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj"ubh)}(h **Context**h]j5 )}(hj$h]hContext}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj$ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj"ubh)}(hCCan be called from an ioctl handler during normal system operation.h]hCCan be called from an ioctl handler during normal system operation.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj"ubh)}(h **Return**h]j5 )}(hj$h]hReturn}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj$ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj"ubh)}(hX"0 on success. Returns a negative errno on failure: -EEXIST if the token is already used. -EBADF if the file descriptor is invalid. -ENOSPC if the file_set is full. -ENOENT if no compatible handler is found. -ENOMEM on memory allocation failure. Other erros might be returned by .preserve().h]hX"0 on success. Returns a negative errno on failure: -EEXIST if the token is already used. -EBADF if the file descriptor is invalid. -ENOSPC if the file_set is full. -ENOENT if no compatible handler is found. -ENOMEM on memory allocation failure. Other erros might be returned by .preserve().}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chKhj"ubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjIhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j&luo_file_unpreserve_files (C function)c.luo_file_unpreserve_fileshNtauh1jhjIhhhNhNubj)}(hhh](j)}(h>void luo_file_unpreserve_files (struct luo_file_set *file_set)h]j)}(h=void luo_file_unpreserve_files(struct luo_file_set *file_set)h](jt)}(hvoidh]hvoid}(hj'%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jshj#%hhh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMCubj)}(h h]h }(hj6%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#%hhhj5%hMCubj)}(hluo_file_unpreserve_filesh]j)}(hluo_file_unpreserve_filesh]hluo_file_unpreserve_files}(hjH%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD%ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj#%hhhj5%hMCubj)}(h(struct luo_file_set *file_set)h]j)}(hstruct luo_file_set *file_seth](j)}(hjh]hstruct}(hjd%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`%ubj)}(h h]h }(hjq%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`%ubh)}(hhh]j)}(h luo_file_seth]h luo_file_set}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&] refdomainjireftypej! reftargetj%modnameN classnameNjj)}j ]j")}j!jJ%sbc.luo_file_unpreserve_filesasbuh1hhj`%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`%ubj")}(hj"h]h*}(hj%hhhNhNubah}(h]h ]j%"ah"]h$]h&]uh1j"hj`%ubj)}(hfile_seth]hfile_set}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj\%ubah}(h]h ]h"]h$]h&]hhuh1jhj#%hhhj5%hMCubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj%hhhj5%hMCubah}(h]j%ah ](jjeh"]h$]h&]j j )j huh1jhj5%hMChj%hhubj )}(hhh]h)}(h&Unpreserves all files from a file_set.h]h&Unpreserves all files from a file_set.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMChj%hhubah}(h]h ]h"]h$]h&]uh1j hj%hhhj5%hMCubeh}(h]h ](jifunctioneh"]h$]h&]j$ jij% j%j& j%j' j( j) uh1jhhhjIhNhNubj+ )}(hX(**Parameters** ``struct luo_file_set *file_set`` The files to be cleaned up. **Description** This function serves as the primary cleanup path for a file_set. It is invoked when the userspace agent closes the file_set's file descriptor. For each file, it performs the following cleanup actions: 1. Calls the handler's .unpreserve() callback to allow the handler to release any resources it allocated. 2. Removes the file from the file_set's internal tracking list. 3. Releases the reference to the 'struct file' that was taken by luo_preserve_file() via fput(), returning ownership. 4. Frees the memory associated with the internal 'struct luo_file'. After all individual files are unpreserved, it frees the contiguous memory block that was allocated to hold their serialization data.h](h)}(h**Parameters**h]j5 )}(hj &h]h Parameters}(hj &hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj&ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMGhj&ubj )}(hhh]j)}(h>``struct luo_file_set *file_set`` The files to be cleaned up. h](j)}(h!``struct luo_file_set *file_set``h]j])}(hj(&h]hstruct luo_file_set *file_set}(hj*&hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj&&ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMDhj"&ubj%)}(hhh]h)}(hThe files to be cleaned up.h]hThe files to be cleaned up.}(hjA&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=&hMDhj>&ubah}(h]h ]h"]h$]h&]uh1j$hj"&ubeh}(h]h ]h"]h$]h&]uh1j hj=&hMDhj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubh)}(h**Description**h]j5 )}(hjc&h]h Description}(hje&hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hja&ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMFhj&ubh)}(hThis function serves as the primary cleanup path for a file_set. It is invoked when the userspace agent closes the file_set's file descriptor.h]hThis function serves as the primary cleanup path for a file_set. It is invoked when the userspace agent closes the file_set’s file descriptor.}(hjy&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMEhj&ubj )}(hhh]j)}(hXFor each file, it performs the following cleanup actions: 1. Calls the handler's .unpreserve() callback to allow the handler to release any resources it allocated. 2. Removes the file from the file_set's internal tracking list. 3. Releases the reference to the 'struct file' that was taken by luo_preserve_file() via fput(), returning ownership. 4. Frees the memory associated with the internal 'struct luo_file'. h](j)}(h9For each file, it performs the following cleanup actions:h]h9For each file, it performs the following cleanup actions:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMNhj&ubj%)}(hhh]j:)}(hhh](j)}(hfCalls the handler's .unpreserve() callback to allow the handler to release any resources it allocated.h]h)}(hfCalls the handler's .unpreserve() callback to allow the handler to release any resources it allocated.h]hhCalls the handler’s .unpreserve() callback to allow the handler to release any resources it allocated.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMIhj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubj)}(hRemoves the file from the file_set’s internal tracking list.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMKhj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubj)}(hrReleases the reference to the 'struct file' that was taken by luo_preserve_file() via fput(), returning ownership.h]h)}(hrReleases the reference to the 'struct file' that was taken by luo_preserve_file() via fput(), returning ownership.h]hvReleases the reference to the ‘struct file’ that was taken by luo_preserve_file() via fput(), returning ownership.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMLhj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubj)}(hAFrees the memory associated with the internal 'struct luo_file'. h]h)}(h@Frees the memory associated with the internal 'struct luo_file'.h]hDFrees the memory associated with the internal ‘struct luo_file’.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMNhj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]jjjhjjuh1j9hj&ubah}(h]h ]h"]h$]h&]uh1j$hj&ubeh}(h]h ]h"]h$]h&]uh1j hj&hMNhj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubh)}(hAfter all individual files are unpreserved, it frees the contiguous memory block that was allocated to hold their serialization data.h]hAfter all individual files are unpreserved, it frees the contiguous memory block that was allocated to hold their serialization data.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMPhj&ubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjIhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jluo_file_freeze (C function)c.luo_file_freezehNtauh1jhjIhhhNhNubj)}(hhh](j)}(hZint luo_file_freeze (struct luo_file_set *file_set, struct luo_file_set_ser *file_set_ser)h]j)}(hYint luo_file_freeze(struct luo_file_set *file_set, struct luo_file_set_ser *file_set_ser)h](jt)}(hinth]hint}(hjM'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jshjI'hhh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMubj)}(h h]h }(hj\'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjI'hhhj['hMubj)}(hluo_file_freezeh]j)}(hluo_file_freezeh]hluo_file_freeze}(hjn'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjj'ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjI'hhhj['hMubj)}(hF(struct luo_file_set *file_set, struct luo_file_set_ser *file_set_ser)h](j)}(hstruct luo_file_set *file_seth](j)}(hjh]hstruct}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubh)}(hhh]j)}(h luo_file_seth]h luo_file_set}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&] refdomainjireftypej! reftargetj'modnameN classnameNjj)}j ]j")}j!jp'sbc.luo_file_freezeasbuh1hhj'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj")}(hj"h]h*}(hj'hhhNhNubah}(h]h ]j%"ah"]h$]h&]uh1j"hj'ubj)}(hfile_seth]hfile_set}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj'ubj)}(h%struct luo_file_set_ser *file_set_serh](j)}(hjh]hstruct}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(h h]h }(hj (hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubh)}(hhh]j)}(hluo_file_set_serh]hluo_file_set_ser}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&] refdomainjireftypej! reftargetj(modnameN classnameNjj)}j ]j'c.luo_file_freezeasbuh1hhj'ubj)}(h h]h }(hj8(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj")}(hj"h]h*}(hjF(hhhNhNubah}(h]h ]j%"ah"]h$]h&]uh1j"hj'ubj)}(h file_set_serh]h file_set_ser}(hjS(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj'ubeh}(h]h ]h"]h$]h&]hhuh1jhjI'hhhj['hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjE'hhhj['hMubah}(h]j@'ah ](jjeh"]h$]h&]j j )j huh1jhj['hMhjB'hhubj )}(hhh]h)}(h:Freezes all preserved files and serializes their metadata.h]h:Freezes all preserved files and serializes their metadata.}(hj}(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhjz(hhubah}(h]h ]h"]h$]h&]uh1j hjB'hhhj['hMubeh}(h]h ](jifunctioneh"]h$]h&]j$ jij% j(j& j(j' j( j) uh1jhhhjIhNhNubj+ )}(hXS**Parameters** ``struct luo_file_set *file_set`` The file_set whose files are to be frozen. ``struct luo_file_set_ser *file_set_ser`` Where to put the serialized file_set. **Description** This function is called from the reboot() syscall path, just before the kernel transitions to the new image via kexec. Its purpose is to perform the final preparation and serialization of all preserved files in the file_set. 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. **Return** 0 on success, or a negative errno on failure.h](h)}(h**Parameters**h]j5 )}(hj(h]h Parameters}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj(ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj(ubj )}(hhh](j)}(hM``struct luo_file_set *file_set`` The file_set whose files are to be frozen. h](j)}(h!``struct luo_file_set *file_set``h]j])}(hj(h]hstruct luo_file_set *file_set}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj(ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj(ubj%)}(hhh]h)}(h*The file_set whose files are to be frozen.h]h*The file_set whose files are to be frozen.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hMhj(ubah}(h]h ]h"]h$]h&]uh1j$hj(ubeh}(h]h ]h"]h$]h&]uh1j hj(hMhj(ubj)}(hP``struct luo_file_set_ser *file_set_ser`` Where to put the serialized file_set. h](j)}(h)``struct luo_file_set_ser *file_set_ser``h]j])}(hj(h]h%struct luo_file_set_ser *file_set_ser}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj(ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj(ubj%)}(hhh]h)}(h%Where to put the serialized file_set.h]h%Where to put the serialized file_set.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj )hMhj )ubah}(h]h ]h"]h$]h&]uh1j$hj(ubeh}(h]h ]h"]h$]h&]uh1j hj )hMhj(ubeh}(h]h ]h"]h$]h&]uh1jhj(ubh)}(h**Description**h]j5 )}(hj2)h]h Description}(hj4)hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj0)ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj(ubh)}(hThis function is called from the reboot() syscall path, just before the kernel transitions to the new image via kexec. Its purpose is to perform the final preparation and serialization of all preserved files in the file_set.h]hThis function is called from the reboot() syscall path, just before the kernel transitions to the new image via kexec. Its purpose is to perform the final preparation and serialization of all preserved files in the file_set.}(hjH)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj(ubh)}(hpIt iterates through each preserved file in FIFO order (the order of preservation) and performs two main actions:h]hpIt iterates through each preserved file in FIFO order (the order of preservation) and performs two main actions:}(hjW)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj(ubj:)}(hhh](j)}(hFreezes 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. h]h)}(hFreezes 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.h]hFreezes 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.}(hjm)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhji)ubah}(h]h ]h"]h$]h&]uh1jhjf)ubj)}(hX 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. h]h)}(hXSerializes 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.h]hX!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.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj)ubah}(h]h ]h"]h$]h&]uh1jhjf)ubeh}(h]h ]h"]h$]h&]jjjhjjuh1j9hj(ubh)}(hXError 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.h]hXError 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.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj(ubh)}(h **Context**h]j5 )}(hj)h]hContext}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj)ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj(ubh)}(h.Called only from the liveupdate_reboot() path.h]h.Called only from the liveupdate_reboot() path.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj(ubh)}(h **Return**h]j5 )}(hj)h]hReturn}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj)ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj(ubh)}(h-0 on success, or a negative errno on failure.h]h-0 on success, or a negative errno on failure.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj(ubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjIhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jluo_file_unfreeze (C function)c.luo_file_unfreezehNtauh1jhjIhhhNhNubj)}(hhh](j)}(h]void luo_file_unfreeze (struct luo_file_set *file_set, struct luo_file_set_ser *file_set_ser)h]j)}(h\void luo_file_unfreeze(struct luo_file_set *file_set, struct luo_file_set_ser *file_set_ser)h](jt)}(hvoidh]hvoid}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jshj*hhh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMubj)}(h h]h }(hj-*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*hhhj,*hMubj)}(hluo_file_unfreezeh]j)}(hluo_file_unfreezeh]hluo_file_unfreeze}(hj?*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;*ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj*hhhj,*hMubj)}(hF(struct luo_file_set *file_set, struct luo_file_set_ser *file_set_ser)h](j)}(hstruct luo_file_set *file_seth](j)}(hjh]hstruct}(hj[*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjW*ubj)}(h h]h }(hjh*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjW*ubh)}(hhh]j)}(h luo_file_seth]h luo_file_set}(hjy*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjv*ubah}(h]h ]h"]h$]h&] refdomainjireftypej! reftargetj{*modnameN classnameNjj)}j ]j")}j!jA*sbc.luo_file_unfreezeasbuh1hhjW*ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjW*ubj")}(hj"h]h*}(hj*hhhNhNubah}(h]h ]j%"ah"]h$]h&]uh1j"hjW*ubj)}(hfile_seth]hfile_set}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjW*ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjS*ubj)}(h%struct luo_file_set_ser *file_set_serh](j)}(hjh]hstruct}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubh)}(hhh]j)}(hluo_file_set_serh]hluo_file_set_ser}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&] refdomainjireftypej! reftargetj*modnameN classnameNjj)}j ]j*c.luo_file_unfreezeasbuh1hhj*ubj)}(h h]h }(hj +hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj")}(hj"h]h*}(hj+hhhNhNubah}(h]h ]j%"ah"]h$]h&]uh1j"hj*ubj)}(h file_set_serh]h file_set_ser}(hj$+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjS*ubeh}(h]h ]h"]h$]h&]hhuh1jhj*hhhj,*hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj*hhhj,*hMubah}(h]j*ah ](jjeh"]h$]h&]j j )j huh1jhj,*hMhj*hhubj )}(hhh]h)}(h9Unfreezes all files in a file_set and clear serializationh]h9Unfreezes all files in a file_set and clear serialization}(hjN+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhjK+hhubah}(h]h ]h"]h$]h&]uh1j hj*hhhj,*hMubeh}(h]h ](jifunctioneh"]h$]h&]j$ jij% jf+j& jf+j' j( j) uh1jhhhjIhNhNubj+ )}(hX**Parameters** ``struct luo_file_set *file_set`` The file_set whose files are to be unfrozen. ``struct luo_file_set_ser *file_set_ser`` Serialized file_set. **Description** This function rolls back the state of all files in a file_set after the freeze phase has begun but must be aborted. It is the counterpart to luo_file_freeze(). It invokes the __luo_file_unfreeze() helper with a NULL argument, which signals the helper to iterate through all files in the file_set and call their respective .unfreeze() handler callbacks. **Context** This is called when the live update is aborted during the reboot() syscall, after luo_file_freeze() has been called.h](h)}(h**Parameters**h]j5 )}(hjp+h]h Parameters}(hjr+hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjn+ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhjj+ubj )}(hhh](j)}(hO``struct luo_file_set *file_set`` The file_set whose files are to be unfrozen. h](j)}(h!``struct luo_file_set *file_set``h]j])}(hj+h]hstruct luo_file_set *file_set}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj+ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj+ubj%)}(hhh]h)}(h,The file_set whose files are to be unfrozen.h]h,The file_set whose files are to be unfrozen.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hMhj+ubah}(h]h ]h"]h$]h&]uh1j$hj+ubeh}(h]h ]h"]h$]h&]uh1j hj+hMhj+ubj)}(h?``struct luo_file_set_ser *file_set_ser`` Serialized file_set. h](j)}(h)``struct luo_file_set_ser *file_set_ser``h]j])}(hj+h]h%struct luo_file_set_ser *file_set_ser}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj+ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj+ubj%)}(hhh]h)}(hSerialized file_set.h]hSerialized file_set.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hMhj+ubah}(h]h ]h"]h$]h&]uh1j$hj+ubeh}(h]h ]h"]h$]h&]uh1j hj+hMhj+ubeh}(h]h ]h"]h$]h&]uh1jhjj+ubh)}(h**Description**h]j5 )}(hj,h]h Description}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj,ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhjj+ubh)}(hThis function rolls back the state of all files in a file_set after the freeze phase has begun but must be aborted. It is the counterpart to luo_file_freeze().h]hThis function rolls back the state of all files in a file_set after the freeze phase has begun but must be aborted. It is the counterpart to luo_file_freeze().}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhjj+ubh)}(hIt invokes the __luo_file_unfreeze() helper with a NULL argument, which signals the helper to iterate through all files in the file_set and call their respective .unfreeze() handler callbacks.h]hIt invokes the __luo_file_unfreeze() helper with a NULL argument, which signals the helper to iterate through all files in the file_set and call their respective .unfreeze() handler callbacks.}(hj(,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhjj+ubh)}(h **Context**h]j5 )}(hj9,h]hContext}(hj;,hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj7,ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhjj+ubh)}(htThis is called when the live update is aborted during the reboot() syscall, after luo_file_freeze() has been called.h]htThis is called when the live update is aborted during the reboot() syscall, after luo_file_freeze() has been called.}(hjO,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhjj+ubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjIhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jluo_retrieve_file (C function)c.luo_retrieve_filehNtauh1jhjIhhhNhNubj)}(hhh](j)}(hUint luo_retrieve_file (struct luo_file_set *file_set, u64 token, struct file **filep)h]j)}(hTint luo_retrieve_file(struct luo_file_set *file_set, u64 token, struct file **filep)h](jt)}(hinth]hint}(hj~,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jshjz,hhh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjz,hhhj,hMubj)}(hluo_retrieve_fileh]j)}(hluo_retrieve_fileh]hluo_retrieve_file}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjz,hhhj,hMubj)}(h?(struct luo_file_set *file_set, u64 token, struct file **filep)h](j)}(hstruct luo_file_set *file_seth](j)}(hjh]hstruct}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubh)}(hhh]j)}(h luo_file_seth]h luo_file_set}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&] refdomainjireftypej! reftargetj,modnameN classnameNjj)}j ]j")}j!j,sbc.luo_retrieve_fileasbuh1hhj,ubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubj")}(hj"h]h*}(hj-hhhNhNubah}(h]h ]j%"ah"]h$]h&]uh1j"hj,ubj)}(hfile_seth]hfile_set}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj,ubj)}(h u64 tokenh](h)}(hhh]j)}(hu64h]hu64}(hj0-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj--ubah}(h]h ]h"]h$]h&] refdomainjireftypej! reftargetj2-modnameN classnameNjj)}j ]j,c.luo_retrieve_fileasbuh1hhj)-ubj)}(h h]h }(hjN-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)-ubj)}(htokenh]htoken}(hj\-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)-ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj,ubj)}(hstruct file **fileph](j)}(hjh]hstruct}(hju-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq-ubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq-ubh)}(hhh]j)}(hfileh]hfile}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&] refdomainjireftypej! reftargetj-modnameN classnameNjj)}j ]j,c.luo_retrieve_fileasbuh1hhjq-ubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq-ubj")}(hj"h]h*}(hj-hhhNhNubah}(h]h ]j%"ah"]h$]h&]uh1j"hjq-ubj")}(hj"h]h*}(hj-hhhNhNubah}(h]h ]j%"ah"]h$]h&]uh1j"hjq-ubj)}(hfileph]hfilep}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq-ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj,ubeh}(h]h ]h"]h$]h&]hhuh1jhjz,hhhj,hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjv,hhhj,hMubah}(h]jq,ah ](jjeh"]h$]h&]j j )j huh1jhj,hMhjs,hhubj )}(hhh]h)}(h7Restores a preserved file from a file_set by its token.h]h7Restores a preserved file from a file_set by its token.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj.hhubah}(h]h ]h"]h$]h&]uh1j hjs,hhhj,hMubeh}(h]h ](jifunctioneh"]h$]h&]j$ jij% j.j& j.j' j( j) uh1jhhhjIhNhNubj+ )}(hXw**Parameters** ``struct luo_file_set *file_set`` The file_set from which to retrieve the file. ``u64 token`` The unique token identifying the file to be restored. ``struct file **filep`` Output parameter; on success, this is populated with a pointer to the newly retrieved 'struct file'. **Description** This function is the primary mechanism for recreating a file in the new kernel after a live update. It searches the file_set's list of deserialized files for an entry matching the provided **token**. The operation is idempotent: if a file has already been successfully retrieved, this function will simply return a pointer to the existing 'struct file' and report success without re-executing the retrieve operation. This is handled by checking the 'retrieved' flag under a lock. File retrieval can happen in any order; it is not bound by the order of preservation. **Context** Can be called from an ioctl or other in-kernel code in the new kernel. **Return** 0 on success. Returns a negative errno on failure: -ENOENT if no file with the matching token is found. Any error code returned by the handler's .retrieve() op.h](h)}(h**Parameters**h]j5 )}(hj%.h]h Parameters}(hj'.hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj#.ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj.ubj )}(hhh](j)}(hP``struct luo_file_set *file_set`` The file_set from which to retrieve the file. h](j)}(h!``struct luo_file_set *file_set``h]j])}(hjD.h]hstruct luo_file_set *file_set}(hjF.hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjB.ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj>.ubj%)}(hhh]h)}(h-The file_set from which to retrieve the file.h]h-The file_set from which to retrieve the file.}(hj].hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjY.hMhjZ.ubah}(h]h ]h"]h$]h&]uh1j$hj>.ubeh}(h]h ]h"]h$]h&]uh1j hjY.hMhj;.ubj)}(hD``u64 token`` The unique token identifying the file to be restored. h](j)}(h ``u64 token``h]j])}(hj}.h]h u64 token}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj{.ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhjw.ubj%)}(hhh]h)}(h5The unique token identifying the file to be restored.h]h5The unique token identifying the file to be restored.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hMhj.ubah}(h]h ]h"]h$]h&]uh1j$hjw.ubeh}(h]h ]h"]h$]h&]uh1j hj.hMhj;.ubj)}(h}``struct file **filep`` Output parameter; on success, this is populated with a pointer to the newly retrieved 'struct file'. h](j)}(h``struct file **filep``h]j])}(hj.h]hstruct file **filep}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj.ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj.ubj%)}(hhh]h)}(hdOutput parameter; on success, this is populated with a pointer to the newly retrieved 'struct file'.h]hhOutput parameter; on success, this is populated with a pointer to the newly retrieved ‘struct file’.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj.ubah}(h]h ]h"]h$]h&]uh1j$hj.ubeh}(h]h ]h"]h$]h&]uh1j hj.hMhj;.ubeh}(h]h ]h"]h$]h&]uh1jhj.ubh)}(h**Description**h]j5 )}(hj.h]h Description}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj.ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj.ubh)}(hThis function is the primary mechanism for recreating a file in the new kernel after a live update. It searches the file_set's list of deserialized files for an entry matching the provided **token**.h](hThis function is the primary mechanism for recreating a file in the new kernel after a live update. It searches the file_set’s list of deserialized files for an entry matching the provided }(hj/hhhNhNubj5 )}(h **token**h]htoken}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj/ubh.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj.ubh)}(hXThe operation is idempotent: if a file has already been successfully retrieved, this function will simply return a pointer to the existing 'struct file' and report success without re-executing the retrieve operation. This is handled by checking the 'retrieved' flag under a lock.h]hXThe operation is idempotent: if a file has already been successfully retrieved, this function will simply return a pointer to the existing ‘struct file’ and report success without re-executing the retrieve operation. This is handled by checking the ‘retrieved’ flag under a lock.}(hj)/hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj.ubh)}(hUFile retrieval can happen in any order; it is not bound by the order of preservation.h]hUFile retrieval can happen in any order; it is not bound by the order of preservation.}(hj8/hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj.ubh)}(h **Context**h]j5 )}(hjI/h]hContext}(hjK/hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjG/ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM!hj.ubh)}(hFCan be called from an ioctl or other in-kernel code in the new kernel.h]hFCan be called from an ioctl or other in-kernel code in the new kernel.}(hj_/hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM"hj.ubh)}(h **Return**h]j5 )}(hjp/h]hReturn}(hjr/hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjn/ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM%hj.ubh)}(h0 on success. Returns a negative errno on failure: -ENOENT if no file with the matching token is found. Any error code returned by the handler's .retrieve() op.h]h0 on success. Returns a negative errno on failure: -ENOENT if no file with the matching token is found. Any error code returned by the handler’s .retrieve() op.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM$hj.ubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjIhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jluo_file_finish (C function)c.luo_file_finishhNtauh1jhjIhhhNhNubj)}(hhh](j)}(h3int luo_file_finish (struct luo_file_set *file_set)h]j)}(h2int luo_file_finish(struct luo_file_set *file_set)h](jt)}(hinth]hint}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jshj/hhh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM{ubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/hhhj/hM{ubj)}(hluo_file_finishh]j)}(hluo_file_finishh]hluo_file_finish}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj/hhhj/hM{ubj)}(h(struct luo_file_set *file_set)h]j)}(hstruct luo_file_set *file_seth](j)}(hjh]hstruct}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubh)}(hhh]j)}(h luo_file_seth]h luo_file_set}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 0ubah}(h]h ]h"]h$]h&] refdomainjireftypej! reftargetj0modnameN classnameNjj)}j ]j")}j!j/sbc.luo_file_finishasbuh1hhj/ubj)}(h h]h }(hj00hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubj")}(hj"h]h*}(hj>0hhhNhNubah}(h]h ]j%"ah"]h$]h&]uh1j"hj/ubj)}(hfile_seth]hfile_set}(hjK0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj/ubah}(h]h ]h"]h$]h&]hhuh1jhj/hhhj/hM{ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj/hhhj/hM{ubah}(h]j/ah ](jjeh"]h$]h&]j j )j huh1jhj/hM{hj/hhubj )}(hhh]h)}(h4Completes the lifecycle for all files in a file_set.h]h4Completes the lifecycle for all files in a file_set.}(hju0hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM{hjr0hhubah}(h]h ]h"]h$]h&]uh1j hj/hhhj/hM{ubeh}(h]h ](jifunctioneh"]h$]h&]j$ jij% j0j& j0j' j( j) uh1jhhhjIhNhNubj+ )}(hX**Parameters** ``struct luo_file_set *file_set`` The file_set to be finalized. **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: 1. If file is not yet retrieved, retrieves it, and calls can_finish() on every file in the file_set. If all can_finish return true, continue to finish. 2. Calls the handler's .finish() callback (via luo_file_finish_one) to allow for final resource cleanup within the handler. 3. Releases LUO's ownership reference on the 'struct file' via fput(). This is the counterpart to the get_file() call in luo_retrieve_file(). 4. Removes the 'struct luo_file' from the file_set's internal list. 5. Frees the memory for the 'struct luo_file' instance 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. Error Handling (Atomic Failure): This operation is atomic. If any handler's .can_finish() op fails, the entire function aborts immediately and returns an error. **Context** Can be called from an ioctl handler in the new kernel. **Return** 0 on success, or a negative errno on failure.h](h)}(h**Parameters**h]j5 )}(hj0h]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj0ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj0ubj )}(hhh]j)}(h@``struct luo_file_set *file_set`` The file_set to be finalized. h](j)}(h!``struct luo_file_set *file_set``h]j])}(hj0h]hstruct luo_file_set *file_set}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj0ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM|hj0ubj%)}(hhh]h)}(hThe file_set to be finalized.h]hThe file_set to be finalized.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hM|hj0ubah}(h]h ]h"]h$]h&]uh1j$hj0ubeh}(h]h ]h"]h$]h&]uh1j hj0hM|hj0ubah}(h]h ]h"]h$]h&]uh1jhj0ubh)}(h**Description**h]j5 )}(hj0h]h Description}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj0ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM~hj0ubh)}(hThis 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.h]hThis 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.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM}hj0ubh)}(hvThe function iterates through all tracked files. For each file, it performs the following sequence of cleanup actions:h]hvThe function iterates through all tracked files. For each file, it performs the following sequence of cleanup actions:}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj0ubj:)}(hhh](j)}(hIf file is not yet retrieved, retrieves it, and calls can_finish() on every file in the file_set. If all can_finish return true, continue to finish.h]h)}(hIf file is not yet retrieved, retrieves it, and calls can_finish() on every file in the file_set. If all can_finish return true, continue to finish.h]hIf file is not yet retrieved, retrieves it, and calls can_finish() on every file in the file_set. If all can_finish return true, continue to finish.}(hj,1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhj(1ubah}(h]h ]h"]h$]h&]uh1jhj%1ubj)}(hxCalls the handler's .finish() callback (via luo_file_finish_one) to allow for final resource cleanup within the handler.h]h)}(hxCalls the handler's .finish() callback (via luo_file_finish_one) to allow for final resource cleanup within the handler.h]hzCalls the handler’s .finish() callback (via luo_file_finish_one) to allow for final resource cleanup within the handler.}(hjE1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhjA1ubah}(h]h ]h"]h$]h&]uh1jhj%1ubj)}(hReleases LUO's ownership reference on the 'struct file' via fput(). This is the counterpart to the get_file() call in luo_retrieve_file().h]h)}(hReleases LUO's ownership reference on the 'struct file' via fput(). This is the counterpart to the get_file() call in luo_retrieve_file().h]hReleases LUO’s ownership reference on the ‘struct file’ via fput(). This is the counterpart to the get_file() call in luo_retrieve_file().}(hj^1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhjZ1ubah}(h]h ]h"]h$]h&]uh1jhj%1ubj)}(h@Removes the 'struct luo_file' from the file_set's internal list.h]h)}(hju1h]hFRemoves the ‘struct luo_file’ from the file_set’s internal list.}(hjw1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMhjs1ubah}(h]h ]h"]h$]h&]uh1jhj%1ubj)}(h`. The caller must initialize this structure, including a unique 'compatible' string and a valid 'fh' callbacks. This function adds the handler to the global list of supported file handlers. **Context** Typically called during module initialization for file types that support live update preservation. **Return** 0 on success. Negative errno on failure.h](h)}(h**Parameters**h]j5 )}(hj&6h]h Parameters}(hj(6hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj$6ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM(hj 6ubj )}(hhh]j)}(hXE``struct liveupdate_file_handler *fh`` Pointer to a caller-allocated :c:type:`struct liveupdate_file_handler `. The caller must initialize this structure, including a unique 'compatible' string and a valid 'fh' callbacks. This function adds the handler to the global list of supported file handlers. h](j)}(h&``struct liveupdate_file_handler *fh``h]j])}(hjE6h]h"struct liveupdate_file_handler *fh}(hjG6hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hjC6ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM(hj?6ubj%)}(hhh]h)}(hXPointer to a caller-allocated :c:type:`struct liveupdate_file_handler `. The caller must initialize this structure, including a unique 'compatible' string and a valid 'fh' callbacks. This function adds the handler to the global list of supported file handlers.h](hPointer to a caller-allocated }(hj^6hhhNhNubh)}(hB:c:type:`struct liveupdate_file_handler `h]j])}(hjh6h]hstruct liveupdate_file_handler}(hjj6hhhNhNubah}(h]h ](jhjic-typeeh"]h$]h&]uh1j\hjf6ubah}(h]h ]h"]h$]h&]refdocju refdomainjireftypetype refexplicitrefwarnjjj{liveupdate_file_handleruh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM%hj^6ubh. The caller must initialize this structure, including a unique ‘compatible’ string and a valid ‘fh’ callbacks. This function adds the handler to the global list of supported file handlers.}(hj^6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj6hM%hj[6ubah}(h]h ]h"]h$]h&]uh1j$hj?6ubeh}(h]h ]h"]h$]h&]uh1j hjZ6hM(hj<6ubah}(h]h ]h"]h$]h&]uh1jhj 6ubh)}(h **Context**h]j5 )}(hj6h]hContext}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj6ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM*hj 6ubh)}(hcTypically called during module initialization for file types that support live update preservation.h]hcTypically called during module initialization for file types that support live update preservation.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM*hj 6ubh)}(h **Return**h]j5 )}(hj6h]hReturn}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj6ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM-hj 6ubh)}(h(0 on success. Negative errno on failure.h]h(0 on success. Negative errno on failure.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chM-hj 6ubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjIhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j/liveupdate_unregister_file_handler (C function)$c.liveupdate_unregister_file_handlerhNtauh1jhjIhhhNhNubj)}(hhh](j)}(hKint liveupdate_unregister_file_handler (struct liveupdate_file_handler *fh)h]j)}(hJint liveupdate_unregister_file_handler(struct liveupdate_file_handler *fh)h](jt)}(hinth]hint}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jshj 7hhh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMaubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 7hhhj7hMaubj)}(h"liveupdate_unregister_file_handlerh]j)}(h"liveupdate_unregister_file_handlerh]h"liveupdate_unregister_file_handler}(hj17hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-7ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj 7hhhj7hMaubj)}(h$(struct liveupdate_file_handler *fh)h]j)}(h"struct liveupdate_file_handler *fhh](j)}(hjh]hstruct}(hjM7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjI7ubj)}(h h]h }(hjZ7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjI7ubh)}(hhh]j)}(hliveupdate_file_handlerh]hliveupdate_file_handler}(hjk7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjh7ubah}(h]h ]h"]h$]h&] refdomainjireftypej! reftargetjm7modnameN classnameNjj)}j ]j")}j!j37sb$c.liveupdate_unregister_file_handlerasbuh1hhjI7ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjI7ubj")}(hj"h]h*}(hj7hhhNhNubah}(h]h ]j%"ah"]h$]h&]uh1j"hjI7ubj)}(hfhh]hfh}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjI7ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjE7ubah}(h]h ]h"]h$]h&]hhuh1jhj 7hhhj7hMaubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj7hhhj7hMaubah}(h]j7ah ](jjeh"]h$]h&]j j )j huh1jhj7hMahj7hhubj )}(hhh]h)}(h$Unregister a liveupdate file handlerh]h$Unregister a liveupdate file handler}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMahj7hhubah}(h]h ]h"]h$]h&]uh1j hj7hhhj7hMaubeh}(h]h ](jifunctioneh"]h$]h&]j$ jij% j7j& j7j' j( j) uh1jhhhjIhNhNubj+ )}(hX**Parameters** ``struct liveupdate_file_handler *fh`` The file handler to unregister **Description** Unregisters the file handler from the liveupdate core. This function reverses the operations of liveupdate_register_file_handler(). It ensures safe removal by checking that: No live update session is currently in progress. If the unregistration fails, the internal test state is reverted. **Return** 0 Success. -EOPNOTSUPP when live update is not enabled. -EBUSY A live update is in progress, can't quiesce live update.h](h)}(h**Parameters**h]j5 )}(hj7h]h Parameters}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj7ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMehj7ubj )}(hhh]j)}(hF``struct liveupdate_file_handler *fh`` The file handler to unregister h](j)}(h&``struct liveupdate_file_handler *fh``h]j])}(hj8h]h"struct liveupdate_file_handler *fh}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hj8ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMbhj 8ubj%)}(hhh]h)}(hThe file handler to unregisterh]hThe file handler to unregister}(hj*8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&8hMbhj'8ubah}(h]h ]h"]h$]h&]uh1j$hj 8ubeh}(h]h ]h"]h$]h&]uh1j hj&8hMbhj8ubah}(h]h ]h"]h$]h&]uh1jhj7ubh)}(h**Description**h]j5 )}(hjL8h]h Description}(hjN8hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hjJ8ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMdhj7ubh)}(hUnregisters the file handler from the liveupdate core. This function reverses the operations of liveupdate_register_file_handler().h]hUnregisters the file handler from the liveupdate core. This function reverses the operations of liveupdate_register_file_handler().}(hjb8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMchj7ubh)}(hZIt ensures safe removal by checking that: No live update session is currently in progress.h]hZIt ensures safe removal by checking that: No live update session is currently in progress.}(hjq8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMfhj7ubh)}(hAIf the unregistration fails, the internal test state is reverted.h]hAIf the unregistration fails, the internal test state is reverted.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMihj7ubh)}(h **Return**h]j5 )}(hj8h]hReturn}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j4 hj8ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMkhj7ubh)}(hw0 Success. -EOPNOTSUPP when live update is not enabled. -EBUSY A live update is in progress, can't quiesce live update.h]hy0 Success. -EOPNOTSUPP when live update is not enabled. -EBUSY A live update is in progress, can’t quiesce live update.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/core-api/liveupdate:54: ./kernel/liveupdate/luo_file.chMlhj7ubeh}(h]h ] kernelindentah"]h$]h&]uh1j* hjIhhhNhNubeh}(h] internal-apiah ]h"] internal apiah$]h&]uh1hhhhhhhhK/ubh)}(hhh](h)}(hSee Alsoh]hSee Also}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hhhhhK:ubj)}(hhh](j)}(h3:doc:`Live Update uAPI `h]h)}(hj8h]h)}(hj8h]hinline)}(hj8h]hLive Update uAPI}(hj8hhhNhNubah}(h]h ](jhstdstd-doceh"]h$]h&]uh1j8hj8ubah}(h]h ]h"]h$]h&]refdocju refdomainj8reftypedoc refexplicitrefwarnj{/userspace-api/liveupdateuh1hhhhK