[CRIU] [PATCH v4 00/33] Rework file opening scheme to make it asynchronous

Kirill Tkhai ktkhai at virtuozzo.com
Wed Dec 14 00:37:03 PST 2016


On 14.12.2016 11:04, Pavel Emelyanov wrote:
> On 12/13/2016 06:04 PM, Kirill Tkhai wrote:
>> Hi,
>>
>> this is v4 iteration of the patchset. There are changes in:
>>
>> 1)"[25/33]files: Make recv_fd_from_peer() non-block"
>>
>>   Fixed new_fd assignment error. Found by wathing.
>>
>> 2)"[26/33]files: Kill struct file_desc_ops::post_open"
>>
>>   Fixed a couple of errors found by unix exhaustive test and watching.
> 
> What the error was?

There were directly called ex-post_open callbacks, while a fd should firstly be reopened.
So, now I return ORV_AGAIN after first open to force generic code reopen it.

>> 3)[27-33,33] are new patches, which implement merging fds,
>>   tty and eventpoll lists together. Mostly they are refactorings.
>>
>> ---
>>
>> Kirill Tkhai (33):
>>       pstree: Add task_st futex
>>       files: Send/receive fds with pointers on their struct fdinfo_list_entry in receiver
>>       files: Move closing fle's transport_fd to recv_fd_from_peer()
>>       files: Move derefferencing of TRANSPORT_FD_OFF to send_fd_to_peer()
>>       files: Add fle_init() for initialization new fdinfo_list_entry
>>       files: Allow to receive further fds
>>       files: Make sending fds to peers async
>>       files: Receive real fd numbers using recv_fd_from_peer()
>>       files: Kill file_desc_ops::want_transport()
>>       files: Kill fd parameter of transport_name_gen()
>>       files: Kill want_post_open_stage()
>>       files: Kill fd_open_state::receive_fd stage
>>       files: Merge states iteration into open_fdinfos()
>>       files: Implement {set,wait}_fds_event()
>>       files: Add fdinfo_list_entry::stage
>>       unix: Link connected to peer sockets to its list
>>       unix: Wait a peer using task_st futex
>>       inet: Link sockets in port_type list
>>       inet: Use task_st futex for notification instead of per-port
>>       timerfd: Kill post_open stage
>>       files: Add open stages enum
>>       eventpoll: Make post_open stage may fail
>>       files: Set fds event after sending fd to peer
>>       files: Add new_fd parameter to file_desc_ops::open()
>>       files: Make recv_fd_from_peer() non-block
>>       files: Kill struct file_desc_ops::post_open
>>       tty: Set dependencies between masters, slaves and ctty
>>       files: Move ctty fixup to open_fd()
>>       tty: Use generic list for tty files
>>       eventpoll: Use generic list for eventpoll files
>>       files: Kill pid parameter of open_fdinfos()
>>       files: Merge collect_gen_fd() and collect_used_fd(), and call it unconditionally
>>       tty: Optimize dependencies check
>>
>>
>>  criu/autofs.c           |   30 ++-
>>  criu/eventfd.c          |    5 -
>>  criu/eventpoll.c        |   48 ++++-
>>  criu/fifo.c             |   10 +
>>  criu/files-ext.c        |    5 -
>>  criu/files-reg.c        |   12 +
>>  criu/files.c            |  423 +++++++++++++++++++++--------------------------
>>  criu/fsnotify.c         |   10 +
>>  criu/include/files.h    |   48 +++--
>>  criu/include/pipes.h    |    1 
>>  criu/include/pstree.h   |    7 +
>>  criu/include/rst_info.h |    3 
>>  criu/include/sk-inet.h  |    1 
>>  criu/include/tty.h      |    2 
>>  criu/namespaces.c       |    5 -
>>  criu/pipes.c            |   46 ++---
>>  criu/pstree.c           |    1 
>>  criu/signalfd.c         |    5 -
>>  criu/sk-inet.c          |   53 ++++--
>>  criu/sk-netlink.c       |    5 -
>>  criu/sk-packet.c        |    5 -
>>  criu/sk-unix.c          |  125 ++++++++------
>>  criu/timerfd.c          |   25 +--
>>  criu/tty.c              |  111 +++++++-----
>>  criu/tun.c              |    9 +
>>  include/common/lock.h   |    5 +
>>  26 files changed, 532 insertions(+), 468 deletions(-)
>>
>> --
>> Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
>> .
>>
> 


More information about the CRIU mailing list