[Sheepdog] [PATCH 1/2] store: split store_queue_request_local

Liu Yuan namei.unix at gmail.com
Fri Nov 11 14:36:31 CET 2011


On 11/11/2011 09:29 PM, Christoph Hellwig wrote:

>> Since we'er already here with the messy IO code, how about further
>> cleaning up the code by replace the switch case with function array that
>> is indexed by hdr->opcode? Would be even nicer if you try to re-factor
>> the IO logic.
> 
> I've never been a huge fan of the indexed function pointer tables,
> but if tha is what is wanted it's a trivial change on top of this one.
> 


Okay, it is just a matter of taste. But if we add more SD_OP_* in the
future, jump table would ease the process a bit.

Anyway, to confine the discussion to the current matter, either looks
fine to me, since the the size of switch clause is small.

Thanks,
Yuan



More information about the sheepdog mailing list