Skip to content
Commit a14eedc2 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Pavel Emelyanov
Browse files

files: Kill struct file_desc_ops::post_open



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: default avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: default avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 839078f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment