[sheepdog] [PATCH v2 2/4] dog: use nr_copies of inode object instead of command line parameter

Liu Yuan namei.unix at gmail.com
Thu May 8 08:33:31 CEST 2014


On Thu, May 08, 2014 at 03:17:21PM +0900, Hitoshi Mitake wrote:
> On Thu, May 8, 2014 at 2:43 PM, Liu Yuan <namei.unix at gmail.com> wrote:
> > On Wed, May 07, 2014 at 11:38:28PM +0900, Hitoshi Mitake wrote:
> >> From: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
> >>
> >> Current "dog vdi clone" has a possibility of creating clone volume
> >> which has a different replica number from its original volume when it
> >> receives -c option. This patch forbid such a situation by letting
> >> vdi_clone() use inode->nr_copies instead of vdi_cmd_data.nr_copies
> >> (the variable which holds a value passed with -c option).
> >
> > what is the problem of a clone that has different copies than its base?
> 
> If we allow different copy numbers in one VDI family, we have to run
> recovery after creating clone.
> 
> e.g. assume a case of creating a clone with 4 copies from a snapshot
> with 3 copies. After creating clones, sheep must create one more
> copies of objects. VDI deletion, discard, COW will be more difficult.
> Every object should have a maximum number of copies of every VDIs
> which point the object.
> 
> Even if we have a feature for runtime changing of copy number in the
> future, we have to implement the above complicated feature and we
> don't have it now. So the copy number of clones must be equal to its
> base volume.
> 

Okay, make sense, applied thanks

Yuan



More information about the sheepdog mailing list