summaryrefslogtreecommitdiff
path: root/drivers/block/rbd_types.h
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2017-01-25 18:16:23 +0100
committerIlya Dryomov <idryomov@gmail.com>2017-02-20 12:16:15 +0100
commit223768d02e2ca5c1747099e03cf949c17aebffd2 (patch)
tree5452586c97e4c3384631e1dcc942ec3e16d3db61 /drivers/block/rbd_types.h
parentbc81207ea9fc01896cbc102f025f1ebb2c4bae1d (diff)
rbd: RBD_V{1,2}_DATA_FORMAT macros
... and also fix up the comment -- format 1 data objects have always been 12 hex digits long. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Diffstat (limited to 'drivers/block/rbd_types.h')
-rw-r--r--drivers/block/rbd_types.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/block/rbd_types.h b/drivers/block/rbd_types.h
index be9c76d292f5..62ff50d3e7a6 100644
--- a/drivers/block/rbd_types.h
+++ b/drivers/block/rbd_types.h
@@ -25,8 +25,8 @@
*/
#define RBD_HEADER_PREFIX "rbd_header."
-#define RBD_DATA_PREFIX "rbd_data."
#define RBD_ID_PREFIX "rbd_id."
+#define RBD_V2_DATA_FORMAT "%s.%016llx"
#define RBD_LOCK_NAME "rbd_lock"
#define RBD_LOCK_TAG "internal"
@@ -42,13 +42,14 @@ enum rbd_notify_op {
/*
* For format version 1, rbd image 'foo' consists of objects
* foo.rbd - image metadata
- * rb.<idhi>.<idlo>.00000000
- * rb.<idhi>.<idlo>.00000001
+ * rb.<idhi>.<idlo>.<extra>.000000000000
+ * rb.<idhi>.<idlo>.<extra>.000000000001
* ... - data
* There is no notion of a persistent image id in rbd format 1.
*/
#define RBD_SUFFIX ".rbd"
+#define RBD_V1_DATA_FORMAT "%s.%012llx"
#define RBD_DIRECTORY "rbd_directory"
#define RBD_INFO "rbd_info"