[sheepdog] [PATCH 5/7] sheep: update store version
MORITA Kazutaka
morita.kazutaka at gmail.com
Fri Aug 30 11:32:07 CEST 2013
From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
There is no compatibility after changing a hash function for the
consistent hash ring.
The upgrade code is not implemented yet.
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
sheep/config.c | 2 +-
sheep/migrate.c | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/sheep/config.c b/sheep/config.c
index 67198c0..6fe1437 100644
--- a/sheep/config.c
+++ b/sheep/config.c
@@ -11,7 +11,7 @@
#include "sheep_priv.h"
-#define SD_FORMAT_VERSION 0x0002
+#define SD_FORMAT_VERSION 0x0003
#define SD_CONFIG_SIZE 40
static struct sheepdog_config {
diff --git a/sheep/migrate.c b/sheep/migrate.c
index 77fc6b9..fa020e7 100644
--- a/sheep/migrate.c
+++ b/sheep/migrate.c
@@ -418,9 +418,17 @@ static int migrate_from_v1_to_v2(void)
return ret;
}
+static int migrate_from_v2_to_v3(void)
+{
+ sd_err("not implemented");
+
+ return -1;
+}
+
static int (*migrate[])(void) = {
migrate_from_v0_to_v1, /* from 0.4.0 or 0.5.0 to 0.5.1 */
migrate_from_v1_to_v2, /* from 0.5.x to 0.6.0 */
+ migrate_from_v2_to_v3, /* from 0.6.x or 0.7.x to 0.8.x */
};
int sd_migrate_store(int from, int to)
--
1.7.9.5
More information about the sheepdog
mailing list