[CRIU] [PATCH 2/2 v4] fsnotify: Always provide the path for inotify watchees
Cyrill Gorcunov
gorcunov at gmail.com
Mon Oct 19 03:54:27 PDT 2015
On Mon, Oct 19, 2015 at 01:37:15PM +0300, Pavel Emelyanov wrote:
> >
> > As to path check -- we don't care which path we obtain,
> > the inode referenced by the path is the same.
>
> Where does the guarantee for that come from? I can agree with devices
> being the same, OK (since you look up the mountpoint by device), but
> the inodes match MUST be there, as you open some derived path at
> different location.
This comes from the handle itself, that's how they work. They're
keeping inode inside their binary form, once opened you've got
a path to the node. Maybe I'm missing something. Mind to type
some pseudocode what you're meaning?
Basically all the above is
for-each-device-matched
fd = open-by-handle
if (fd >= 0)
path = read-link(/proce/self/$fd)
if (open(path) >= 0)
save-path into an image
Cyrill
More information about the CRIU
mailing list