[Sheepdog] [PATCH 1/3] sheep: clean up is_access_to_busy_objects()
Liu Yuan
namei.unix at gmail.com
Wed May 2 07:34:56 CEST 2012
On 05/02/2012 12:38 PM, MORITA Kazutaka wrote:
> It will check the function is correctly called with new changes in
> future. Probably assert() would be better.
I don't think check
- if (req->rq.flags & SD_FLAG_CMD_RECOVERY) {
- if (req->rq.opcode != SD_OP_READ_OBJ)
- eprintf("bug\n");
makes any sense. There is only one place use SD_FLAG_CMD_RECOVERY flag
and except recovery logic, we would never have a chance to set this flag
with conflict opcode.
We should only assert() the place for the possible bug. Moreover, for
the IO path which is the hottest in the sheep, we really should do our
best to optimize performance.
Thanks,
Yuan
More information about the sheepdog
mailing list