-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add mount related helper funcs, refine slot_mount_helper with t…
…hese new helper funcs and add atexit hooks for umount (#429) This PR introduces several high-level mount related helper funcs for robust mount/umount, and refines the slot_mount_helper module with the above new high-level mount helper funcs. These high-level mount helpers are originally implement in the slot_mount_helper module. Also, now slot_mount_helper will register atexit hook for mount points used by otaclient during OTA to ensure mount points umount at otaclient exits(terminated). The following funcs are added: 1. `ensure_mount`: adopt the similar mechanism of initrd, mount and ensure the mount point is mounted with at most MAX_RETRY(6 by default) times. 2. `ensure_umount`: umount and ensure the mount point doesn't have any mounts with at most MAX_RETRY(6 by default) times. With this change, we can also handle mount point with multiple layers of mounts. 3. `ensure_mountpoint`: ensure the the target mount point exists, no mounts on it(using `ensure_umount`) and ready for mount.
- Loading branch information
1 parent
638db15
commit a670e6d
Showing
2 changed files
with
261 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
a670e6d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report