On 08/05/2012 10:33 PM, Yunkai Zhang wrote: > On Sun, Aug 5, 2012 at 10:15 PM, levin li <[email protected]> wrote: >> From: levin li <[email protected]> >> >> Since there's already SD_MAX_REDUNDANCY defined as the max copies >> number, there's no need to keep the duplicated micro SD_MAX_COPIES >> >> Signed-off-by: levin li <[email protected]> >> --- >> collie/vdi.c | 2 +- >> include/internal_proto.h | 1 - >> include/sheep.h | 2 +- >> sheep/farm/trunk.c | 2 +- >> sheep/gateway.c | 4 ++-- >> sheep/ops.c | 2 +- >> sheep/recovery.c | 2 +- >> sheep/request.c | 2 +- >> 8 files changed, 8 insertions(+), 9 deletions(-) >> >> diff --git a/collie/vdi.c b/collie/vdi.c >> index e4f4f65..c277d9c 100644 >> --- a/collie/vdi.c >> +++ b/collie/vdi.c >> @@ -800,7 +800,7 @@ static int print_obj_epoch(uint64_t oid) >> struct sd_rsp *rsp = (struct sd_rsp *)&hdr; >> unsigned rlen, wlen; >> struct sd_vnode vnodes[SD_MAX_VNODES]; >> - struct sd_vnode *vnode_buf[SD_MAX_COPIES]; >> + struct sd_vnode *vnode_buf[SD_MAX_REDUNDANCY]; >> struct epoch_log *logs; >> int vnodes_nr, nr_logs, log_length; >> char host[128]; >> diff --git a/include/internal_proto.h b/include/internal_proto.h >> index 114f98a..2996433 100644 >> --- a/include/internal_proto.h >> +++ b/include/internal_proto.h >> @@ -24,7 +24,6 @@ >> #define SD_DEFAULT_REDUNDANCY 3 >> #define SD_MAX_REDUNDANCY 8 >> >> -#define SD_MAX_COPIES 16 > > I like SD_MAX_COPIES, it's shorter and simpler. I suggest to delete > SD_MAX_REDUNDANCY and rename SD_DEFAULT_REDUNDANCY to > SD_DEFAULT_COPIES. >
Well, I've thought about this, and I think SD_DEFAULT_COPIES seems not so clearly to indicate the redundancy level to new users, so I choose SD_MAX_REDUNDANCY and dropped SD_MAX_COPIES thanks, levin -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
