[PVFS2-CVS] commit by walt in pvfs2/include: pvfs2-debug.h pvfs2-encode-stubs.h pvfs2-event.h pvfs2-sysint.h pvfs2-types.h

CVS commit program cvs at parl.clemson.edu
Thu Jun 16 20:50:08 EDT 2005


Update of /projects/cvsroot/pvfs2/include
In directory parlweb:/tmp/cvs-serv7247/include

Modified Files:
      Tag: WALT2
	pvfs2-debug.h pvfs2-encode-stubs.h pvfs2-event.h 
	pvfs2-sysint.h pvfs2-types.h 
Log Message:
updates for adding extended attributes


Index: pvfs2-debug.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/include/pvfs2-debug.h,v
diff -p -u -r1.41 -r1.41.12.1
--- pvfs2-debug.h	27 Oct 2004 19:12:25 -0000	1.41
+++ pvfs2-debug.h	16 Jun 2005 23:50:07 -0000	1.41.12.1
@@ -54,6 +54,9 @@
 #define GOSSIP_CLIENTCORE_TIMING_DEBUG ((uint64_t)1 << 32)
 #define GOSSIP_SETATTR_DEBUG           ((uint64_t)1 << 33)
 #define GOSSIP_MKDIR_DEBUG             ((uint64_t)1 << 34)
+#define GOSSIP_GETEATTR_DEBUG          ((uint64_t)1 << 35)
+#define GOSSIP_SETEATTR_DEBUG          ((uint64_t)1 << 36)
+#define GOSSIP_ENDECODE_DEBUG          ((uint64_t)1 << 37)
 
 #define GOSSIP_BMI_DEBUG_ALL (uint64_t)                               \
 (GOSSIP_BMI_DEBUG_TCP + GOSSIP_BMI_DEBUG_CONTROL +                    \

Index: pvfs2-encode-stubs.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/include/pvfs2-encode-stubs.h,v
diff -p -u -r1.6 -r1.6.8.1
--- pvfs2-encode-stubs.h	31 Mar 2005 19:16:03 -0000	1.6
+++ pvfs2-encode-stubs.h	16 Jun 2005 23:50:07 -0000	1.6.8.1
@@ -46,6 +46,9 @@
 
 #define endecode_fields_1a(n,t1,x1,tn1,n1,ta1,a1)
 #define endecode_fields_1a_struct(n,t1,x1,tn1,n1,ta1,a1)
+#define endecode_fields_2a_struct(n,t1,x1,t2,x2,tn1,n1,ta1,a1)
+#define endecode_fields_3a_struct(n,t1,x1,t2,x2,t3,x3,tn1,n1,ta1,a1)
+#define endecode_fields_3aa_struct(n,t1,x1,t2,x2,t3,x3,tn1,n1,ta1,a1,ta2,a2)
 #define endecode_fields_1a_1a_struct(n,t1,x1,tn1,n1,ta1,a1,t2,x2,tn2,n2,ta2,a2)
 #define endecode_fields_4a_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,tn1,n1,ta1,a1)
 #define endecode_fields_5a_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,tn1,n1,ta1,a1)

Index: pvfs2-event.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/include/pvfs2-event.h,v
diff -p -u -r1.10 -r1.10.12.1
--- pvfs2-event.h	13 Oct 2004 01:06:30 -0000	1.10
+++ pvfs2-event.h	16 Jun 2005 23:50:07 -0000	1.10.12.1
@@ -61,7 +61,8 @@ enum PVFS_event_op
      PVFS_EVENT_TROVE_DSPACE_REMOVE = 21,
      PVFS_EVENT_TROVE_DSPACE_VERIFY = 22,
      PVFS_EVENT_TROVE_BSTREAM_VALIDATE = 23,
-     PVFS_EVENT_TROVE_KEYVAL_VALIDATE = 24
+     PVFS_EVENT_TROVE_KEYVAL_VALIDATE = 24,
+     PVFS_EVENT_TROVE_KEYVAL_WRITE_LIST = 25
 };
 
 #endif /* __PVFS2_EVENT_H */

Index: pvfs2-sysint.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/include/pvfs2-sysint.h,v
diff -p -u -r1.53 -r1.53.12.1
--- pvfs2-sysint.h	22 Dec 2004 23:46:55 -0000	1.53
+++ pvfs2-sysint.h	16 Jun 2005 23:50:07 -0000	1.53.12.1
@@ -73,6 +73,10 @@ struct PVFS_sys_dist_s
 };
 typedef struct PVFS_sys_dist_s PVFS_sys_dist;
 
+/**********************************************************************/
+/* Structures that Hold the results of various system interface calls */
+/**********************************************************************/
+
 /** Holds results of a lookup operation (reference to object). */
 struct PVFS_sysresp_lookup_s
 {
@@ -160,7 +164,30 @@ struct PVFS_sysresp_getparent_s
 };
 typedef struct PVFS_sysresp_getparent_s PVFS_sysresp_getparent;
 
