From 0794492b51055e1239e8815432edd74688fc8030 Mon Sep 17 00:00:00 2001 From: Phil Carns Date: Fri, 6 May 2016 11:37:09 -0700 Subject: [PATCH] stub for region create --- include/bake-bulk.h | 29 +++++++++++++++++++++++++++-- src/bake-bulk.c | 10 ++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/include/bake-bulk.h b/include/bake-bulk.h index b64a345..20fd49b 100644 --- a/include/bake-bulk.h +++ b/include/bake-bulk.h @@ -14,6 +14,14 @@ */ typedef uint64_t bake_target_id_t; +/** + * Persistent, opaque identifier for a bulk region within a BAKE target. + */ +#define BAKE_BULK_REGION_ID_SIZE 16 +typedef struct { + char data[BAKE_BULK_REGION_ID_SIZE]; +} bake_bulk_region_id_t; + /** * Obtain identifying information for a bake target through the provided * remote mercury address. @@ -25,9 +33,26 @@ typedef uint64_t bake_target_id_t; int bake_probe_instance( const char *mercury_dest, bake_target_id_t *bti); - + +/** + * Create a bounded-size bulk data region. The resulting region can be + * written using bulk write operations, and can be persisted (once writes are + * complete) with a a bulk persist operation. The region is not valid for + * read access until persisted. + * + * @param [in] bti BAKE target identifier + * @param [in] region_size size of region to be created + * @param [out] rid identifier for new region + * @returns 0 on success, -1 on failure + */ +int bake_bulk_create( + bake_target_id_t bti, + uint64_t region_size, + bake_bulk_region_id_t *rid); + /** - * Release resources associated with access to a target + * Release local resources associated with access to a target; does not + * modify the target in any way. * * @param [in] bti BAKE target_identifier */ diff --git a/src/bake-bulk.c b/src/bake-bulk.c index 8d3402c..36c82fd 100644 --- a/src/bake-bulk.c +++ b/src/bake-bulk.c @@ -115,3 +115,13 @@ int bake_shutdown_service(bake_target_id_t bti) return(0); } +int bake_bulk_create( + bake_target_id_t bti, + uint64_t region_size, + bake_bulk_region_id_t *rid) +{ + + return(-1); +} + + -- 2.26.2