From 3dadb79e37487bca8b56ac06bc7726ec9b602de1 Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Wed, 15 Jan 2020 04:32:34 -0500 Subject: [PATCH] lib/blob: add EXTENT_RLE descriptor description Since further patches will be adding new descriptors that are related to cluster layout throughout the blobstore, add description for existing descriptor too. Signed-off-by: Tomasz Zawadzki Change-Id: I722eb633445685789d5185ed59dfc910f76b109f Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481724 Tested-by: SPDK CI Jenkins Reviewed-by: Paul Luse Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- lib/blob/blobstore.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/blob/blobstore.h b/lib/blob/blobstore.h index 83f810634..8d7e8f3d4 100644 --- a/lib/blob/blobstore.h +++ b/lib/blob/blobstore.h @@ -245,11 +245,18 @@ struct spdk_bs_md_mask { }; #define SPDK_MD_DESCRIPTOR_TYPE_PADDING 0 -#define SPDK_MD_DESCRIPTOR_TYPE_EXTENT_RLE 1 #define SPDK_MD_DESCRIPTOR_TYPE_XATTR 2 #define SPDK_MD_DESCRIPTOR_TYPE_FLAGS 3 #define SPDK_MD_DESCRIPTOR_TYPE_XATTR_INTERNAL 4 +/* Following descriptors define cluster layout in a blob. */ + +/* EXTENT_RLE descriptor holds an array of LBA that points to + * beginning of allocated clusters. The array is run-length encoded, + * with 0's being unallocated clusters. It is part of serialized + * metadata chain for a blob. */ +#define SPDK_MD_DESCRIPTOR_TYPE_EXTENT_RLE 1 + struct spdk_blob_md_descriptor_xattr { uint8_t type; uint32_t length;