[CRIU] [PATCH 2/2] vma: Add comments about some dump fields of vma_area
Pavel Emelyanov
xemul at parallels.com
Tue Sep 23 09:31:46 PDT 2014
We have non-obvious handling of vm_file_fd/vm_socket_id
pair and the vma->file_borrowed.
Comment these to in the structure.
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
include/vma.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/vma.h b/include/vma.h
index 37e77f9..0d7dcaf 100644
--- a/include/vma.h
+++ b/include/vma.h
@@ -30,6 +30,12 @@ struct vma_area {
union {
struct /* for dump */ {
union {
+ /*
+ * These two cannot be assigned at once.
+ * The file_fd is an fd for a regular file and
+ * the socket_id is the inode number of the
+ * mapped (PF_PACKET) socket.
+ */
int vm_file_fd;
int vm_socket_id;
};
@@ -37,6 +43,11 @@ struct vma_area {
char *aufs_rpath; /* path from aufs root */
char *aufs_fpath; /* full path from global root */
+ /*
+ * When several subsequent vmas have the same
+ * dev:ino pair all 'tail' ones set this to true
+ * and the vmst points to the head's stat buf.
+ */
bool file_borrowed;
struct stat *vmst;
};
--
1.8.4.2
More information about the CRIU
mailing list