-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
image-rs: use a sha256 hash to mark different Overlayfs mounts
Before this commit, different Overlayfs mounts of a same ImageClient would mark its mounts as 1, 2, 3... Thus there will be 0,1,2... under $work_dir/overlayfs. If a ImageClient with same work dir launches, new mounts will fail as the original index cannot be correctly read from the meta store json file. To make it easy, we changed the way to distinguish different mounts, by calculating a hash from (overlay layer paths, mount paths, time). As the three variables should not be the same, thus we could avoid collisions of overlayfs working dir. Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
- Loading branch information
Showing
3 changed files
with
32 additions
and
18 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
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
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