- 16 Jan, 2013 7 commits
-
-
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 30 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>
-
Cyrill Gorcunov authored
We will need to lookup mount points by mount id and device for fanotify restore. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Will need them to restore fanotify objects. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We will be handling both inotify and fanotify objects here thus to make less confusion rename the files to fsnotify. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
A bash script exits with code of a last command, so zdtm.sh return 1 if TMP_TREE is not initialized. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 14 Jan, 2013 3 commits
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
TCP repair mode should be disabled after unlocking connections. Disabling of repair mode drops SO_REUSEADDR, so it should be restored. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Acked-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-