[sheepdog] [PATCH v7 2/3] collie: let collie use sockfd cache

Liu Yuan namei.unix at gmail.com
Wed Jul 31 09:00:19 CEST 2013


On Wed, Jul 31, 2013 at 03:11:34PM +0900, Hitoshi Mitake wrote:
> From: Hitoshi Mitake <mitake.hitoshi at gmail.com>
> 
> This patch lets collie use sockfd cache. Because the sockfd caching
> mechanism is now in libsheepdog, collie can enjoy it on some
> subcommands which issue many requests to sheep.
> 
> Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
> ---
> v5:
>  - trivial cleaning. remove an old prototype of function
> 
> v4:
>  - remove the redundant function, collie_exec_req_nid()
> 
>  collie/collie.c |    6 ++++++
>  collie/common.c |   24 ++++++++++++++----------
>  2 files changed, 20 insertions(+), 10 deletions(-)
> 
> diff --git a/collie/collie.c b/collie/collie.c
> index 2f8e9d0..779e504 100644
> --- a/collie/collie.c
> +++ b/collie/collie.c
> @@ -17,6 +17,7 @@
>  #include "sheep.h"
>  #include "collie.h"
>  #include "util.h"
> +#include "sockfd_cache.h"
>  
>  #define EPOLL_SIZE 4096
>  
> @@ -418,6 +419,11 @@ int main(int argc, char **argv)
>  		exit(EXIT_SYSFAIL);
>  	}
>  
> +	if (sockfd_init()) {
> +		fprintf(stderr, "Failed to create workqueue for sockfd\n");

Should be "sockfd_init failed\n".

Thanks
Yuan



More information about the sheepdog mailing list