[PVFS2-CVS] commit by walt in pvfs2-1/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 Jul 21 13:17:53 EDT 2005
Update of /projects/cvsroot/pvfs2-1/include
In directory parlweb:/tmp/cvs-serv14537/include
Modified Files:
pvfs2-debug.h pvfs2-encode-stubs.h pvfs2-event.h
pvfs2-sysint.h pvfs2-types.h
Log Message:
added extended attribute support
Index: pvfs2-debug.h
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/include/pvfs2-debug.h,v
diff -p -u -r1.42 -r1.43
--- pvfs2-debug.h 13 Jul 2005 20:42:13 -0000 1.42
+++ pvfs2-debug.h 21 Jul 2005 16:17:53 -0000 1.43
@@ -55,6 +55,15 @@
#define GOSSIP_SETATTR_DEBUG ((uint64_t)1 << 33)
#define GOSSIP_MKDIR_DEBUG ((uint64_t)1 << 34)
#define GOSSIP_VARSTRIP_DEBUG ((uint64_t)1 << 35)
+#define GOSSIP_GETEATTR_DEBUG ((uint64_t)1 << 36)
+#define GOSSIP_SETEATTR_DEBUG ((uint64_t)1 << 37)
+#define GOSSIP_ENDECODE_DEBUG ((uint64_t)1 << 38)
+#define GOSSIP_DELEATTR_DEBUG ((uint64_t)1 << 39)
+
+/* NOTE: if you want your gossip flag to be controlable from
+ * pvfs2-set-debugmask you have to add it in
+ * src/common/misc/pvfs-debug.c
+ */
#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-1/include/pvfs2-encode-stubs.h,v
diff -p -u -r1.6 -r1.7
--- pvfs2-encode-stubs.h 31 Mar 2005 19:16:03 -0000 1.6
+++ pvfs2-encode-stubs.h 21 Jul 2005 16:17:53 -0000 1.7
@@ -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-1/include/pvfs2-event.h,v
diff -p -u -r1.10 -r1.11
--- pvfs2-event.h 13 Oct 2004 01:06:30 -0000 1.10
+++ pvfs2-event.h 21 Jul 2005 16:17:53 -0000 1.11
@@ -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-1/include/pvfs2-sysint.h,v
diff -p -u -r1.55 -r1.56
--- pvfs2-sysint.h 11 Jul 2005 20:06:22 -0000 1.55
+++ pvfs2-sysint.h 21 Jul 2005 16:17:53 -0000 1.56
@@ -77,6 +77,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
{
@@ -164,7 +168,23 @@ struct PVFS_sysresp_getparent_s
};
typedef struct PVFS_sysresp_getparent_s PVFS_sysresp_getparent;
-/* system interface functions */
+/** Holds results of a geteattr_list operation (attributes of object). */
+struct PVFS_sysresp_geteattr_s
+{
+ PVFS_ds_keyval *val_array;
+};
+typedef struct PVFS_sysresp_geteattr_s PVFS_sysresp_geteattr;
+
+/* seteattr */
+/* no data returned in seteattr response */
+
+/* deleattr */
+/* no data returned in deleattr response */
+
+
+/****************************************/
+/* system interface function prototypes */
+/****************************************/
int PVFS_sys_initialize(
uint64_t default_debug_mask);
@@ -410,6 +430,78 @@ 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_ds_keyval *val_p);
+
+PVFS_error PVFS_isys_geteattr_list(
+ PVFS_object_ref ref,
+ PVFS_credentials *credentials,
+ int32_t nkey,
+ PVFS_ds_keyval *key_p,
+ PVFS_sysresp_geteattr *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 *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);
+
+PVFS_error PVFS_isys_deleattr(
+ PVFS_object_ref ref,
+ PVFS_credentials *credentials,
+ PVFS_ds_keyval *key_p,
+ PVFS_sys_op_id *op_id,
+ void *user_ptr);
+
+PVFS_error PVFS_sys_deleattr(
+ PVFS_object_ref ref,
+ PVFS_credentials *credentials,
+ PVFS_ds_keyval *key_p);
#endif
Index: pvfs2-types.h
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/include/pvfs2-types.h,v
diff -p -u -r1.107 -r1.108
--- pvfs2-types.h 13 Jul 2005 15:45:52 -0000 1.107
+++ pvfs2-types.h 21 Jul 2005 16:17:53 -0000 1.108
@@ -182,6 +182,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