mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 01:37:52 +00:00
overlayfs_mount: create delta dir if it doesn't exist
(This *should* fix the lxc-test-snapshot testcase, but doesn't seem to by itself.) If it doesn't exist, we may as well start with an empty one. This is needed when creating an overlayfs snapshot. Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
067650d0b6
commit
a93488dfcb
@ -2224,6 +2224,10 @@ static int overlayfs_mount(struct bdev *bdev)
|
||||
*upper = '\0';
|
||||
upper++;
|
||||
|
||||
// if delta doesn't yet exist, create it
|
||||
if (mkdir_p(upper, 0755) < 0 && errno != EEXIST)
|
||||
return -22;
|
||||
|
||||
// overlayfs.v22 or higher needs workdir option
|
||||
// if upper is /var/lib/lxc/c2/delta0,
|
||||
// then workdir is /var/lib/lxc/c2/olwork
|
||||
|
Loading…
Reference in New Issue
Block a user