Changes

921 bytes added ,  14:57, 21 August 2014
Added btrfs problem
Line 4: Line 4:     
== BTRFS ==
 
== BTRFS ==
 +
 +
When we <code>stat()</code> a file we can get on which device it resides by checking the <code>st_dev</code> value. However, kernel exposes the device value in some more places. In particular, the device is shown in the <code>/proc/$pid/[mounts|mountinfo]</code> files and in the <code>/proc/$pid/s?maps</code> ones. Moreover, the sock-diag subsystem recently added into the kernel, reveals the device (and inode) on which a unix socket is bound.
 +
 +
The problem with btrfs is that it substitutes the real device number with a virtual one in the <code>stat()</code> system call. And once we get this value we cannot compare it to any other device number obtained from other sources, they will also differ (these virtual device numbers are unique).
 +
 +
In order to address this issue, CRIU performs path-to-device resolution in user-space by analysing the information obtained from the <code>/proc/$pid/mountinfo</code> files.
    
== NFS ==
 
== NFS ==