CEPH filesystem development
 help / color / mirror / Atom feed
From: Alex Elder <elder@inktank.com>
To: ceph-devel@vger.kernel.org
Subject: [PATCH 3/5] rbd: define some new format constants
Date: Fri, 07 Sep 2012 13:19:27 -0500	[thread overview]
Message-ID: <504A3AAF.1000403@inktank.com> (raw)
In-Reply-To: <504A39E0.1040107@inktank.com>

Define constant symbols related to the rbd format 2 object names.
This begins to bring this version of the "rbd_types.h" header
more in line with the current user-space version of that file.
Complete reconciliation of differences will be done at some
point later, as a separate task.

Signed-off-by: Alex Elder <elder@inktank.com>
---
 drivers/block/rbd_types.h |   25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/drivers/block/rbd_types.h b/drivers/block/rbd_types.h
index d9d8a77..cbe77fa 100644
--- a/drivers/block/rbd_types.h
+++ b/drivers/block/rbd_types.h
@@ -15,15 +15,30 @@

 #include <linux/types.h>

+/* For format version 2, rbd image 'foo' consists of objects
+ *   rbd_id.foo		- id of image
+ *   rbd_header.<id>	- image metadata
+ *   rbd_data.<id>.0000000000000000
+ *   rbd_data.<id>.0000000000000001
+ *   ...		- data
+ * Clients do not access header data directly in rbd format 2.
+ */
+
+#define RBD_HEADER_PREFIX      "rbd_header."
+#define RBD_DATA_PREFIX        "rbd_data."
+#define RBD_ID_PREFIX          "rbd_id."
+
 /*
- * rbd image 'foo' consists of objects
- *   foo.rbd      - image metadata
- *   foo.00000000
- *   foo.00000001
- *   ...          - data
+ * For format version 1, rbd image 'foo' consists of objects
+ *   foo.rbd		- image metadata
+ *   rb.<idhi>.<idlo>.00000000
+ *   rb.<idhi>.<idlo>.00000001
+ *   ...		- data
+ * There is no notion of a persistent image id in rbd format 1.
  */

 #define RBD_SUFFIX		".rbd"
+
 #define RBD_DIRECTORY           "rbd_directory"
 #define RBD_INFO                "rbd_info"

-- 
1.7.9.5


  parent reply	other threads:[~2012-09-07 18:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-07 18:16 [PATCH 0/5] rbd: kill create_snap sysfs entry Alex Elder
2012-09-07 18:19 ` [PATCH 1/5] rbd: pass flags to rbd_req_sync_exec() Alex Elder
2012-09-11 15:14   ` Josh Durgin
2012-09-07 18:19 ` [PATCH 2/5] rbd: support data returned from OSD methods Alex Elder
2012-09-11 15:16   ` Josh Durgin
2012-09-07 18:19 ` Alex Elder [this message]
2012-09-11 15:18   ` [PATCH 3/5] rbd: define some new format constants Josh Durgin
2012-09-07 18:19 ` [PATCH 4/5] rbd: define rbd_dev_image_id() Alex Elder
2012-09-11 15:50   ` Josh Durgin
2012-09-07 18:19 ` [PATCH 5/5] rbd: kill create_snap sysfs entry Alex Elder
2012-09-11 20:53   ` Josh Durgin

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=504A3AAF.1000403@inktank.com \
    --to=elder@inktank.com \
    --cc=ceph-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox