[sheepdog] [PATCH v2 0/6] Improving cluster snapshot
Kai Zhang
kyle at zelin.io
Sat Jun 8 04:02:27 CEST 2013
v2:
- rename get_sha1_trim() to get_sha1()
- make sha1_to_path() thread safe
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 | 123 +++++++++++++--------------
collie/farm/snap.c | 39 ++-------
collie/farm/trunk.c | 182 ++++++++++++++++-----------------------
9 files changed, 348 insertions(+), 293 deletions(-)
rewrite collie/farm/trunk.c (62%)
More information about the sheepdog
mailing list