[Pvfs2-cvs] commit by nlmills in pvfs2/include: pvfs2-mirror.h
pvfs2-debug.h pvfs2-encode-stubs.h pvfs2-mgmt.h
pvfs2-sysint.h pvfs2-types.h pvfs2.h
CVS commit program
cvs at parl.clemson.edu
Fri Jun 18 20:01:15 EDT 2010
Update of /projects/cvsroot/pvfs2/include
In directory parlweb1:/tmp/cvs-serv17259/include
Modified Files:
Tag: cu-security-branch
pvfs2-debug.h pvfs2-encode-stubs.h pvfs2-mgmt.h pvfs2-sysint.h
pvfs2-types.h
Added Files:
Tag: cu-security-branch
pvfs2-mirror.h
Removed Files:
Tag: cu-security-branch
pvfs2.h
Log Message:
initial merge with Orange-Branch. much will be broken
Index: pvfs2-debug.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/include/pvfs2-debug.h,v
diff -p -u -r1.58.4.6 -r1.58.4.7
--- pvfs2-debug.h 21 May 2010 21:38:12 -0000 1.58.4.6
+++ pvfs2-debug.h 19 Jun 2010 00:01:15 -0000 1.58.4.7
@@ -75,21 +75,14 @@
#define GOSSIP_USER_DEV_DEBUG ((uint64_t)1 << 53)
#define GOSSIP_DIRECTIO_DEBUG ((uint64_t)1 << 54)
#define GOSSIP_MGMT_DEBUG ((uint64_t)1 << 55)
-#define GOSSIP_SECURITY_DEBUG ((uint64_t)1 << 56)
-
-/* NOTE: if you want your gossip flag to be controllable from
- * pvfs2-set-debugmask you have to add it in
- * src/common/misc/pvfs2-debug.c
- */
+#define GOSSIP_MIRROR_DEBUG ((uint64_t)1 << 56)
+#define GOSSIP_SECURITY_DEBUG ((uint64_t)1 << 57)
#define GOSSIP_BMI_DEBUG_ALL (uint64_t) \
(GOSSIP_BMI_DEBUG_TCP + GOSSIP_BMI_DEBUG_CONTROL + \
GOSSIP_BMI_DEBUG_GM + GOSSIP_BMI_DEBUG_OFFSETS + GOSSIP_BMI_DEBUG_IB \
+ GOSSIP_BMI_DEBUG_MX + GOSSIP_BMI_DEBUG_PORTALS)
-uint64_t PVFS_debug_eventlog_to_mask(
- const char *event_logging);
-
const char *PVFS_debug_get_next_debug_keyword(
int position);
@@ -112,13 +105,157 @@ const char *PVFS_debug_get_next_debug_ke
#define GOSSIP_MAX_NR 15
#define GOSSIP_MAX_DEBUG (((uint64_t)1 << GOSSIP_MAX_NR) - 1)
-/*
- * To allow these masks to be settable from pvfs2-client-core,
- * edit pvfs2-debug.c to add human readable event mask strings
- * in s_kmod_keyword_mask_map[] array.
- */
-uint64_t PVFS_kmod_eventlog_to_mask(
- const char *event_logging);
+
+/*function prototypes*/
+uint64_t PVFS_kmod_eventlog_to_mask(const char *event_logging);
+uint64_t PVFS_debug_eventlog_to_mask(const char *event_logging);
+char * PVFS_debug_mask_to_eventlog(uint64_t mask);
+char * PVFS_kmod_mask_to_eventlog(uint64_t mask);
+
+/* a private internal type */
+typedef struct
+{
+ const char *keyword;
+ uint64_t mask_val;
+} __keyword_mask_t;
+
+#define __DEBUG_ALL ((uint64_t) -1)
+
+/* map all config keywords to pvfs2 debug masks here */
+static __keyword_mask_t s_keyword_mask_map[] =
+{
+ /* Log trove debugging info. Same as 'trove'.*/
+ { "storage", GOSSIP_TROVE_DEBUG },
+ /* Log trove debugging info. Same as 'storage'. */
+ { "trove", GOSSIP_TROVE_DEBUG },
+ /* Log trove operations. */
+ { "trove_op", GOSSIP_TROVE_OP_DEBUG },
+ /* Log network debug info. */
+ { "network", GOSSIP_BMI_DEBUG_ALL },
+ /* Log server info, including new operations. */
+ { "server", GOSSIP_SERVER_DEBUG },
+ /* Log client sysint info. This is only useful for the client. */
+ { "client", GOSSIP_CLIENT_DEBUG },
+ /* Debug the varstrip distribution */
+ { "varstrip", GOSSIP_VARSTRIP_DEBUG },
+ /* Log job info */
+ { "job", GOSSIP_JOB_DEBUG },
+ /* Debug PINT_process_request calls. EXTREMELY verbose! */
+ { "request", GOSSIP_REQUEST_DEBUG },
+ /* Log request scheduler events */
+ { "reqsched", GOSSIP_REQ_SCHED_DEBUG },
+ /* Log the flow protocol events, including flowproto_multiqueue */
+ { "flowproto", GOSSIP_FLOW_PROTO_DEBUG },
+ /* Log flow calls */
+ { "flow", GOSSIP_FLOW_DEBUG },
+ /* Debug the client name cache. Only useful on the client. */
+ { "ncache", GOSSIP_NCACHE_DEBUG },
+ /* Debug read-ahead cache events. Only useful on the client. */
+ { "mmaprcache", GOSSIP_MMAP_RCACHE_DEBUG },
+ /* Debug the attribute cache. Only useful on the client. */
+ { "acache", GOSSIP_ACACHE_DEBUG },
+ /* Log/Debug distribution calls */
+ { "distribution", GOSSIP_DIST_DEBUG },
+ /* Debug the server-side dbpf attribute cache */
+ { "dbpfattrcache", GOSSIP_DBPF_ATTRCACHE_DEBUG },
+ /* Debug the client lookup state machine. */
+ { "lookup", GOSSIP_LOOKUP_DEBUG },
+ /* Debug the client remove state macine. */
+ { "remove", GOSSIP_REMOVE_DEBUG },
+ /* Debug the server getattr state machine. */
+ { "getattr", GOSSIP_GETATTR_DEBUG },
+ /* Debug the server setattr state machine. */
+ { "setattr", GOSSIP_SETATTR_DEBUG },
+ /* vectored getattr server state machine */
+ { "listattr", GOSSIP_LISTATTR_DEBUG },
+ /* Debug the client and server get ext attributes SM. */
+ { "geteattr", GOSSIP_GETEATTR_DEBUG },
+ /* Debug the client and server set ext attributes SM. */
+ { "seteattr", GOSSIP_SETEATTR_DEBUG },
+ /* Debug the readdir operation (client and server) */
+ { "readdir", GOSSIP_READDIR_DEBUG },
+ /* Debug the mkdir operation (server only) */
+ { "mkdir", GOSSIP_MKDIR_DEBUG },
+ /* Debug the io operation (reads and writes)
+ * for both the client and server */
+ { "io", GOSSIP_IO_DEBUG },
+ /* Debug the server's open file descriptor cache */
+ { "open_cache", GOSSIP_DBPF_OPEN_CACHE_DEBUG },
+ /* Debug permissions checking on the server */
+ { "permissions", GOSSIP_PERMISSIONS_DEBUG },
+ /* Debug the cancel operation */
+ { "cancel", GOSSIP_CANCEL_DEBUG },
+ /* Debug the msgpair state machine */
+ { "msgpair", GOSSIP_MSGPAIR_DEBUG },
+ /* Debug the client core app */
+ { "clientcore", GOSSIP_CLIENTCORE_DEBUG },
+ /* Debug the client timing state machines (job timeout, etc.) */
+ { "clientcore_timing", GOSSIP_CLIENTCORE_TIMING_DEBUG },
+ /* network encoding */
+ { "endecode", GOSSIP_ENDECODE_DEBUG },
+ /* Show server file (metadata) accesses (both modify and read-only). */
+ { "access", GOSSIP_ACCESS_DEBUG },
+ /* Show more detailed server file accesses */
+ { "access_detail", GOSSIP_ACCESS_DETAIL_DEBUG },
+ /* Debug the listeattr operation */
+ { "listeattr", GOSSIP_LISTEATTR_DEBUG },
+ /* Debug the state machine management code */
+ { "sm", GOSSIP_STATE_MACHINE_DEBUG },
+ /* Debug the metadata dbpf keyval functions */
+ { "keyval", GOSSIP_DBPF_KEYVAL_DEBUG },
+ /* Debug the metadata sync coalescing code */
+ { "coalesce", GOSSIP_DBPF_COALESCE_DEBUG },
+ /* Display the hostnames instead of IP addrs in debug output */
+ { "access_hostnames", GOSSIP_ACCESS_HOSTNAMES },
+ /* Show the client device events */
+ { "user_dev", GOSSIP_USER_DEV_DEBUG },
+ /* Debug the fsck tool */
+ { "fsck", GOSSIP_FSCK_DEBUG },
+ /* Debug the bstream code */
+ { "bstream", GOSSIP_BSTREAM_DEBUG },
+ /* Debug trove in direct io mode */
+ {"directio", GOSSIP_DIRECTIO_DEBUG},
+ /* Debug robust security code */
+ {"security", GOSSIP_SECURITY_DEBUG},
+ /* Everything except the periodic events. Useful for debugging */
+ { "verbose",
+ (__DEBUG_ALL & ~(GOSSIP_PERFCOUNTER_DEBUG | GOSSIP_STATE_MACHINE_DEBUG |
+ GOSSIP_ENDECODE_DEBUG | GOSSIP_USER_DEV_DEBUG))
+ },
+ /* No debug output */
+ { "none", GOSSIP_NO_DEBUG },
+ /* Everything */
+ { "all", __DEBUG_ALL }
+};
+#undef __DEBUG_ALL
+
+/* map all kmod keywords to kmod debug masks here */
+static __keyword_mask_t s_kmod_keyword_mask_map[] =
+{
+ {"super" , GOSSIP_SUPER_DEBUG},
+ {"inode" , GOSSIP_INODE_DEBUG},
+ {"file" , GOSSIP_FILE_DEBUG},
+ {"dir" , GOSSIP_DIR_DEBUG},
+ {"utils" , GOSSIP_UTILS_DEBUG},
+ {"wait" , GOSSIP_WAIT_DEBUG},
+ {"acl" , GOSSIP_ACL_DEBUG},
+ {"dcache", GOSSIP_DCACHE_DEBUG},
+ {"dev" , GOSSIP_DEV_DEBUG},
+ {"name" , GOSSIP_NAME_DEBUG},
+ {"bufmap", GOSSIP_BUFMAP_DEBUG},
+ {"cache" , GOSSIP_CACHE_DEBUG},
+ {"proc" , GOSSIP_PROC_DEBUG},
+ {"xattr" , GOSSIP_XATTR_DEBUG},
+ {"init" , GOSSIP_INIT_DEBUG},
+ {"none" , GOSSIP_NO_DEBUG},
+ {"all" , GOSSIP_MAX_DEBUG}
+};
+
+static const int num_kmod_keyword_mask_map = (int) \
+(sizeof(s_kmod_keyword_mask_map) / sizeof(__keyword_mask_t));
+
+static const int num_keyword_mask_map = (int) \
+(sizeof(s_keyword_mask_map) / sizeof(__keyword_mask_t));
#endif /* __PVFS2_DEBUG_H */
Index: pvfs2-encode-stubs.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/include/pvfs2-encode-stubs.h,v
diff -p -u -r1.14.10.5 -r1.14.10.6
--- pvfs2-encode-stubs.h 25 Aug 2009 17:55:45 -0000 1.14.10.5
+++ pvfs2-encode-stubs.h 19 Jun 2010 00:01:15 -0000 1.14.10.6
@@ -38,42 +38,40 @@
* expect these noop #defines.
*/
#ifdef __PINT_REQPROTO_ENCODE_FUNCS_C
-# include "src/proto/endecode-funcs.h"
+#include "src/proto/endecode-funcs.h"
#else /* __PINT_REQPROTO_ENCODE_FUNCS_C */
/* dummy declarations to turn off functions */
-#define endecode_fields_1(n,t1,x1)
-#define endecode_fields_1_struct(n,t1,x1)
-#define endecode_fields_2(n,t1,x1,t2,x2)
-#define endecode_fields_2_struct(n,t1,x1,t2,x2)
-#define endecode_fields_3(n,t1,x1,t2,x2,t3,x3)
-#define endecode_fields_3_struct(n,t1,x1,t2,x2,t3,x3)
-#define endecode_fields_4(n,t1,x1,t2,x2,t3,x3,t4,x4)
-#define endecode_fields_4_struct(n,t1,x1,t2,x2,t3,x3,t4,x4)
-#define endecode_fields_5(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5)
-#define endecode_fields_5_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5)
-#define endecode_fields_6(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6)
-#define endecode_fields_6_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6)
-#define endecode_fields_7_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7)
-#define endecode_fields_8_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8)
-#define endecode_fields_9_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9)
-#define endecode_fields_10_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,t10,x10)
-#define endecode_fields_11_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,t10,x10,t11,x11)
-#define endecode_fields_12(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,t10,x10,t11,x11,t12,x12)
+#define endecode_fields_1(n,t1,x1) struct endecode_fake_struct
+#define endecode_fields_1_struct(n,t1,x1) struct endecode_fake_struct
+#define endecode_fields_2(n,t1,x1,t2,x2) struct endecode_fake_struct
+#define endecode_fields_2_struct(n,t1,x1,t2,x2) struct endecode_fake_struct
+#define endecode_fields_3(n,t1,x1,t2,x2,t3,x3) struct endecode_fake_struct
+#define endecode_fields_3_struct(n,t1,x1,t2,x2,t3,x3) struct endecode_fake_struct
+#define endecode_fields_4(n,t1,x1,t2,x2,t3,x3,t4,x4) struct endecode_fake_struct
+#define endecode_fields_4_struct(n,t1,x1,t2,x2,t3,x3,t4,x4) struct endecode_fake_struct
+#define endecode_fields_5(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5) struct endecode_fake_struct
+#define endecode_fields_5_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5) struct endecode_fake_struct
+#define endecode_fields_6(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6) struct endecode_fake_struct
+#define endecode_fields_7_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7) struct endecode_fake_struct
+#define endecode_fields_8_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8) struct endecode_fake_struct
+#define endecode_fields_9_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9) struct endecode_fake_struct
+#define endecode_fields_10_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,t10,x10) struct endecode_fake_struct
+#define endecode_fields_11_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,t10,x10,t11,x11) struct endecode_fake_struct
+#define endecode_fields_12(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7,t8,x8,t9,x9,t10,x10,t11,x11,t12,x12) struct endecode_fake_struct
-#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_1aa_struct(n,t1,x1,tn1,n1,ta1,a1,ta2,a2)
-#define endecode_fields_2a_struct(n,t1,x1,t2,x2,tn1,n1,ta1,a1)
-#define endecode_fields_2aa_struct(n,t1,x1,t2,x2,tn1,n1,ta1,a1,ta2,a2)
-#define endecode_fields_3a_struct(n,t1,x1,t2,x2,t3,x3,tn1,n1,ta1,a1)
-#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)
-#define endecode_fields_3a2a_struct(name,t1,x1,t2,x2,t3,x3,tn1,n1,ta1,a1,t4,x4,t5,x5,tn2,n2,ta2,a2)
+#define endecode_fields_1a(n,t1,x1,tn1,n1,ta1,a1) struct endecode_fake_struct
+#define endecode_fields_1a_struct(n,t1,x1,tn1,n1,ta1,a1) struct endecode_fake_struct
+#define endecode_fields_1aa_struct(n,t1,x1,tn1,n1,ta1,a1,ta2,a2) struct endecode_fake_struct
+#define endecode_fields_2a_struct(n,t1,x1,t2,x2,tn1,n1,ta1,a1) struct endecode_fake_struct
+#define endecode_fields_2aa_struct(n,t1,x1,t2,x2,tn1,n1,ta1,a1,ta2,a2) struct endecode_fake_struct
+#define endecode_fields_3a_struct(n,t1,x1,t2,x2,t3,x3,tn1,n1,ta1,a1) struct endecode_fake_struct
+#define endecode_fields_4aa_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,tn1,n1,ta1,a1,ta2,a2) struct endecode_fake_struct
+#define endecode_fields_1a_1a_struct(n,t1,x1,tn1,n1,ta1,a1,t2,x2,tn2,n2,ta2,a2) struct endecode_fake_struct
+#define endecode_fields_4a_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,tn1,n1,ta1,a1) struct endecode_fake_struct
+#define endecode_fields_5a_struct(n,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,tn1,n1,ta1,a1) struct endecode_fake_struct
-#define encode_enum_union_2_struct(name, ename, uname, ut1, un1, en1, ut2, un2, en2)
+#define encode_enum_union_2_struct(name, ename, uname, ut1, un1, en1, ut2, un2, en2) struct endecode_fake_struct
#endif /* __PINT_REQPROTO_ENCODE_FUNCS_C */
Index: pvfs2-mgmt.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/include/pvfs2-mgmt.h,v
diff -p -u -r1.62.4.5 -r1.62.4.6
--- pvfs2-mgmt.h 2 Jun 2010 18:50:48 -0000 1.62.4.5
+++ pvfs2-mgmt.h 19 Jun 2010 00:01:15 -0000 1.62.4.6
@@ -74,7 +74,7 @@ endecode_fields_11_struct(
int32_t, dspace_queue,
int32_t, keyval_queue,
int32_t, reqsched,
- skip4,)
+ skip4,);
/* low level information about individual server level objects */
struct PVFS_mgmt_dspace_info
@@ -93,7 +93,7 @@ endecode_fields_7_struct(
PVFS_ds_type, type,
skip4,,
PVFS_size, b_size,
- PVFS_handle, dirdata_handle)
+ PVFS_handle, dirdata_handle);
/* individual datapoint from event monitoring */
struct PVFS_mgmt_event
@@ -115,7 +115,7 @@ endecode_fields_8_struct(
int32_t, flags,
int32_t, tv_sec,
int32_t, tv_usec,
- skip4,)
+ skip4,);
/* values which may be or'd together in the flags field above */
enum
Index: pvfs2-sysint.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/include/pvfs2-sysint.h,v
diff -p -u -r1.75.8.11 -r1.75.8.12
--- pvfs2-sysint.h 2 Jun 2010 18:50:48 -0000 1.75.8.11
+++ pvfs2-sysint.h 19 Jun 2010 00:01:15 -0000 1.75.8.12
@@ -48,6 +48,7 @@ struct PVFS_sys_attr_s
PVFS_size size;
PVFS2_ALIGN_VAR(char *, link_target);/* NOTE: caller must free if valid */
PVFS2_ALIGN_VAR(int32_t, dfile_count); /* Changed to int32_t so that size of structure does not change */
+ PVFS2_ALIGN_VAR(uint32_t, mirror_copies_count);
PVFS2_ALIGN_VAR(char*, dist_name); /* NOTE: caller must free if valid */
PVFS2_ALIGN_VAR(char*, dist_params); /* NOTE: caller must free if valid */
PVFS_size dirent_count;
@@ -454,11 +455,11 @@ PVFS_error PVFS_isys_io(
PVFS_hint hints,
void *user_ptr);
-#define PVFS_isys_read(x1,x2,x3,x4,x5,x6,y,x7,x8) \
-PVFS_isys_io(x1,x2,x3,x4,x5,x6,y,PVFS_IO_READ,x7,x8)
+#define PVFS_isys_read(x1,x2,x3,x4,x5,x6,y,x7,x8,x9) \
+PVFS_isys_io(x1,x2,x3,x4,x5,x6,y,PVFS_IO_READ,x7,x8,x9)
-#define PVFS_isys_write(x1,x2,x3,x4,x5,x6,y,x7,x8) \
-PVFS_isys_io(x1,x2,x3,x4,x5,x6,y,PVFS_IO_WRITE,x7,x8)
+#define PVFS_isys_write(x1,x2,x3,x4,x5,x6,y,x7,x8,x9) \
+PVFS_isys_io(x1,x2,x3,x4,x5,x6,y,PVFS_IO_WRITE,x7,x8,x9)
PVFS_error PVFS_sys_io(
PVFS_object_ref ref,
Index: pvfs2-types.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/include/pvfs2-types.h,v
diff -p -u -r1.147.4.9 -r1.147.4.10
--- pvfs2-types.h 16 Jun 2010 20:45:31 -0000 1.147.4.9
+++ pvfs2-types.h 19 Jun 2010 00:01:15 -0000 1.147.4.10
@@ -6,7 +6,6 @@
/* NOTE: if you make any changes to the encoding definitions in this file,
* please update the PVFS2_PROTO_VERSION in pvfs2-req-proto.h accordingly
*/
-
/** \file
*
* Definitions of types used throughout PVFS2.
@@ -103,8 +102,9 @@ enum PVFS_encoding_type
{
ENCODING_DIRECT = 1,
ENCODING_LE_BFIELD = 2,
- ENCODING_XDR = 3,
+ ENCODING_XDR = 3
};
+
/* these values must correspond to the defined encoding types above */
#define ENCODING_INVALID_MIN 0
#define ENCODING_INVALID_MAX 4
@@ -290,11 +290,14 @@ typedef enum
#include <linux/fs.h>
#endif
+
+/*The value for PVFS_MIRROR_FL will not conflict with the FS values.*/
#if defined(FS_IMMUTABLE_FL)
#define PVFS_IMMUTABLE_FL FS_IMMUTABLE_FL
#define PVFS_APPEND_FL FS_APPEND_FL
#define PVFS_NOATIME_FL FS_NOATIME_FL
+#define PVFS_MIRROR_FL 0x01000000ULL
#else
@@ -302,6 +305,7 @@ typedef enum
#define PVFS_IMMUTABLE_FL 0x10ULL
#define PVFS_APPEND_FL 0x20ULL
#define PVFS_NOATIME_FL 0x80ULL
+#define PVFS_MIRROR_FL 0x01000000ULL
#endif
@@ -337,7 +341,8 @@ typedef struct
#define PVFS_ATTR_SYS_DIRENT_COUNT (1 << 26)
#define PVFS_ATTR_SYS_DIR_HINT (1 << 27)
#define PVFS_ATTR_SYS_BLKSIZE (1 << 28)
-#define PVFS_ATTR_SYS_CAPABILITY (1 << 29)
+#define PVFS_ATTR_SYS_MIRROR_COPIES_COUNT (1 << 29)
+#define PVFS_ATTR_SYS_CAPABILITY (1 << 30)
#define PVFS_ATTR_SYS_UID (1 << 0)
#define PVFS_ATTR_SYS_GID (1 << 1)
#define PVFS_ATTR_SYS_PERM (1 << 2)
@@ -356,25 +361,23 @@ typedef struct
#define PVFS_ATTR_SYS_ALL \
(PVFS_ATTR_SYS_COMMON_ALL | PVFS_ATTR_SYS_SIZE | \
PVFS_ATTR_SYS_LNK_TARGET | PVFS_ATTR_SYS_DFILE_COUNT | \
+ PVFS_ATTR_SYS_MIRROR_COPIES_COUNT | \
PVFS_ATTR_SYS_DIRENT_COUNT | PVFS_ATTR_SYS_DIR_HINT | PVFS_ATTR_SYS_BLKSIZE)
#define PVFS_ATTR_SYS_ALL_NOHINT \
(PVFS_ATTR_SYS_COMMON_ALL | PVFS_ATTR_SYS_SIZE | \
PVFS_ATTR_SYS_LNK_TARGET | PVFS_ATTR_SYS_DFILE_COUNT | \
+ PVFS_ATTR_SYS_MIRROR_COPIES_COUNT | \
PVFS_ATTR_SYS_DIRENT_COUNT | PVFS_ATTR_SYS_BLKSIZE)
#define PVFS_ATTR_SYS_ALL_NOSIZE \
(PVFS_ATTR_SYS_COMMON_ALL | PVFS_ATTR_SYS_LNK_TARGET | \
- PVFS_ATTR_SYS_DFILE_COUNT | PVFS_ATTR_SYS_DIRENT_COUNT \
- | PVFS_ATTR_SYS_DIR_HINT | PVFS_ATTR_SYS_BLKSIZE)
+ PVFS_ATTR_SYS_DFILE_COUNT | PVFS_ATTR_SYS_DIRENT_COUNT | \
+ PVFS_ATTR_SYS_MIRROR_COPIES_COUNT | \
+ PVFS_ATTR_SYS_DIR_HINT | PVFS_ATTR_SYS_BLKSIZE)
#define PVFS_ATTR_SYS_ALL_SETABLE \
(PVFS_ATTR_SYS_COMMON_ALL-PVFS_ATTR_SYS_TYPE)
#define PVFS_ATTR_SYS_ALL_TIMES \
((PVFS_ATTR_SYS_COMMON_ALL-PVFS_ATTR_SYS_TYPE) | PVFS_ATTR_SYS_ATIME_SET | PVFS_ATTR_SYS_MTIME_SET)
-
-/* Extended attribute flags */
-#define PVFS_XATTR_CREATE 0x1
-#define PVFS_XATTR_REPLACE 0x2
-
/* Extended attribute flags */
#define PVFS_XATTR_CREATE 0x1
#define PVFS_XATTR_REPLACE 0x2
@@ -435,7 +438,7 @@ typedef struct
by <linux/xattr.h> */
#define PVFS_MAX_XATTR_VALUELEN 8192 /* Not the same as XATTR_SIZE_MAX defined
by <linux/xattr.h> */
-#define PVFS_MAX_XATTR_LISTLEN 8 /* Not the same as XATTR_LIST_MAX
+#define PVFS_MAX_XATTR_LISTLEN 8 /* Not the same as XATTR_LIST_MAX
defined by <linux/xattr.h> */
/* This structure is used by the VFS-client interaction alone */
@@ -489,11 +492,12 @@ struct PVFS_mgmt_setparam_value
char *string_value;
} u;
};
+
encode_enum_union_2_struct(
PVFS_mgmt_setparam_value,
type, u,
uint64_t, value, PVFS_MGMT_PARAM_TYPE_UINT64,
- string, string_value, PVFS_MGMT_PARAM_TYPE_STRING)
+ string, string_value, PVFS_MGMT_PARAM_TYPE_STRING);
enum PVFS_server_mode
{
@@ -858,6 +862,40 @@ enum PVFS_io_type
* reserved handle values
*/
#define PVFS_MGMT_RESERVED 1
+
+/*
+ * Structure and macros for timing things for profile-like output.
+ *
+ */
+struct profiler
+{
+ struct timeval start;
+ struct timeval finish;
+ uint64_t save_timing;
+};
+
+#define INIT_PROFILER(prof_struct) prof_struct.cumulative_diff = 0;
+
+#define START_PROFILER(prof_struct) \
+ gettimeofday(&prof_struct.start, NULL);
+
+#define FINISH_PROFILER(label, prof_struct, print_timing) \
+{ \
+ double t_start, t_finish; \
+ gettimeofday(&prof_struct.finish, NULL); \
+ t_start = prof_struct.start.tv_sec + (prof_struct.start.tv_usec/1000000.0); \
+ t_finish = prof_struct.finish.tv_sec + (prof_struct.finish.tv_usec/1000000.0); \
+ prof_struct.save_timing = t_finish - t_start * 1000000.0; \
+ if (print_timing) { \
+ gossip_err("PROFILING %s: %f\n", label, t_finish - t_start); \
+ } \
+}
+
+#define PRINT_PROFILER(label, prof_struct) \
+ gossip_err("PROFILING %s: %f\n", label, prof_struct.save_timing / 1000000.0);
+
+
+
/*
* New types for robust security implementation.
--- pvfs2.h 2010-06-18 20:01:15.000000000 -0400
+++ /dev/null 2004-06-24 14:04:38.000000000 -0400
@@ -1,30 +0,0 @@
-/*
- * (C) 2001 Clemson University and The University of Chicago
- *
- * See COPYING in top-level directory.
- */
-
-/* This is the master header file for pvfs2. It pulls in all header
- * files needed by client side for software that operates at or above
- * the system interface level.
- */
-
-#ifndef __PVFS2_H
-#define __PVFS2_H
-
-#include "pvfs2-types.h"
-#include "pvfs2-sysint.h"
-#include "pvfs2-debug.h"
-#include "pvfs2-util.h"
-#include "pvfs2-request.h"
-
-#endif /* __PVFS2_H */
-
-/*
- * Local variables:
- * c-indent-level: 4
- * c-basic-offset: 4
- * End:
- *
- * vim: ts=8 sts=4 sw=4 expandtab
- */
More information about the Pvfs2-cvs
mailing list