[CRIU] [PATCH v4 05/17] spfs: delayed mounts facility introduced
Stanislav Kinsburskiy
skinsbursky at virtuozzo.com
Thu Jun 2 05:05:09 PDT 2016
02.06.2016 13:13, Pavel Emelyanov пишет:
> On 05/20/2016 02:37 PM, Stanislav Kinsburskiy wrote:
>> This facility allows to migated such mounts, like NFS, by replacing the actual
>> mount by FUSE (spfs) mount.
>> Spfs allows to create and open files, required for restore, and then (by
>> switching spfs to "Stub" mode) to block any incomming file system requests.
>> This facility does spfs mount via spfs manager, which is then instructed, how
>> to mount the actual file system.
>> Spfs manager is also responsible for replacing of spfs mount and opened files
>> by the actual one (and actual files) once actual mount point is remounted.
> This patch launches some other binary. Have you sent the spfs implementation
> itself earlier?
This binary is a part of SPFS project (as mentioned in the cover letter).
Sources can be found here:
https://github.com/skinsbursky/spfs.git
> one more comment inline.
>
>> Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
>> ---
>> criu/Makefile.crtools | 1
>> criu/include/spfs.h | 13 +
>> criu/spfs.c | 451 +++++++++++++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 465 insertions(+)
>> create mode 100644 criu/include/spfs.h
>> create mode 100644 criu/spfs.c
>>
>> diff --git a/criu/Makefile.crtools b/criu/Makefile.crtools
>> index 657b08e..3d246f1 100644
>> --- a/criu/Makefile.crtools
>> +++ b/criu/Makefile.crtools
>> @@ -78,6 +78,7 @@ obj-y += util.o
>> obj-y += uts_ns.o
>> obj-y += autofs.o
>> obj-y += uffd.o
>> +obj-y += spfs.o
>>
>> ifeq ($(VDSO),y)
>> obj-y += pie-util-vdso.o
>> diff --git a/criu/include/spfs.h b/criu/include/spfs.h
>> new file mode 100644
>> index 0000000..395572c
>> --- /dev/null
>> +++ b/criu/include/spfs.h
>> @@ -0,0 +1,13 @@
>> +#ifndef __CR_SPFS_H__
>> +#define __CR_SPFS_H__
>> +
>> +int spfs_set_env(void);
>> +
>> +struct mount_info;
>> +int spfs_mount(struct mount_info *mi, const char *source,
>> + const char *filesystemtype, unsigned long mountflags);
>> +
>> +struct reg_file_info;
>> +int spfs_create_file(int ns_root_id, const struct reg_file_info *rfi);
> Write code comments before each declaration explaining what each function does
> and what for.
Ok.
>> +#endif
More information about the CRIU
mailing list