[Devel] [Q] migrating inotify assigned on ploop device

Cyrill Gorcunov gorcunov at virtuozzo.com
Wed Jan 13 08:43:49 PST 2016


On Wed, Jan 13, 2016 at 07:24:08PM +0400, Nikita Spiridonov wrote:
> On Wed, 2016-01-13 at 19:25 +0300, Cyrill Gorcunov wrote:
> > On Wed, Jan 13, 2016 at 07:14:18PM +0400, Nikita Spiridonov wrote:
> > > 
> > > Lets try to fix bug using workaround in libvzctl and criu hooks. Images
> > > recoding/patching too hard to implement for now; we can return to it
> > > later. 
> > 
> > Which exactly workaround you mean, could you please share details?
> 
> Not sure I am completely understand this workaround, Igor, can you
> explain?

Actually encode and decode can be use to update images just via bash scritps

cyrill at uranus old] ./crit decode < test/dump/static/inotify00/3794/1/inotify.img 
{"magic": "INOTIFY_FILE", "entries": [{"fown": {"pid_type": 0, "signum": 0, "pid": 0, "uid": 0, "euid": 0}, "wd": [{"wd": 2, "s_dev": 8388609, "i_ino": 9701834, "f_handle": {"handle":
[13688068559137409482, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "type": 1, "bytes": 8}, "mask": 134260488, "ignored_mask": 0, "id": 0}, {"wd": 1, "s_dev": 8388609, "i_ino": 9701833, "f_handle":
{"handle": [13688068554842442185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "type": 1, "mnt_id": 77, "bytes": 8, "path":
"/home/cyrill/projects/criu/.git-ignore/old/test/zdtm/live/static/inotify00.test"}, "mask": 134260488, "ignored_mask": 0, "id": 0}], "flags": 2048, "id": 3}]}

Change inotify00.test to inotify01.test and encode it into some new image

[cyrill at uranus old] ./crit decode < test/dump/static/inotify00/3794/1/inotify.img | sed -e 's/inotify00.test/inotify01.test/g' | ./crit encode > test/dump/static/inotify00/3794/1/inotify1.img

Here it's are:

[cyrill at uranus old] ./crit decode < test/dump/static/inotify00/3794/1/inotify1.img{"magic": "INOTIFY_FILE", "entries": [{"fown": {"pid_type": 0, "signum": 0, "pid": 0, "uid": 0, "euid": 0}, "wd":
[{"wd": 2, "s_dev": 8388609, "i_ino": 9701834, "f_handle": {"handle": [13688068559137409482, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "type": 1, "bytes": 8}, "mask": 134260488, "ignored_mask": 0,
"id": 0}, {"wd": 1, "s_dev": 8388609, "i_ino": 9701833, "f_handle": {"handle": [13688068554842442185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "type": 1, "mnt_id": 77, "bytes": 8, "path":
"/home/cyrill/projects/criu/.git-ignore/old/test/zdtm/live/static/inotify01.test"}, "mask": 134260488, "ignored_mask": 0, "id": 0}], "flags": 2048, "id": 3}]}

	Cyrill


More information about the Devel mailing list