[sheepdog] [PATCH RESEND 0/6] Improving cluster snapshot

Kai Zhang kyle at zelin.io
Wed Jun 5 12:35:08 CEST 2013


This series of patches improve cluster snapshot in two ways:
1. Use work queue to schedule loading/saving cluster snapshot jobs.
   So that they can be easily parallelized.
2. Avoid of reading objects that already exists in the local path.
   This is achieved by reading object's sha1 before reading object's data.

* NOTICE *
Due to the logic of collie has changed, snapshots saved before are not valid after this patches.

Kai Zhang (6):
  farm: do cluster-wide snapshot by work queue
  farm: remove sha1_hdr
  farm: trim data before calculating sha1
  farm: add sha1_file_exist() to sha1_file.c
  collie: add sd_read_object_sha1() to common.c
  farm: avoid of reading object which already exists

 collie/cluster.c          |    3 +-
 collie/collie.h           |    2 +
 collie/common.c           |   27 ++++++
 collie/farm/farm.c        |  209 ++++++++++++++++++++++++++++++++-------------
 collie/farm/farm.h        |   41 +++++-----
 collie/farm/object_tree.c |   15 +---
 collie/farm/sha1_file.c   |  121 ++++++++++++--------------
 collie/farm/snap.c        |   39 ++-------
 collie/farm/trunk.c       |  182 ++++++++++++++++-----------------------
 9 files changed, 347 insertions(+), 292 deletions(-)
 rewrite collie/farm/trunk.c (62%)




More information about the sheepdog mailing list