mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-08-02 06:43:00 +00:00
page-xfer: Use send_psi everywhere
There are two places left that send ps_iov by hands into socket. Switch it to use common helper. Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
parent
f83ba3fe31
commit
efbf59ddf6
1 changed files with 2 additions and 6 deletions
|
|
@ -538,10 +538,8 @@ static int check_parent_server_xfer(int fd_type, long id)
|
|||
pi.cmd = PS_IOV_PARENT;
|
||||
pi.dst_id = encode_pm(fd_type, id);
|
||||
|
||||
if (write(page_server_sk, &pi, sizeof(pi)) != sizeof(pi)) {
|
||||
pr_perror("Can't write to page server");
|
||||
if (send_psi(page_server_sk, &pi))
|
||||
return -1;
|
||||
}
|
||||
|
||||
tcp_nodelay(page_server_sk, true);
|
||||
|
||||
|
|
@ -1046,10 +1044,8 @@ int disconnect_from_page_server(void)
|
|||
else
|
||||
pi.cmd = PS_IOV_FLUSH;
|
||||
|
||||
if (write(page_server_sk, &pi, sizeof(pi)) != sizeof(pi)) {
|
||||
pr_perror("Can't write the fini command to server");
|
||||
if (send_psi(page_server_sk, &pi))
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (read(page_server_sk, &status, sizeof(status)) != sizeof(status)) {
|
||||
pr_perror("The page server doesn't answer");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue