[CRIU] About file lock
Gu Zheng
cengku.gu at huawei.com
Sat Sep 29 02:06:08 EDT 2012
Hi:
I use a simple code to test CRIU,when it runs,it's pid is 12884,the /proc/locks info is like this:
1: FLOCK ADVISORY WRITE 12884 fd:02:87556805 0 EOF
2: POSIX ADVISORY WRITE 10092 fd:00:1048737 0 EOF
3: POSIX ADVISORY WRITE 10063 fd:00:1048734 0 0
4: POSIX ADVISORY WRITE 10049 fd:00:1048732 0 EOF
5: POSIX ADVISORY WRITE 10007 fd:00:1048723 0 EOF
6: FLOCK ADVISORY WRITE 9983 fd:00:1048720 0 EOF
7: FLOCK ADVISORY WRITE 9983 fd:00:1326216 0 EOF
8: FLOCK ADVISORY WRITE 9551 fd:00:1048681 0 EOF
You can see the No.1 flock is set by this task.
Then I run the './crtools dump -t 12884' and './crtools restore -t 12884' scripts to dump and restore this task,it is successful,
but the /proc/locks info is like this:
1: POSIX ADVISORY WRITE 10092 fd:00:1048737 0 EOF
2: POSIX ADVISORY WRITE 10063 fd:00:1048734 0 0
3: POSIX ADVISORY WRITE 10049 fd:00:1048732 0 EOF
4: POSIX ADVISORY WRITE 10007 fd:00:1048723 0 EOF
5: FLOCK ADVISORY WRITE 9983 fd:00:1048720 0 EOF
6: FLOCK ADVISORY WRITE 9983 fd:00:1326216 0 EOF
7: FLOCK ADVISORY WRITE 9551 fd:00:1048681 0 EOF
Yeah,the flock set by this task disappeared, it's not expected.
So I read the CRIU codes,and find that CRIU does not handle file locks.And I look up the TODO list on CRIU main page,do not find
any solution or plan about file locks.
Is it unnecessary to handle the file locks? or an oversight? Thanks!
More information about the CRIU
mailing list