[CRIU] [PATCH 02/10] unux: postpone dumping sockets

Pavel Emelyanov xemul at parallels.com
Wed Dec 18 09:50:43 PST 2013


> @@ -123,37 +127,26 @@ static int can_dump_unix_sk(const struct unix_sk_desc *sk)
>  	return 1;
>  }
>  
> -static int dump_one_unix_fd(int lfd, u32 id, const struct fd_parms *p)
> +static int write_unix_entry(struct unix_sk_desc *sk,
> +			struct unix_sk_desc *peer, unsigned int uflags)

This split is nasty. Let's do it more logical -- the dump_one_unix_sk does
everything it does, but keeps the UnixSkEntry in memory (attached to the
unix_sk_desc). And the write_unix_entry simply sends it into fd.

Thanks,
Pavel



More information about the CRIU mailing list