Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Extended keyed stream interface to include preallocation
Peter Dinda [Mon, 18 Jul 2011 21:51:49 +0000 (16:51 -0500)]
palacios/include/interfaces/vmm_keyed_stream.h
palacios/src/interfaces/vmm_keyed_stream.c

index e06535d..06fafd5 100644 (file)
@@ -49,6 +49,7 @@ typedef enum {V3_KS_RD_ONLY,V3_KS_WR_ONLY,V3_KS_WR_ONLY_CREATE} v3_keyed_stream_
 
 v3_keyed_stream_t     v3_keyed_stream_open(char *url, v3_keyed_stream_open_t open_type);
 void                  v3_keyed_stream_close(v3_keyed_stream_t stream);
+void                  v3_keyed_stream_preallocate_hint_key(v3_keyed_stream_t stream, char *key, uint64_t size);
 v3_keyed_stream_key_t v3_keyed_stream_open_key(v3_keyed_stream_t stream, char *key);
 void                  v3_keyed_stream_close_key(v3_keyed_stream_t stream,  char *key);
 sint64_t              v3_keyed_stream_write_key(v3_keyed_stream_t stream,  
@@ -85,6 +86,10 @@ struct v3_keyed_stream_hooks {
                              
     void (*close)(v3_keyed_stream_t stream);
 
+    void (*preallocate_hint_key)(v3_keyed_stream_t stream,
+                                char *key,
+                                uint64_t size);
+
     v3_keyed_stream_key_t (*open_key)(v3_keyed_stream_t stream,
                                      char *key);
 
index 4ba376b..79d69ac 100644 (file)
@@ -46,6 +46,14 @@ void                  v3_keyed_stream_close(v3_keyed_stream_t stream)
 }
 
 
+void v3_keyed_stream_preallocate_hint_key(v3_keyed_stream_t stream, char *key, uint64_t size)
+{
+    V3_ASSERT(keyed_stream_hooks != NULL);
+    V3_ASSERT(keyed_stream_hooks->preallocate_hint_key != NULL);
+
+    return keyed_stream_hooks->preallocate_hint_key(stream,key,size);
+}
+
 v3_keyed_stream_key_t v3_keyed_stream_open_key(v3_keyed_stream_t stream, char *key)
 {
     V3_ASSERT(keyed_stream_hooks != NULL);