-
Cyrill Gorcunov authored
In debian-8 container we faced the problem -- systemd creates nested mount namespaces and inotify watchee are resolved into a path which is inaccessbile on restore, the same happens when pathes where watchees are living are bind-overmounted. Thus when we try to restore such watchees we can't open the paths. Lets do a trick here (thanks a huge to Andrew Vagin for idea and overall help) -- walk over all mount points which device match the handle's device and open handle first and test if the path provided is openable as well for tmpfs and devtmps which do not save inodes between remounts. After all the inotify objects are bound to inode so it's irrelevean via which path it's assigned. https://jira.sw.ru/browse/PSBM-39957Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
52ab139c