- 17 Jan, 2013 2 commits
-
-
Qiang Huang authored
We need a new protobuf description for file-lock. Originally-signed-off-by:
Zheng Gu <cengku.gu@huawei.com> Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Qiang Huang authored
Add --file-locks/-l option to support handling file locks, for safety, only used for container. Originally-signed-off-by:
Zheng Gu <cengku.gu@huawei.com> Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 16 Jan, 2013 12 commits
-
-
Alexander Kartashov authored
This workarounds a compilation warning on ARM: packet-sock.pb-c.c: In function 'packet_sock_entry__init': packet-sock.pb-c.c:98:3: error: this decimal constant is unsigned only in ISO C90 [-Werror] packet-sock.pb-c.c: At top level: packet-sock.pb-c.c:318:1: error: this decimal constant is unsigned only in ISO C90 [-Werror] Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
This patch replaces the format specifier %ld with PRIx64 in the following places: * the format string argument of the functions scanf() and printf(), * in the macros GEN_SYSCTL_*_FUNC. We need explicit specification of the integer size there. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
The layout of the struct rlimit depends on the value of the macro FILE_OFFSET_BITS. If FILE_OFFSET_BITS is 64 the userspace and kernel definitions becomes incoherent on a 32-bit platform. The struct krlimit representing the kernel version of the struct rlimit is introduced to address the issue: the function restore_rlims() is fixed to convert between the userspace and kernel representations of the struct. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
This makes it possible to use TASK_SIZE instead of TASK_SIZE_MAX. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
I occasionally read FanotifyMarkEntry object as InotifyWdEntry in collect_one_fanotify_mark, this didn't trigger a bug in test since the events are still occured (and before protobuf file refine the formats were close to each other), which means the fanotify00 test-case need to be updated (which is addressed in further patch). And don't forget to init fields. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The object is allocated with malloc. The lack of initialization is not problem at moment since we assign members in collect_inotify_mark unconditionally but it might cause problems in future so better to init it as early as possible. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Just reading if event entry exist in buffer is not enough we rathee need to be sure that all flags and bits are recovered well. For this sake we parse fdinfo before and after the c/r sessions and compare results. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Just missed it in first place. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
To be consistent with naming (we have collect_one_fanotify_mark helper already). Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This removes code duplication. There is no strong need for free_fhandle but I decided to add it to be consistent with alloc/free handlers. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 15 Jan, 2013 26 commits
-
-
Pavel Emelyanov authored
These are structs that (now) tie together ns string and the CLONE_ flag. It's nice to have one (some code becomes simpler) and will help us with auto-namespaces detection. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
As Pavel proposed we can refine fanotify image objects squeezing common part in separate entry. Finally the objects are grouped as enum mark_type { INODE = 1; MOUNT = 2; } message fanotify_inode_mark_entry { required uint64 i_ino = 1; required fh_entry f_handle = 2; } message fanotify_mount_mark_entry { required uint32 mnt_id = 1; } message fanotify_mark_entry { required uint32 id = 1; required mark_type type = 2; required uint32 mflags = 3; required uint32 mask = 4; required uint32 ignored_mask = 5; required uint32 s_dev = 6; optional fanotify_inode_mark_entry ie = 7; optional fanotify_mount_mark_entry me = 8; } This required some tuning in fdinfo parsing and fsnotify code itself, but result looks good to me. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
As Andrew pointed the logically it's more correct to use err() instead of fail() if test_daemon() has not been used. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> CC: Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Restore of netns uses the file descriptor on the root netns. This descriptor is opened before forking. We can add one more service fd, but I think this approach is better. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This one is pretty trivial and need to be extented for more masks and flags, but fine for now. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
For fanotify dumping we need to find mount points the path lay on, moreover we save a mount point device number in the image, thus collect mount point information on dump stage. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The same way as done for inotify we walk over all marks hooked on file entry and restore them with sys_fanotify_mark call. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
No real restore yet, but only collecting of file entries and marks for simplicity. Ideally, once everything will be ready and tested we will unitfy generic fsnotify restore engine. But for a while for debug reason inotify and fanotify kept separated. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
fanotify and inotify will be gathered to separate lists. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We will need collect_fanotify_mark helper so unify naming scheme. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
fanotify will have collect_one_fanotify helper, so to unify naming scheme rename this one. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
fanotify will have own descriptor so to avoid confusion rename it. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It will carry fanotify file entries as well. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This structure will carry mark of any type. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This prints out more details on what is going on. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We will use it for fanotify objects restore, so to eliminate code duplication make a separate helper. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Will need it to dump fanotify objects. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-