-/* system interface functions */
+/** Holds results of a geteattr operation (attributes of object). */
+struct PVFS_sysresp_geteattr_s
+{
+    PVFS_ds_keyval val;
+};
+typedef struct PVFS_sysresp_geteattr_s PVFS_sysresp_geteattr;
+
+/** Holds results of a geteattr_list operation (attributes of object). */
+struct PVFS_sysresp_geteattr_list_s
+{
+    PVFS_ds_keyval *val_array;
+};
+typedef struct PVFS_sysresp_geteattr_list_s PVFS_sysresp_geteattr_list;
+
+/* seteattr */
+/* no data returned in seteattr response */
+
+/* seteattr_list */
+/* no data returned in seteattr_list response */
+
+
+/****************************************/
+/* system interface function prototypes */
+/****************************************/
 
 int PVFS_sys_initialize(
     uint64_t default_debug_mask);
@@ -406,6 +433,66 @@ PVFS_error PVFS_sys_dist_setparam(
     PVFS_sys_dist* dist,
     const char* param,
     void* value);
+
+PVFS_error PVFS_isys_geteattr(
+    PVFS_object_ref ref,
+    PVFS_credentials *credentials,
+    PVFS_ds_keyval *key_p,
+    PVFS_sysresp_geteattr *resp,
+    PVFS_sys_op_id *op_id,
+    void *user_ptr);
+
+PVFS_error PVFS_sys_geteattr(
+    PVFS_object_ref ref,
+    PVFS_credentials *credentials,
+    PVFS_ds_keyval *key_p,
+    PVFS_sysresp_geteattr *resp);
+
+PVFS_error PVFS_isys_geteattr_list(
+    PVFS_object_ref ref,
+    PVFS_credentials *credentials,
+    int32_t nkey,
+    PVFS_ds_keyval *key_p,
+    PVFS_sysresp_geteattr_list *resp,
+    PVFS_sys_op_id *op_id,
+    void *user_ptr);
+
+PVFS_error PVFS_sys_geteattr_list(
+    PVFS_object_ref ref,
+    PVFS_credentials *credentials,
+    int32_t nkey,
+    PVFS_ds_keyval *key_p,
+    PVFS_sysresp_geteattr_list *resp);
+
+PVFS_error PVFS_isys_seteattr(
+    PVFS_object_ref ref,
+    PVFS_credentials *credentials,
+    PVFS_ds_keyval *key_p,
+    PVFS_ds_keyval *val_p,
+    PVFS_sys_op_id *op_id,
+    void *user_ptr);
+
+PVFS_error PVFS_sys_seteattr(
+    PVFS_object_ref ref,
+    PVFS_credentials *credentials,
+    PVFS_ds_keyval *key_p,
+    PVFS_ds_keyval *val_p);
+
+PVFS_error PVFS_isys_seteattr_list(
+    PVFS_object_ref ref,
+    PVFS_credentials *credentials,
+    int32_t nkey,
+    PVFS_ds_keyval *key_array,
+    PVFS_ds_keyval *val_array,
+    PVFS_sys_op_id *op_id,
+    void *user_ptr);
+
+PVFS_error PVFS_sys_seteattr_list(
+    PVFS_object_ref ref,
+    PVFS_credentials *credentials,
+    int32_t nkey,
+    PVFS_ds_keyval *key_array,
+    PVFS_ds_keyval *val_array);
 
 #endif
 

Index: pvfs2-types.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/include/pvfs2-types.h,v
diff -p -u -r1.103 -r1.103.8.1
--- pvfs2-types.h	31 Mar 2005 19:16:03 -0000	1.103
+++ pvfs2-types.h	16 Jun 2005 23:50:07 -0000	1.103.8.1
@@ -173,6 +173,26 @@ typedef enum
 #define decode_PVFS_ds_type decode_enum
 #define encode_PVFS_ds_type encode_enum
 
+/* Key/Value Pairs */
+/* Extended attributes are stored on objects with */
+/* a Key/Value pair.  A key or a value is simply */
+/* a byte string of some length.  Keys are normally */
+/* strings, and thus are printable ASCII and NULL */
+/* terminated.  Values are any sequence of bytes */
+/* and are user interpreted.  This struct represents */
+/* EITHER a key or a value.  This struct is IDENTICAL */
+/* to a TROVE_keyval_s defined in src/io/trove/trove-types.h */
+/* but is duplicated here to maintain separation between */
+/* the Rrove implementation and PVFS2.  This struct should */
+/* be used everywhere but within Trove. WBL 6/2005*/
+typedef struct PVFS_ds_keyval_s
+{
+        void *buffer;      /* points to actual key or value */
+        int32_t buffer_sz; /* the size of the area pointed to by buffer */
+        int32_t read_sz;   /* when reading, the actual number of bytes read */
+                           /* only valid after a read */
+} PVFS_ds_keyval;
+
 /* internal attribute masks, common to all obj types */
 #define PVFS_ATTR_COMMON_UID   (1 << 0)
 #define PVFS_ATTR_COMMON_GID   (1 << 1)



More information about the PVFS2-CVS mailing list