[Sheepdog] [PATCH 3/3] sheep: fix nr_copies in vdi.c

Liu Yuan namei.unix at gmail.com
Tue May 1 15:53:07 CEST 2012


On 05/01/2012 09:18 PM, Christoph Hellwig wrote:

> On Tue, May 01, 2012 at 02:00:53AM +0800, Liu Yuan wrote:
>> I think it is good time for us to implement rather than keep clear away
>> of diff-redundant feature. If you don't have time in hands, we(or other
>> in Taobao) will go to hack it up.
> 
> While I previously though marking it reserved for now might be a good
> idea looking at the qemu client suggests removing it is a bad idea, as
> it looks at the nr_copies variable in the end, and is very unhappy if
> it's not set.
> 
> So I think the plan for now is:
> 
>  a) fix the bug in vdi deletetion


I think Levin Li has fixed it already. I'd mention that we(taobao) don't
run simple store at all. So I'd suggest that if we suspect of something
wrong, we should firstly try to see if farm has the problem. If not,
something in simple store would be the culprit.

it seems that VDI deletion has been broken for simple store for a long
time, old code just covers this bug up.

>  b) audit the I/O pathes to actually respect hdr.copies.  I think it
>     only should be read for !SD_FLAG_CMD_IO_LOCAL so that there is
>     one place to do it instead of multiple places.  I suspect adding
>     a variant of get_nr_copies that also takes a header is the best
>     way to go there.


I'd insist that the best way to respect hdr.copies is to implement that
feature for real rather than modify it to work with imaginary one.

If not, we'd better off to restore it to the old logic to avoid
premature code and save effort on other stuff.


>  c) fix the recovery algorithm for it.


What kind of problem to fix?

Thanks,
Yuan



More information about the sheepdog mailing list