[sheepdog] [PATCH 1/2] sheep: remove fd leak in vdi deletion process

Liu Yuan namei.unix at gmail.com
Tue Jan 28 04:17:36 CET 2014


On Tue, Jan 28, 2014 at 11:38:21AM +0900, Hitoshi Mitake wrote:
> The commit 5e460b4d6444 introduced fd leak in the vdi deletion
> process. This patch removes it.
> 

You should release di and dw too, I guess this is why I found severe memory
leak in our test cluster.

Thanks
Yuan

> Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
> ---
>  sheep/vdi.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sheep/vdi.c b/sheep/vdi.c
> index 6239277..7559421 100644
> --- a/sheep/vdi.c
> +++ b/sheep/vdi.c
> @@ -1147,6 +1147,7 @@ static int start_deletion(struct request *req, uint32_t vid)
>  	 * deletion_info are deleted
>  	 */
>  	eventfd_xread(di->finish_fd);
> +	close(di->finish_fd);
>  
>  	return ret;
>  out:
> -- 
> 1.7.10.4
> 
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog



More information about the sheepdog mailing list