[CRIU] [PATCH] Allow dumping of pstore, securityfs, fusectl, debugfs
Pavel Emelyanov
xemul at parallels.com
Tue Jun 10 05:25:13 PDT 2014
On 06/09/2014 09:32 PM, Tycho Andersen wrote:
> Hi Pavel,
>
> On Mon, Jun 09, 2014 at 08:25:39PM +0400, Pavel Emelyanov wrote:
>> On 06/09/2014 08:04 PM, Tycho Andersen wrote:
>>>
>>> +
>>> static struct fstype fstypes[] = {
>>> {
>>> .name = "unsupported",
>>> @@ -738,6 +750,22 @@ static struct fstype fstypes[] = {
>>> }, {
>>> .name = "btrfs",
>>> .code = FSTYPE__UNSUPPORTED,
>>> + }, {
>>> + .name = "pstore",
>>> + .dump = pstore_dump,
>>> + .code = FSTYPE__PSTORE,
>>
>> I haven't worked with pstore, thus the question -- what if we
>> just umount it on one box and mount on another without doing
>> anything about preserving its contents. Will it affect the container?
>
> pstore is "platform persistent storage", so it should not be migrated
> with the container. The only real reason it is here is because
> ubuntu's mountall wants to mount it. The default apparmor rules
> disallow changes by containers to all of these filesystems.
>
> After some discussion with Serge Hallyn, it sounds like at some point
> in the future we might allow writes to /sys/fs/fuse, but for now we
> don't. All this patch really does for us is allow dump to complete
> successfully so we can start working on restore.
OK, this is reasonable. I will apply the patch once one more comment
(below) is resolved. And I'd also appreciate one more patch on top of
it that actually checks that the FS we dump is really empty (like it's
done for binfmt_misc in criu code).
> The other changes you suggested are below.
>
>
>
> These are mounted by default in ubuntu containers, so criu should know about
> them and remount them on restore.
>
> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
> ---
> mount.c | 12 ++++++++++++
> protobuf/mnt.proto | 4 ++++
> 2 files changed, 16 insertions(+)
>
> diff --git a/mount.c b/mount.c
> index d770e14..e7a4fd2 100644
> --- a/mount.c
> +++ b/mount.c
> @@ -738,6 +738,18 @@ static struct fstype fstypes[] = {
> }, {
> .name = "btrfs",
> .code = FSTYPE__UNSUPPORTED,
> + }, {
> + .name = "pstore",
> + .dump = pstore_dump,
This should be not .dump = pstore_dump, but .code = FSTYPE__PSTORE, shouldn't it?
> + }, {
> + .name = "securityfs",
> + .dump = securityfs_dump,
> + }, {
> + .name = "fusectl",
> + .dump = fusectl_dump,
> + }, {
> + .name = "debugfs",
> + .dump = debugfs_dump,
> }
> };
>
> diff --git a/protobuf/mnt.proto b/protobuf/mnt.proto
> index ab85de7..297bcbd 100644
> --- a/protobuf/mnt.proto
> +++ b/protobuf/mnt.proto
> @@ -7,6 +7,10 @@ enum fstype {
> TMPFS = 5;
> DEVPTS = 6;
> SIMFS = 7;
> + PSTORE = 8;
> + SECURITYFS = 9;
> + FUSECTL = 10;
> + DEBUGFS = 11;
> };
>
> message mnt_entry {
>
More information about the CRIU
mailing list