diff --git a/include/bake-bulk.h b/include/bake-bulk.h index b64a345f847594b33484cee80315daf522a31d27..20fd49b57a16e6109ec2ae96c6a3899ff2e450f3 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 8d3402c32deb6d45dd028a60fb3de0fff5658a84..36c82fd1c743a3b441202faa5d42a8032e6ff765 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); +} + +