[Sheepdog] [PATCH 07/10] sheep: cleanup nr_copies handling

MORITA Kazutaka morita.kazutaka at gmail.com
Mon Apr 30 09:08:00 CEST 2012


At Fri, 27 Apr 2012 10:23:51 -0400,
Christoph Hellwig wrote:
> 
> There are a few places that take a different number of copies from the
> inode or the on the wire header.  These look incorrect to me, but I'd
> like to have some review of those.  These places should be either
> documented or removed ASAP.

We planned to support a different redundancy level for each VDI.
For example:

 $ collie vdi create test 1G --copies 1  # no redundancy (for temporary VDIs)
 $ collie vdi create test 1G --copies 5  # 5 copies (for important VDIs)
 $ collie vdi create test 1G             # use a default redundancy level,
                                         # which is specified when formatting cluster

inode->nr_copies was the number of copies of the VDI, and
sys->nr_copies was the default redundancy level.

However, it required a big change in recovery code, so I left it
untouched at the time.  For now, I think we should use sys->nr_copies
for every places, and make nr_copies in sheepdog_inode and sd_*_req
reserved fields.

Thanks,

Kazutaka



More information about the sheepdog mailing list