Changes

1,158 bytes added ,  15:41, 21 August 2014
Added AUFS problem
Line 22: Line 22:     
== AUFS ==
 
== AUFS ==
 +
 +
AUFS is not (yet) upstream, but Docker guys use one, so does CRIU.
 +
 +
AUFS has a strange BUG -- when we <code>execv</code> some file on it, and then check for <code>/proc/$pid/maps</code> or <code>.../smaps</code> files or links in <code>.../map_files/</code> directory, we would note, that those mappings, that correspond to the executed file are seen under "wrong" paths.
 +
 +
How wrong are these paths? AUFS joins several subdirectories into one, all these subdirs are called ''branches''. And the file seen inside AUFS by one path "really" has some other one -- the path by the file is seen in the respective branch. So in proc in these strange cases we would see the path from branch, instead of the path, by which the file is seen in AUFS.
 +
 +
This is problematic, since CRIU needs to know the path by which the file was accessed inside AUFS in order to properly restore one. To fix this, CRIU checks that there's an AUFS mount in the game, reads the branches info from sysfs, and then, when meets an AUFS file in mappings, check for the path to belong to one of the branches and "fixes" one. This has sits in the <code>sysfs_parse.c:fixup_aufs_vma_fd</code>.
    
[[Category:Under the hood]]
 
[[Category:Under the hood]]