[PVFS2-CVS] commit by robl in pvfs2-1/include: pvfs2-encode-stubs.h
pvfs2-sysint.h pvfs2-types.h
CVS commit program
cvs at parl.clemson.edu
Mon Aug 1 19:49:49 EDT 2005
Update of /projects/cvsroot/pvfs2-1/include
In directory parlweb:/tmp/cvs-serv3456/include
Modified Files:
pvfs2-encode-stubs.h pvfs2-sysint.h pvfs2-types.h
Log Message:
Murali's patch to add VFS support for extended attributes.
Index: pvfs2-encode-stubs.h
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/include/pvfs2-encode-stubs.h,v
diff -u -w -p -u -r1.7 -r1.8
--- pvfs2-encode-stubs.h 21 Jul 2005 16:17:53 -0000 1.7
+++ pvfs2-encode-stubs.h 1 Aug 2005 22:49:49 -0000 1.8
@@ -49,6 +49,7 @@
#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_4aa_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,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-sysint.h
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/include/pvfs2-sysint.h,v
diff -u -w -p -u -r1.56 -r1.57
--- pvfs2-sysint.h 21 Jul 2005 16:17:53 -0000 1.56
+++ pvfs2-sysint.h 1 Aug 2005 22:49:49 -0000 1.57
@@ -466,6 +466,7 @@ PVFS_error PVFS_isys_seteattr(
PVFS_credentials *credentials,
PVFS_ds_keyval *key_p,
PVFS_ds_keyval *val_p,
+ int32_t flags,
PVFS_sys_op_id *op_id,
void *user_ptr);
@@ -473,7 +474,8 @@ PVFS_error PVFS_sys_seteattr(
PVFS_object_ref ref,
PVFS_credentials *credentials,
PVFS_ds_keyval *key_p,
- PVFS_ds_keyval *val_p);
+ PVFS_ds_keyval *val_p,
+ int32_t flags);
PVFS_error PVFS_isys_seteattr_list(
PVFS_object_ref ref,
@@ -481,6 +483,7 @@ PVFS_error PVFS_isys_seteattr_list(
int32_t nkey,
PVFS_ds_keyval *key_array,
PVFS_ds_keyval *val_array,
+ int32_t flags,
PVFS_sys_op_id *op_id,
void *user_ptr);
@@ -489,7 +492,8 @@ PVFS_error PVFS_sys_seteattr_list(
PVFS_credentials *credentials,
int32_t nkey,
PVFS_ds_keyval *key_array,
- PVFS_ds_keyval *val_array);
+ PVFS_ds_keyval *val_array,
+ int32_t flags);
PVFS_error PVFS_isys_deleattr(
PVFS_object_ref ref,
Index: pvfs2-types.h
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/include/pvfs2-types.h,v
diff -u -w -p -u -r1.108 -r1.109
--- pvfs2-types.h 21 Jul 2005 16:17:53 -0000 1.108
+++ pvfs2-types.h 1 Aug 2005 22:49:49 -0000 1.109
@@ -256,6 +256,10 @@ typedef struct PVFS_ds_keyval_s
#define PVFS_ATTR_SYS_ALL_SETABLE \
(PVFS_ATTR_COMMON_ALL-PVFS_ATTR_COMMON_TYPE)
+/* Extended attribute flags */
+#define PVFS_XATTR_CREATE 0x1
+#define PVFS_XATTR_REPLACE 0x2
+
/** statfs and misc. server statistic information. */
typedef struct
{
@@ -312,6 +316,23 @@ endecode_fields_2(
#define PVFS_NAME_MAX 256
/* max len of individual path element */
#define PVFS_SEGMENT_MAX 128
+
+/* max extended attribute name len as imposed by the VFS and exploited for the
+ * upcall request types */
+#define PVFS_MAX_XATTR_NAMELEN 256 /* Not the same as XATTR_NAME_MAX defined
+ by <linux/xattr.h> */
+#define PVFS_MAX_XATTR_VALUELEN 256 /* Not the same as XATTR_SIZE_MAX defined
+ by <linux/xattr.h> */
+#define PVFS_MAX_XATTR_LISTLEN 10 /* Not the same as XATTR_LIST_MAX
+ defined by <linux/xattr.h> */
+
+/* This structure is used by the VFS-client interaction alone */
+typedef struct {
+ char key[PVFS_MAX_XATTR_NAMELEN];
+ int key_sz;
+ char val[PVFS_MAX_XATTR_VALUELEN];
+ int val_sz;
+} PVFS_keyval_pair;
/** Directory entry contents. */
typedef struct
More information about the PVFS2-CVS
mailing list