pb: Number PB_ constants

For easier logs-to-constant eyes mapping.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
anon-inode: Don't readlink fd/fd multiple times

The is_foo_link readlinks the lfd to check. This makes
anon-inodes dumping readlink several times to find proper
dump ops. Optimize this thing.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
vmas: Don't call stat on vm file twice

When parsing mappings in proc, we fstat vm file, later,
when dumping it, we stat it again to fill fd_parms.
The 2nd stat is not required, we can keep the stat in
vma_area.

This removed 35% of all stat calls on dump of basic container.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
pagemap: Use pread to read pagemap entries

When reading pagemaps, we read it from specific position. To
do it, we called lseek, then read. Fortunetely, there's a
syscall that does both things in one call -- pread. Since
we don't need to keep pagemap's position for further reads,
it perfectly suits our needs.

This removes 75% of lseek calls when dumping basic container.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>