This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 14ffd2a657a2add2e59abd0cc26fac506a6f416f (commit)
from 0a98cff413f6003cd932c84a18f256dcdac04ca3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 14ffd2a657a2add2e59abd0cc26fac506a6f416f
Author: Kevin Harms <harms(a)alcf.anl.gov>
Date: Fri May 30 12:43:36 2014 -0500
Update for ASG 1.1.0
-----------------------------------------------------------------------
Summary of changes:
code/include/asg.h | 91 +++++++++++++++++++++++--------------
code/src/asg/asg-internal.ae | 16 ++++---
code/src/asg/asg-internal.hae | 16 ++++---
code/src/asg/asg.c | 20 ++++++---
code/tests/asg/test-asg-simple.c | 6 ++-
5 files changed, 94 insertions(+), 55 deletions(-)
Diff of changes:
diff --git a/code/include/asg.h b/code/include/asg.h
index 8544925..4f2cc5d 100644
--- a/code/include/asg.h
+++ b/code/include/asg.h
@@ -1,3 +1,11 @@
+/* Revised following meeting on March 17, 2014 to accommodate the following
+ * proposed changes:
+ *
+ * - switch from "version" to "update id" terminology
+ * - add probe parameters to asg_read call to support read+probe semantics
+ * in a single API operation
+ */
+
#ifndef TRITON_ASG_H
#define TRITON_ASG_H
@@ -9,6 +17,16 @@ extern "C"
{
#endif
+/* current API level is 1.1.0 */
+
+/* update ASG_VERSION_MAJOR on major feature or semantic changes */
+#define ASG_VERSION_MAJOR 1
+/* update ASG_VERSION_MINOR on minor changes that break API compatibility */
+#define ASG_VERSION_MINOR 1
+/* update ASG_VERSION_SUB on minor changes that do not break API
+ * compatibility */
+#define ASG_VERSION_SUB 0
+
typedef intptr_t asg_instance_t;
typedef intptr_t asg_location_t;
@@ -22,14 +40,14 @@ typedef uint64_t asg_offset_t;
typedef uint64_t asg_size_t;
-typedef uint64_t asg_version_t;
+typedef uint64_t asg_update_id_t;
-/** The highest valid version number */
-#define ASG_VERSION_MAX (2^64-2)
+/** The highest valid update_id number */
+#define ASG_UPDATE_ID_MAX ((2^64)-2)
-/** Constant indicating multiple versions
+/** Constant indicating multiple update_ids
* (used in reading) */
-#define ASG_VERSION_MIXED (2^64-1)
+#define ASG_UPDATE_ID_MIXED ((2^64)-1)
#define ASG_LOCATION_AUTO 0
@@ -45,8 +63,9 @@ typedef uint64_t asg_version_t;
typedef enum
{
ASG_SUCCESS = 0,
- ASG_ERR_VERSION = 1,
- ASG_ERR_OTHER
+ ASG_ERR_UPDATE_ID = 1,
+ ASG_ERR_LOCATION = 2,
+ ASG_ERR_OTHER = 666
} asg_ret_t;
@@ -57,16 +76,16 @@ typedef enum
typedef enum
{
/** For reading: read in order until a record is found which has the
- * same or higher version number than the one specified.
+ * same or higher update_id number than the one specified.
* For writing/punch: update records in order as specified until the end of
* the specified range is encountered or until a record is found which has a
- * version greater or equal to the one specified. */
+ * update_id greater or equal to the one specified. */
ASG_COND_UNTIL = 0x0001,
/** For reading: only read if *all* records in the specified range
- * have a version number strictly smaller than the one specified.
+ * have a update_id number strictly smaller than the one specified.
* For writing/punch: only write if *all* records in the specified range
- * have a version number strictly smaller than the one specified.
+ * have a update_id number strictly smaller than the one specified.
*/
ASG_COND_ALL = 0x0002,
@@ -74,15 +93,23 @@ typedef enum
ASG_COND_NONE = 0x0000,
ASG_COND_UNCONDITIONAL = ASG_COND_NONE,
- /** For writing/punch: automatically set the version of the updated records
- * to a version number guaranteed to be higher than any of the previously
- * existing version numbers in the range. */
- ASG_AUTO_VERSION = 0x0004,
-
+ /** For writing/punch: automatically set the update_id of the updated records
+ * to a update_id number guaranteed to be higher than any of the previously
+ * existing update_id numbers in the range. */
+ ASG_AUTO_UPDATE_ID = 0x0004,
+ ASG_WRITE_FIXED_DATA = 0x0008,
} asg_flags_t;
+typedef struct
+{
+ asg_record_id_t record_id; /** number of first record in the sequence */
+ asg_size_t seq_len; /** Number of records in sequence */
+ asg_size_t record_len; /** Length of each record in sequence */
+ asg_update_id_t record_update_id; /** Version of each record in seq */
+} asg_record_info_t;
+
/* ========================================================================*/
/** Initialize storage system instance */
@@ -94,9 +121,9 @@ int asg_finalize (asg_instance_t instance);
/**
* Retrieve data
- * - The version number of the region is returned in version_info:
- * either a specific version number, or -- if multiple versions
- * are present in the range -- ASG_VERSION_MIXED
+ * - The update_id number of the region is returned in update_id_info:
+ * either a specific update_id number, or -- if multiple update_ids
+ * are present in the range -- ASG_UPDATE_ID_MIXED
*
* */
int asg_read (
@@ -108,11 +135,13 @@ int asg_read (
asg_record_id_t start_record,
asg_size_t recordcount,
asg_flags_t flags,
- asg_version_t version_condition,
+ asg_update_id_t update_id_condition,
void * buf,
size_t bufsize,
asg_size_t * transferred,
- asg_version_t * version_info);
+ asg_record_info_t * record_buf,
+ asg_size_t * record_buf_transferred,
+ asg_update_id_t * update_id_info);
int asg_write (
asg_instance_t instance,
@@ -124,8 +153,8 @@ int asg_write (
asg_size_t recordcount,
asg_size_t recordlen,
asg_flags_t flags,
- asg_version_t version_condition,
- asg_version_t * new_version,
+ asg_update_id_t update_id_condition,
+ asg_update_id_t * new_update_id,
const void * data,
asg_size_t * transferred);
@@ -143,8 +172,8 @@ int asg_punch (
asg_record_id_t start_record,
asg_size_t recordcount,
asg_flags_t flags,
- asg_version_t version_condition,
- asg_version_t * new_version,
+ asg_update_id_t update_id_condition,
+ asg_update_id_t * new_update_id,
asg_size_t * transferred);
@@ -165,10 +194,10 @@ int asg_reset (
asg_record_id_t start_record,
asg_size_t recordcount,
asg_size_t recordlen,
+ asg_flags_t flags,
+ asg_update_id_t update_id_condition,
asg_size_t * reset_count);
-
-
/**
* Probe retrieves information about containers, objects, forks or records.
*
@@ -252,14 +281,6 @@ int asg_probe_object (
asg_fork_id_t * next);
-typedef struct
-{
- asg_record_id_t record_id; /** number of first record in the sequence */
- asg_size_t seq_len; /** Number of records in sequence */
- asg_size_t record_len; /** Length of each record in sequence */
- asg_version_t record_version; /** Version of each record in seq */
-} asg_record_info_t;
-
int asg_probe_fork (
asg_instance_t instance,
asg_location_t location,
diff --git a/code/src/asg/asg-internal.ae b/code/src/asg/asg-internal.ae
index 12a922c..3f1317c 100644
--- a/code/src/asg/asg-internal.ae
+++ b/code/src/asg/asg-internal.ae
@@ -77,8 +77,8 @@ __blocking int asg_i_write (
asg_size_t recordcount,
asg_size_t recordlen,
asg_flags_t flags,
- asg_version_t version_condition,
- asg_version_t * new_version,
+ asg_update_id_t version_condition,
+ asg_update_id_t * new_version,
const void * data,
asg_size_t * transferred)
{
@@ -138,11 +138,13 @@ __blocking int asg_i_read (
asg_record_id_t start_record,
asg_size_t recordcount,
asg_flags_t flags,
- asg_version_t version_condition,
+ asg_update_id_t version_condition,
void * buf,
size_t bufsize,
asg_size_t * transferred,
- asg_version_t * version_info)
+ asg_record_info_t * record_buf,
+ asg_size_t * record_buf_transferred,
+ asg_update_id_t * version_info)
{
triton_ret_t tret;
@@ -182,8 +184,8 @@ __blocking int asg_i_punch (
asg_record_id_t start_record,
asg_size_t recordcount,
asg_flags_t flags,
- asg_version_t version_condition,
- asg_version_t * new_version,
+ asg_update_id_t version_condition,
+ asg_update_id_t * new_version,
asg_size_t * transferred)
{
triton_ret_t tret;
@@ -220,6 +222,8 @@ __blocking int asg_i_reset (
asg_record_id_t start_record,
asg_size_t recordcount,
asg_size_t recordlen,
+ asg_flags_t flags,
+ asg_update_id_t update_id_condition,
asg_size_t * reset_count)
{
return(ASG_SUCCESS);
diff --git a/code/src/asg/asg-internal.hae b/code/src/asg/asg-internal.hae
index 74a19e6..f5a5dcc 100644
--- a/code/src/asg/asg-internal.hae
+++ b/code/src/asg/asg-internal.hae
@@ -23,8 +23,8 @@ __blocking int asg_i_write (
asg_size_t recordcount,
asg_size_t recordlen,
asg_flags_t flags,
- asg_version_t version_condition,
- asg_version_t * new_version,
+ asg_update_id_t version_condition,
+ asg_update_id_t * new_version,
const void * data,
asg_size_t * transferred);
@@ -37,11 +37,13 @@ __blocking int asg_i_read (
asg_record_id_t start_record,
asg_size_t recordcount,
asg_flags_t flags,
- asg_version_t version_condition,
+ asg_update_id_t version_condition,
void * buf,
size_t bufsize,
asg_size_t * transferred,
- asg_version_t * version_info);
+ asg_record_info_t * record_buf,
+ asg_size_t * record_buf_transferred,
+ asg_update_id_t * version_info);
/**
* Punched is exactly like write but writes zero length records.
@@ -57,8 +59,8 @@ __blocking int asg_i_punch (
asg_record_id_t start_record,
asg_size_t recordcount,
asg_flags_t flags,
- asg_version_t version_condition,
- asg_version_t * new_version,
+ asg_update_id_t version_condition,
+ asg_update_id_t * new_version,
asg_size_t * transferred);
__blocking int asg_i_reset (
@@ -70,6 +72,8 @@ __blocking int asg_i_reset (
asg_record_id_t start_record,
asg_size_t recordcount,
asg_size_t recordlen,
+ asg_flags_t flags,
+ asg_update_id_t update_id_condition,
asg_size_t * reset_count);
__blocking int asg_i_probe_system (
diff --git a/code/src/asg/asg.c b/code/src/asg/asg.c
index 36cae13..ceb56cd 100644
--- a/code/src/asg/asg.c
+++ b/code/src/asg/asg.c
@@ -113,11 +113,13 @@ int asg_read (
asg_record_id_t start_record,
asg_size_t recordcount,
asg_flags_t flags,
- asg_version_t version_condition,
+ asg_update_id_t version_condition,
void * buf,
size_t bufsize,
asg_size_t * transferred,
- asg_version_t * version_info)
+ asg_record_info_t * record_buf,
+ asg_size_t * record_buf_transferred,
+ asg_update_id_t * version_info)
{
asg_completion_t c;
ae_hints_t hints;
@@ -145,6 +147,8 @@ int asg_read (
buf,
bufsize,
transferred,
+ record_buf,
+ record_buf_transferred,
version_info);
if (r == AE_SUCCESS)
{
@@ -177,8 +181,8 @@ int asg_write (
asg_size_t recordcount,
asg_size_t recordlen,
asg_flags_t flags,
- asg_version_t version_condition,
- asg_version_t * new_version,
+ asg_update_id_t version_condition,
+ asg_update_id_t * new_version,
const void * data,
asg_size_t * transferred)
{
@@ -239,8 +243,8 @@ int asg_punch (
asg_record_id_t start_record,
asg_size_t recordcount,
asg_flags_t flags,
- asg_version_t version_condition,
- asg_version_t * new_version,
+ asg_update_id_t version_condition,
+ asg_update_id_t * new_version,
asg_size_t * transferred)
{
asg_completion_t c;
@@ -299,6 +303,8 @@ int asg_reset (
asg_record_id_t start_record,
asg_size_t recordcount,
asg_size_t recordlen,
+ asg_flags_t flags,
+ asg_update_id_t update_id_condition,
asg_size_t * reset_count)
{
asg_completion_t c;
@@ -323,6 +329,8 @@ int asg_reset (
start_record,
recordcount,
recordlen,
+ flags,
+ update_id_condition,
reset_count);
if (r == AE_SUCCESS)
{
diff --git a/code/tests/asg/test-asg-simple.c b/code/tests/asg/test-asg-simple.c
index a0043ac..aa03a45 100644
--- a/code/tests/asg/test-asg-simple.c
+++ b/code/tests/asg/test-asg-simple.c
@@ -11,7 +11,7 @@ int main(int argc, char **argv)
{
int ret;
asg_instance_t ait;
- asg_version_t out_ver;
+ asg_update_id_t out_ver;
asg_object_id_t oid;
asg_size_t out_size;
char *buffer = NULL;
@@ -68,7 +68,7 @@ int main(int argc, char **argv)
0, /* start rec */
buffer_sz, /* rec count */
1, /* rec len */
- ASG_AUTO_VERSION, /* flags */
+ ASG_AUTO_UPDATE_ID, /* flags */
0, /* update id */
&out_ver, /* assigned version */
buffer, /* data */
@@ -96,6 +96,8 @@ int main(int argc, char **argv)
buffer,
buffer_sz,
&out_size, /* resulting size */
+ NULL, /* record info */
+ NULL, /* number of record info bufs */
&out_ver); /* assigned version */
if(ret != ASG_SUCCESS)
{
hooks/post-receive
--