[Sheepdog] [PATCH 1/2] sheep: fix SD_FLAG_XXX collision

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Mon Jan 30 18:25:51 CET 2012


At Tue, 17 Jan 2012 17:04:27 +0800,
Liu Yuan wrote:
> 
> From: Liu Yuan <tailai.ly at taobao.com>
> 
> SD_FLAG_NOHALT and SD_FLAG_CMD_WRITE use the same value. This is wrong.
> 
> Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
> ---
>  include/sheep.h          |    2 --
>  include/sheepdog_proto.h |    5 +++--
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/include/sheep.h b/include/sheep.h
> index 4f2f1dc..fc86c25 100644
> --- a/include/sheep.h
> +++ b/include/sheep.h
> @@ -63,8 +63,6 @@
>  #define SD_RES_INVALID_CTIME 0x44 /* Creation time of sheepdog is different */
>  #define SD_RES_INVALID_EPOCH 0x45 /* Invalid epoch */
>  
> -#define SD_FLAG_NOHALT       0x0001 /* Server the IO rquest even lack of nodes */
> -
>  struct sd_so_req {
>  	uint8_t		proto_ver;
>  	uint8_t		opcode;
> diff --git a/include/sheepdog_proto.h b/include/sheepdog_proto.h
> index 2d0d5ec..a242766 100644
> --- a/include/sheepdog_proto.h
> +++ b/include/sheepdog_proto.h
> @@ -30,8 +30,9 @@
>  #define SD_OP_GET_VDI_INFO   0x14
>  #define SD_OP_READ_VDIS      0x15
>  
> -#define SD_FLAG_CMD_WRITE    0x01
> -#define SD_FLAG_CMD_COW      0x02
> +#define SD_FLAG_CMD_WRITE    0x0001
> +#define SD_FLAG_CMD_COW      0x0002
> +#define SD_FLAG_NOHALT       0x0004 /* Serve the IO rquest even lack of nodes */

SD_FLAG_NOHALT should be defined in include/sheep.h unless it is used
in a qemu block driver.

Thanks,

Kazutaka



More information about the sheepdog mailing list