nspawn: support ephemeral boots from images

Previously --ephemeral was only supported with container trees in btrfs
subvolumes (i.e. in combination with --directory=). This adds support for
--ephemeral in conjunction with disk images (i.e. --image=) too.

As side effect this fixes that --ephemeral was accepted but ignored when using
-M on a container that turned out to be an image.

Fixes: #4664
This commit is contained in:
Lennart Poettering
2016-11-22 13:35:09 +01:00
parent 1a1b13c957
commit 0f3be6ca4d
3 changed files with 63 additions and 33 deletions
+4
View File
@@ -143,6 +143,10 @@
#define GRND_RANDOM 0x0002
#endif
#ifndef FS_NOCOW_FL
#define FS_NOCOW_FL 0x00800000
#endif
#ifndef BTRFS_IOCTL_MAGIC
#define BTRFS_IOCTL_MAGIC 0x94
#endif