From f84d19e09a2b1626fb2f2dee34ad9719d78017d8 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 23 Sep 2014 20:31:46 +0400 Subject: [PATCH] vma: Add comments about some dump fields of vma_area 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 --- include/vma.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/vma.h b/include/vma.h index 37e77f9c7..0d7dcaf0b 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; };