• Kirill Tkhai's avatar
    files: Add new_fd parameter to file_desc_ops::open() · 96946ee9
    Kirill Tkhai authored
    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: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    96946ee9
Name
Last commit
Last update
Documentation Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...