[sheepdog] [PATCH v8 11/17] sheep: update store format version to v5
Hitoshi Mitake
mitake.hitoshi at gmail.com
Sun Mar 30 16:10:04 CEST 2014
From: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
This patchset introduces two important change for sheep store:
1. generational reference counting: adding ledger object and expand
inode object for generation reference
2. changing a place of btree_counter in inode object
Incrementing SD_FORMAT_VERSION in either of them would be
confusing. So this independent patch updates the number.
Cc: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
Cc: Valerio Pachera <sirio81 at gmail.com>
Cc: Alessandro Bolgia <alessandro at extensys.it>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
sheep/config.c | 2 +-
sheep/migrate.c | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/sheep/config.c b/sheep/config.c
index 9a0217b..beb6509 100644
--- a/sheep/config.c
+++ b/sheep/config.c
@@ -11,7 +11,7 @@
#include "sheep_priv.h"
-#define SD_FORMAT_VERSION 0x0004
+#define SD_FORMAT_VERSION 0x0005
#define SD_CONFIG_SIZE 40
static struct sheepdog_config {
diff --git a/sheep/migrate.c b/sheep/migrate.c
index fcffc1e..81c4de7 100644
--- a/sheep/migrate.c
+++ b/sheep/migrate.c
@@ -497,6 +497,12 @@ static int migrate_from_v3_to_v4(void)
return 0;
}
+static int migrate_from_v4_to_v5(void)
+{
+ panic("not implemented yet");
+ 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 */
@@ -507,6 +513,16 @@ static int (*migrate[])(void) = {
* produced by the commit 79706e07a068
*/
migrate_from_v3_to_v4,
+
+ /*
+ * from v0.8.x to v0.9.y
+ *
+ * introduced changes:
+ * 1. generational reference counting: adding ledger object and expand
+ * inode object for generation reference
+ * 2. changing a place of btree_counter in inode object
+ */
+ migrate_from_v4_to_v5,
};
int sd_migrate_store(int from, int to)
--
1.8.3.2
More information about the sheepdog
mailing list