• Kirill Tkhai's avatar
    files: Kill struct file_desc_ops::post_open · a14eedc2
    Kirill Tkhai authored
    This make open fds asynchronous. Now we restore them in a poll-style.
    Every ->open callback operates like a poll. It returns 1, i.e. "call me again",
    if some events have not received yet, or 0, if restoring of a fle
    has finished.
    
    We iterate over list of file descriptors and look at its return value.
    If there were not progress in restoring of a fle, we sleep on task_st
    futex. As all events are sent together with changing task_st, we will
    be woken up, when there is a some new work for us.
    
    v6: Add a comment about open method return values
    
    v5: Clear FDS_EVENT every beginning of cycle.
        Use 0, -1 and 1 for successful return error and "again" request.
    
    v4: unix: 1)standalone sockets return ORV_AGAIN after first open
                to reopen fd by generic code
              2)do not call post_open_unix_sk() for !standalone sockets
        inet, epoll: return ORV_AGAIN after first open to reopen fd by generic code
        autofs: iterate used list instead of fds list
    Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    a14eedc2
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...