-
Cyrill Gorcunov authored
Updated version attached. >From 6c0e1522e01e01aa89861862fbdf039a0892b89b Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov <gorcunov@openvz.org> Date: Tue, 12 Apr 2016 20:00:24 +0300 Subject: [PATCH 1/2] tty: Write unread pty buffers on post dump stage When unread data present on peers we currently simply ignore it but actually we can try to fetch it in non(that)destructive way. For this sake at the end of dump procedure (because fetching queued data may go wrong and we will have to write it back, which is heavy, and we need all ttys under our hands) we walk over all collected TTYs and link PTYs peers which indices are matching. Note to not overload tty_dump_info we reuse @list member for new @all_ptys list. Once link established we literally read queued data and flush it into new tty-data.img. If something go wrong at this moment, we stop reading queued data but walk back over already queued ones and write them back to restore former state. Same applies if the dump has been requested to leave task alive. On restore we link peers back and write queued data once peer back to live. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
ebc3421d