From: Hitoshi Mitake <mitake.hitoshi@gmail.com>
To: stgt@vger.kernel.org
Cc: sheepdog@lists.wpkg.org,
Hitoshi Mitake <mitake.hitoshi@gmail.com>,
Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Subject: [PATCH 2/3] sheepdog: update layout of inode object header
Date: Sun, 6 Jul 2014 23:30:31 +0900 [thread overview]
Message-ID: <1404657032-17629-3-git-send-email-mitake.hitoshi@gmail.com> (raw)
In-Reply-To: <1404657032-17629-1-git-send-email-mitake.hitoshi@gmail.com>
This change doesn't affect behavior of sheepdog driver. Just for
documentation purpose.
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
---
usr/bs_sheepdog.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/usr/bs_sheepdog.c b/usr/bs_sheepdog.c
index a333675..15f44d8 100644
--- a/usr/bs_sheepdog.c
+++ b/usr/bs_sheepdog.c
@@ -193,6 +193,19 @@ struct sheepdog_vdi_rsp {
uint32_t pad[5];
};
+/*
+ * Historical notes: previous version of sheepdog (< v0.9.0) has a limit of
+ * maximum number of children which can be created from single VDI. So the inode
+ * object has an array for storing the IDs of the child VDIs. The constant
+ * OLD_MAX_CHILDREN represents it. Current sheepdog doesn't have the limitation,
+ * so we are recycling the area (4 * OLD_MAX_CHILDREN = 4KB) for storing new
+ * metadata.
+ *
+ * users of the released area:
+ * - uint32_t btree_counter
+ */
+#define OLD_MAX_CHILDREN 1024U
+
struct sheepdog_inode {
char name[SD_MAX_VDI_LEN];
char tag[SD_MAX_VDI_TAG_LEN];
@@ -201,13 +214,17 @@ struct sheepdog_inode {
uint64_t vm_clock_nsec;
uint64_t vdi_size;
uint64_t vm_state_size;
- uint16_t copy_policy;
+ uint8_t copy_policy;
+ uint8_t store_policy;
uint8_t nr_copies;
uint8_t block_size_shift;
uint32_t snap_id;
uint32_t vdi_id;
uint32_t parent_vdi_id;
- uint32_t child_vdi_id[MAX_CHILDREN];
+
+ uint32_t btree_counter;
+ uint32_t __unused[OLD_MAX_CHILDREN - 1];
+
uint32_t data_vdi_id[MAX_DATA_OBJS];
};
--
1.9.1
next prev parent reply other threads:[~2014-07-06 14:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-06 14:30 [PATCH 0/3] various update for sheepdog driver Hitoshi Mitake
2014-07-06 14:28 ` FUJITA Tomonori
2014-07-06 14:30 ` [PATCH 1/3] sheepdog: turn on cache flag of write request Hitoshi Mitake
2014-07-06 14:30 ` Hitoshi Mitake [this message]
2014-07-06 14:30 ` [PATCH 3/3] sheepdog: add documentation Hitoshi Mitake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1404657032-17629-3-git-send-email-mitake.hitoshi@gmail.com \
--to=mitake.hitoshi@gmail.com \
--cc=mitake.hitoshi@lab.ntt.co.jp \
--cc=sheepdog@lists.wpkg.org \
--cc=stgt@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.