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

Liu Yuan namei.unix at gmail.com
Mon Apr 30 20:00:53 CEST 2012


On 05/01/2012 01:21 AM, Christoph Hellwig wrote:

> On Tue, May 01, 2012 at 12:22:56AM +0800, Liu Yuan wrote:
>> I think this patch is need to make sure that we don't create VDI when
>> the copies aren't promised.
>>
>> Speaking of 'this area', did you mean 'different VDI redundant level'
>> feature? If so, it is very nice of you to have this feature
>> implemented.
> 
> The idea is to remove it until we have it properly implemented, as
> suggest by Kazutaka - leaving in fragments of unimplemented
> functionality is bound to cause the confusion we have right now.  I'd
> actually love to put it back rather sooner or later, but it needs to be
> done properly.

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.

>> But I think that should be a different patch set, if you
>> are fine with this patch, I'm going to merge it.
> 
> The patch you sent just passes the "copies" argument on to read_object
> and write_object calls.  I think that's incorrected because my earlier
> patched move the ceiling for it from these functions into the caller.
> I think that's what the patch I sent does, but I'm at a conference and
> still jetlagged, so please double check it.
> 


I think it depends how the caller uses it. For VDI creation, I think we
have to pass real redundant level into read/write_object(). We should
keep exact copies for what users asks for. Otherwise, we should return
error to indicate operation failure. What you patches did is to create
VDI even if there isn't enough available nodes.

Thanks,
Yuan



More information about the sheepdog mailing list