[sheepdog] [sheepdog/sheepdog] c4e320: shared lib: drop unnecessary return value check

Yu Yang yuyanggg at gmail.com
Tue Aug 11 08:19:32 CEST 2015


Hi, Hitoshi, 
I am sorry to say that those patches may not be merged directly.  It may not work correctly. 

I check the patch here(c4e320b965fa47f74bbf0461e8c0043afef3d807) which is different from the original patch I submit in sheepdog-ng, 
I don't know why but I'm sure it cannot work as expect and import bugs. However , this is just one example and I didn't check others.

And also as there is a bit different between sheepdog and sheepdog-ng, if those patches token from sheepdog-ng would be merged into sheepdog,  some work need to be done and the code need be reviewed.



Regards,
Yang

> -----Original Message-----
> From: sheepdog [mailto:sheepdog-bounces at lists.wpkg.org] On Behalf Of Hitoshi
> Mitake
> Sent: Monday, August 10, 2015 8:06 PM
> To: sheepdog at lists.wpkg.org
> Subject: [sheepdog] [sheepdog/sheepdog] c4e320: shared lib: drop unnecessary
> return value check
> 
>   Branch: refs/heads/master
>   Home:   https://github.com/sheepdog/sheepdog
>   Commit: c4e320b965fa47f74bbf0461e8c0043afef3d807
> 
> https://github.com/sheepdog/sheepdog/commit/c4e320b965fa47f74bbf0461e8c
> 0043afef3d807
>   Author: Yu Yang <yuyang at cmss.chinamobile.com>
>   Date:   2015-08-09 (Sun, 09 Aug 2015)
> 
>   Changed paths:
>     M lib/shared/vdi.c
> 
>   Log Message:
>   -----------
>   shared lib: drop unnecessary return value check
> 
> There is no need to check rsp->result when calling sd_run_sdreq()
> for sd_run_sdreq() returns this value as the function return value.
> 
> Signed-off-by: Yu Yang <yuyang at cmss.chinamobile.com>
> Signed-off-by: Liu Yuan <liuyuan at cmss.chinamobile.com>
> 
> 
>   Commit: 4e6848725bd570607ea5b69f0fb47f69772d0a2d
> 
> https://github.com/sheepdog/sheepdog/commit/4e6848725bd570607ea5b69f0f
> b47f69772d0a2d
>   Author: Wang Zhengyong <wangzhengyong at cmss.chinamobile.com>
>   Date:   2015-08-09 (Sun, 09 Aug 2015)
> 
>   Changed paths:
>     M lib/Makefile.am
>     M lib/shared/internal.h
>     A lib/shared/ops.c
>     M lib/shared/sheep.c
>     M lib/shared/sheepdog.h
>     M lib/shared/vdi.c
> 
>   Log Message:
>   -----------
>   shared lib: add a template to manage opention
> 
> The definition of sd_op_template is as follows:
> 
> struct sd_op_template {
> 	const char *name;
> 	int (*request_process)(struct sheep_aiocb *aiocb);
> 	int (*respond_process)(struct sheep_request *req);
> };
> 
> "name"
> Printing the commands as plain text instead of an opcode makes debugging
> a lot easier
> 
> "request_process"
> called in the request handler thread
> 
> "respond_process"
> called in the reply handler thread
> 
> Cc: Liu Yuan <liuyuan at cmss.chinamobile.com>
> Signed-off-by: Wang Zhengyong <wangzhengyong at cmss.chinamobile.com>
> Signed-off-by: Liu Yuan <liuyuan at cmss.chinamobile.com>
> 
> 
>   Commit: 0c07c6d0ab93c2c7f37d1de31a9a57412fa35797
> 
> https://github.com/sheepdog/sheepdog/commit/0c07c6d0ab93c2c7f37d1de31a
> 9a57412fa35797
>   Author: Liu Yuan <liuyuan at cmss.chinamobile.com>
>   Date:   2015-08-09 (Sun, 09 Aug 2015)
> 
>   Changed paths:
>     M lib/shared/ops.c
>     M lib/shared/sheep.c
> 
>   Log Message:
>   -----------
>   shared lib: don't call end_sheep_request() in .respond_process
> 
> Both .request_process and .respond_process is the modular function provided
> by ops.c. Putting an end to the request is out of its responsibility.
> 
> Signed-off-by: Liu Yuan <liuyuan at cmss.chinamobile.com>
> 
> 
>   Commit: a8d241a1a1b452a090a14aaf0b52005d186a4a93
> 
> https://github.com/sheepdog/sheepdog/commit/a8d241a1a1b452a090a14aaf0b
> 52005d186a4a93
>   Author: Yu Yang <yuyang at cmss.chinamobile.com>
>   Date:   2015-08-09 (Sun, 09 Aug 2015)
> 
>   Changed paths:
>     M lib/shared/internal.h
>     M lib/shared/ops.c
>     M lib/shared/sheep.c
>     M lib/shared/vdi.c
> 
>   Log Message:
>   -----------
>   shared lib: make all sheep requests can be called concurrently
> 
> Modified the implement of function sd_run_sdreq() so that
> simple sheep requests can be called concurrently.
> 
> Signed-off-by: Yu Yang <yuyang at cmss.chinamobile.com>
> Signed-off-by: Liu Yuan <liuyuan at cmss.chinamobile.com>
> 
> 
>   Commit: 89bd3564b601932f16a846e2d6cb5f6eb3573c5d
> 
> https://github.com/sheepdog/sheepdog/commit/89bd3564b601932f16a846e2d6
> cb5f6eb3573c5d
>   Author: Liu Yuan <liuyuan at cmss.chinamobile.com>
>   Date:   2015-08-09 (Sun, 09 Aug 2015)
> 
>   Changed paths:
>     M lib/shared/vdi.c
> 
>   Log Message:
>   -----------
>   shared lib: remove unnecessary static declarations
> 
> Signed-off-by: Liu Yuan <liuyuan at cmss.chinamobile.com>
> 
> 
>   Commit: b3bbbb66e12bd37a811e19d745f32ed9c72ae8f1
> 
> https://github.com/sheepdog/sheepdog/commit/b3bbbb66e12bd37a811e19d74
> 5f32ed9c72ae8f1
>   Author: Liu Yuan <liuyuan at cmss.chinamobile.com>
>   Date:   2015-08-09 (Sun, 09 Aug 2015)
> 
>   Changed paths:
>     M lib/shared/internal.h
>     M lib/shared/ops.c
>     M lib/shared/sheep.c
> 
>   Log Message:
>   -----------
>   shared lib: add sheep_ctl_respond
> 
> Handling of response should be a per operation work, it is not a comman work
> shared by all the operations.
> 
> Also rename respond as response.
> 
> Reviewed-by: Yu Yang <yuyang at cmss.chinamobile.com>
> Signed-off-by: Liu Yuan <liuyuan at cmss.chinamobile.com>
> 
> 
>   Commit: 48467976d97472de9393463d0abc5dae7e0e0780
> 
> https://github.com/sheepdog/sheepdog/commit/48467976d97472de9393463d0a
> bc5dae7e0e0780
>   Author: Yu Yang <yuyang at cmss.chinamobile.com>
>   Date:   2015-08-09 (Sun, 09 Aug 2015)
> 
>   Changed paths:
>     M lib/shared/ops.c
> 
>   Log Message:
>   -----------
>   shared lib: fix bug for sheep_ctl_request
> 
> Add operation code for sheep_request when submit a simple request
> 
> Signed-off-by: Yu Yang <yuyang at cmss.chinamobile.com>
> Signed-off-by: Liu Yuan <liuyuan at cmss.chinamobile.com>
> 
> 
>   Commit: 7d7563a6f418007a7179ab0f0ff468099327d904
> 
> https://github.com/sheepdog/sheepdog/commit/7d7563a6f418007a7179ab0f0ff
> 468099327d904
>   Author: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
>   Date:   2015-08-10 (Mon, 10 Aug 2015)
> 
>   Changed paths:
>     M lib/Makefile.am
>     M lib/shared/internal.h
>     A lib/shared/ops.c
>     M lib/shared/sheep.c
>     M lib/shared/sheepdog.h
>     M lib/shared/vdi.c
> 
>   Log Message:
>   -----------
>   Merge branch 'sharedlib' of https://github.com/vtolstov/sheepdog into
> vtolstov-sharedlib
> 
> 
>   Commit: 0a6e2a23e844d192857cf37d7505f8ffd5e9a85a
> 
> https://github.com/sheepdog/sheepdog/commit/0a6e2a23e844d192857cf37d75
> 05f8ffd5e9a85a
>   Author: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
>   Date:   2015-08-10 (Mon, 10 Aug 2015)
> 
>   Changed paths:
>     M lib/Makefile.am
>     M lib/shared/internal.h
>     A lib/shared/ops.c
>     M lib/shared/sheep.c
>     M lib/shared/sheepdog.h
>     M lib/shared/vdi.c
> 
>   Log Message:
>   -----------
>   Merge branch 'vtolstov-sharedlib'
> 
> 
> Compare:
> https://github.com/sheepdog/sheepdog/compare/cf994b0ace42...0a6e2a23e84
> 4



More information about the sheepdog mailing list