[sheepdog] [PATCH v5 0/4] shepherd: a new cluster manager specialized for sheepdog

Liu Yuan namei.unix at gmail.com
Thu Jan 10 12:50:48 CET 2013


On 01/09/2013 11:42 PM, Hitoshi Mitake wrote:
> Adding *.def files to cscope.files is easy, so the cscope problem is
> not so serious.
> 
> This macro technique is useful for keeping consistency between symbols
> and string expressions.
> 
> I believe writing both of symbols and its string expressions
> separately is not so good because the string expressions can be
> generated by the symbols easily. e.g. this technique might also be
> useful for the declaration of sd_ops in ops.c.
> 

This macro trick just obfuscates the code, it doesn't help run-time
Sheep daemon get better performance nor clarify the code logic. You
actually even sacrifice the clarity of code. Let's keep it as stupid as
sd_strerror() or you can even embed a descriptive name in struct sph_msg as
  struct sph_msg {
          uint32_t type;
          uint32_t body_len;
          char name[xx];
  };

Thanks,
Yuan






More information about the sheepdog mailing list