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

Hitoshi Mitake h.mitake at gmail.com
Fri Jan 11 02:23:40 CET 2013


At Thu, 10 Jan 2013 19:50:48 +0800,
Liu Yuan wrote:
> 
> 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];
>   };

OK, I'll use the way of embedding descriptive name in structs like sd_ops.

Thanks,
Hitoshi



More information about the sheepdog mailing list