diff --git a/lib/blob/blobstore.h b/lib/blob/blobstore.h index c8d98b2db..61829b2e8 100644 --- a/lib/blob/blobstore.h +++ b/lib/blob/blobstore.h @@ -385,9 +385,10 @@ SPDK_STATIC_ASSERT(SPDK_BS_PAGE_SIZE == sizeof(struct spdk_blob_md_page), "Inval #define SPDK_BS_MAX_DESC_SIZE sizeof(((struct spdk_blob_md_page*)0)->descriptors) -/* TODO: Set to low amount for purpose of testing */ -/* Maximum number of LBA's a single Extent Page can fit */ -#define SPDK_EXTENTS_PER_EP 100 +/* Maximum number of extents a single Extent Page can fit. + * For an SPDK_BS_PAGE_SIZE of 4K SPDK_EXTENTS_PER_EP would be 512. */ +#define SPDK_EXTENTS_PER_EP_MAX ((SPDK_BS_MAX_DESC_SIZE - sizeof(struct spdk_blob_md_descriptor_extent_page)) / sizeof(uint32_t)) +#define SPDK_EXTENTS_PER_EP (spdk_align64pow2(SPDK_EXTENTS_PER_EP_MAX + 1) >> 1u) #define SPDK_BS_SUPER_BLOCK_SIG "SPDKBLOB"