[CRIU] [PATCH 5/6] Hack to handle vmsplice fail: resolve later
Pavel Emelianov
xemul at virtuozzo.com
Tue Jul 30 15:41:58 MSK 2019
On 7/25/19 4:14 AM, Abhishek Dubey wrote:
> hack to handle failing vmsplice from user-buffer to
> pipe: need to resolve
Please, write more descriptive comment to this patch, these off-by-one-s
are not clear.
> Signed-off-by: Abhishek Dubey <dubeyabhishek777 at gmail.com>
> ---
> criu/page-pipe.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/criu/page-pipe.c b/criu/page-pipe.c
> index a821696..d73f223 100644
> --- a/criu/page-pipe.c
> +++ b/criu/page-pipe.c
> @@ -33,7 +33,7 @@ static int __ppb_resize_pipe(struct page_pipe_buf *ppb, unsigned long new_size)
> {
> int ret;
>
> - ret = fcntl(ppb->p[0], F_SETPIPE_SZ, new_size * PAGE_SIZE);
> + ret = fcntl(ppb->p[0], F_SETPIPE_SZ, new_size * PAGE_SIZE + 1);
> if (ret < 0)
> return -1;
>
> @@ -41,7 +41,7 @@ static int __ppb_resize_pipe(struct page_pipe_buf *ppb, unsigned long new_size)
> BUG_ON(ret < ppb->pipe_size);
>
> pr_debug("Grow pipe %x -> %x\n", ppb->pipe_size, ret);
> - ppb->pipe_size = ret;
> + ppb->pipe_size = ret -1;
>
> return 0;
> }
>
More information about the CRIU
mailing list