Irmap is CRIU’s engine for resolving an (inode, device) pair back into a filesystem path. This is primarily required for restoring fsnotify (inotify and fanotify) instances, which internally reference inodes but do not preserve the paths used to create them.
When an application creates an inotify watch, the kernel resolves the path to an inode and attaches the watch to it. The original path string is then discarded by the kernel. During a checkpoint, CRIU can see which inode is being watched but needs a valid path to recreate that watch during restoration.
Irmap uses a combination of predefined hints and brute-force scanning to build a reverse mapping cache.
CRIU starts by scanning “known” locations where applications typically place watches, such as:
/etc (configuration files)/var/log (log monitoring)/var/spool/usr/share/dbus-1/services, etc.)/lib/udev/)Users can provide additional directories to scan via the command line to help CRIU find application-specific files more quickly:
criu dump --irmap-scan-path /path/to/my/app ...
These paths are prioritized and scanned before the default hints.
Scanning large filesystems can be slow and resource-intensive. To mitigate this:
pre-dump while the application is still running. This populates the cache early, significantly reducing the time the application must remain frozen during the final dump./proc and don’t strictly require Irmap, though it can still be used./proc/$pid/fdinfo) is the preferred and more reliable alternative to Irmap.