files: Add new_fd parameter to file_desc_ops::open()
Return results of work separate: a new fd is in a parameter, a status is in return value. In next patches we will use return value "1" to indicate, that open callback should be called once again, and restore for this fle has not finished yet. So, we need to be able to differ file descriptor with number 1 and "again" request. We do not use negative value like -2 for this purpose, because we want to allow fles to be served out before they are completelly restored. So, if a fle is successefuly open, but it's need one more call of open to complete its restore, then we return 1 and populate new_fd in not negative value. See "files: Kill struct file_desc_ops::post_open" for the details. Also, export open_pipe() v5: Use 0 and -1 for successful return and error. v6: Rebase on new criu Signed-off-by:Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
Showing
Please
register
or
sign in
to comment