[Pvfs2-cvs] commit by slang in pvfs2/src/common/misc: state-machine-fns.h digest.c mkspace.c pint-util.c pvfs2-debug.c pvfs2-internal.h pvfs2-util.c server-config.c server-config.h str-utils.c str-utils.h xattr-utils.c xattr-utils.h

CVS commit program cvs at parl.clemson.edu
Thu Oct 19 18:16:53 EDT 2006


Update of /projects/cvsroot/pvfs2/src/common/misc
In directory parlweb1:/tmp/cvs-serv5758/src/common/misc

Modified Files:
      Tag: WALT3
	digest.c mkspace.c pint-util.c pvfs2-debug.c pvfs2-internal.h 
	pvfs2-util.c server-config.c server-config.h str-utils.c 
	str-utils.h xattr-utils.c xattr-utils.h 
Added Files:
      Tag: WALT3
	state-machine-fns.h 
Log Message:
reverse merge of HEAD to WALT3 branch.



Index: digest.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/digest.c,v
diff -p -u -r1.4.2.1 -r1.4.2.2
--- digest.c	18 Sep 2006 15:05:08 -0000	1.4.2.1
+++ digest.c	19 Oct 2006 22:16:52 -0000	1.4.2.2
@@ -8,6 +8,7 @@
 
 #ifdef WITH_OPENSSL
 
+
 #ifdef HAVE_OPENSSL_EVP_H
 #include <openssl/evp.h>
 #endif
@@ -20,8 +21,10 @@
 #ifdef __GEN_POSIX_LOCKING__
 #include <pthread.h>
 #include <linux/unistd.h>
+#include <sys/types.h>
+#include <sys/syscall.h>
+#include <unistd.h>
 
-static _syscall0(pid_t,gettid)
 
 static gen_mutex_t *mutex = NULL;
 static pthread_once_t once_initialize = PTHREAD_ONCE_INIT;
@@ -40,11 +43,14 @@ static void do_lock(int mode, int n, con
 
 static unsigned long get_tid(void)
 {
-	/* NOTE:
-	 * This could fail on non 2.6 kernels, since gettid()
-	 * probably does not exist?
-	 */
-	return gettid();
+	 /* If gettid syscall does not exist, fall back to getpid, which I
+	  * think will do something similar to gettid on non-ntpl
+	  * implementations */
+#if defined(__NR_gettid)
+	return syscall(__NR_gettid);
+#else
+	return getpid();
+#endif
 }
 
 static void callback_init(void)

Index: mkspace.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/mkspace.c,v
diff -p -u -r1.38.2.1 -r1.38.2.2
--- mkspace.c	18 Sep 2006 15:05:08 -0000	1.38.2.1
+++ mkspace.c	19 Oct 2006 22:16:52 -0000	1.38.2.2
@@ -25,8 +25,6 @@
 #include "pvfs2-internal.h"
 #include "pint-util.h"
 
-static char *dir_ent_string = DIRECTORY_ENTRY_KEYSTR;
-static char *root_handle_string = ROOT_HANDLE_KEYSTR;
 static char *lost_and_found_string = "lost+found";
 
 static TROVE_handle s_used_handles[4] =
@@ -129,7 +127,6 @@ int pvfs2_mkspace(
     TROVE_handle_extent cur_extent;
     TROVE_handle_extent_array extent_array;
     TROVE_context_id trove_context = -1;
-    char *method_name = NULL;
     char *merged_handle_ranges = NULL;
     TROVE_handle new_root_handle = TROVE_HANDLE_NULL;
     TROVE_handle root_dirdata_handle = TROVE_HANDLE_NULL;
@@ -159,7 +156,10 @@ int pvfs2_mkspace(
           try to initialize; fails if storage space isn't there, which
           is exactly what we're expecting in this case.
         */
-        ret = trove_initialize(storage_space, 0, &method_name, 0);
+        ret = trove_initialize(TROVE_METHOD_DBPF, 
+			       NULL, 
+			       storage_space, 
+			       0);
         if (ret > -1)
         {
             gossip_err("error: storage space %s already "
@@ -167,7 +167,7 @@ int pvfs2_mkspace(
             return -1;
         }
 
-        ret = trove_storage_create(storage_space, NULL, &op_id);
+        ret = trove_storage_create(TROVE_METHOD_DBPF, storage_space, NULL, &op_id);
         if (ret != 1)
         {
             gossip_err("error: storage create failed; aborting!\n");
@@ -176,7 +176,9 @@ int pvfs2_mkspace(
     }
 
     /* now that the storage space exists, initialize trove properly */
-    ret = trove_initialize(storage_space, 0, &method_name, 0);
+    ret = trove_initialize(
+	TROVE_METHOD_DBPF, NULL, 
+	storage_space, 0);
     if (ret < 0)
     {
 	gossip_err("error: trove initialize failed; aborting!\n");
@@ -187,12 +189,13 @@ int pvfs2_mkspace(
                   storage_space);
 
     /* try to look up collection used to store file system */
-    ret = trove_collection_lookup(collection, &coll_id, NULL, &op_id);
+    ret = trove_collection_lookup(
+	TROVE_METHOD_DBPF, collection, &coll_id, NULL, &op_id);
     if (ret == 1)
     {
 	mkspace_print(verbose, "warning: collection lookup succeeded "
                       "before it should; aborting!\n");
-	trove_finalize();
+	trove_finalize(TROVE_METHOD_DBPF);
 	return -1;
     }
 
@@ -206,7 +209,8 @@ int pvfs2_mkspace(
     }
 
     /* make sure a collection lookup succeeds */
-    ret = trove_collection_lookup(collection, &coll_id, NULL, &op_id);
+    ret = trove_collection_lookup(
+	TROVE_METHOD_DBPF, collection, &coll_id, NULL, &op_id);
     if (ret != 1)
     {
 	mkspace_print(verbose,"error: collection lookup failed for "
@@ -303,8 +307,8 @@ int pvfs2_mkspace(
         s_used_handles[0] = new_root_handle;
 
         /* set collection attribute for root handle */
-        key.buffer = root_handle_string;
-        key.buffer_sz = strlen(root_handle_string) + 1;
+        key.buffer = ROOT_HANDLE_KEYSTR;
+        key.buffer_sz = ROOT_HANDLE_KEYLEN;
         val.buffer = &new_root_handle;
         val.buffer_sz = sizeof(new_root_handle);
         ret = trove_collection_seteattr(coll_id, &key, &val, 0,
@@ -405,8 +409,8 @@ int pvfs2_mkspace(
                       "with handle %llu\n", llu(root_dirdata_handle));
         s_used_handles[1] = root_dirdata_handle;
 
-        key.buffer = dir_ent_string;
-        key.buffer_sz = strlen(dir_ent_string) + 1;
+        key.buffer = DIRECTORY_ENTRY_KEYSTR;
+        key.buffer_sz = DIRECTORY_ENTRY_KEYLEN;
         val.buffer = &root_dirdata_handle;
         val.buffer_sz = sizeof(TROVE_handle);
 
@@ -556,8 +560,8 @@ int pvfs2_mkspace(
             "with handle %llu\n", llu(lost_and_found_dirdata_handle));
         s_used_handles[3] = lost_and_found_dirdata_handle;
 
-        key.buffer = dir_ent_string;
-        key.buffer_sz = strlen(dir_ent_string) + 1;
+        key.buffer = DIRECTORY_ENTRY_KEYSTR;
+        key.buffer_sz = DIRECTORY_ENTRY_KEYLEN;
         val.buffer = &lost_and_found_dirdata_handle;
         val.buffer_sz = sizeof(TROVE_handle);
 
@@ -621,12 +625,12 @@ int pvfs2_mkspace(
     {
         trove_close_context(coll_id, trove_context);
     }
-    trove_finalize();
+    trove_finalize(TROVE_METHOD_DBPF);
 
     mkspace_print(verbose, "collection created:\n"
                   "\troot handle = %llu, coll id = %d, "
                   "root string = \"%s\"\n",
-                  llu(root_handle), coll_id, root_handle_string);
+                  llu(root_handle), coll_id, ROOT_HANDLE_KEYSTR);
     return 0;
 }
 
@@ -638,14 +642,15 @@ int pvfs2_rmspace(
     int verbose)
 {
     int ret = -1;
-    char *method_name = NULL;
     TROVE_op_id op_id;
     static int trove_is_initialized = 0;
 
     /* try to initialize; fails if storage space isn't there */
     if (!trove_is_initialized)
     {
-        ret = trove_initialize(storage_space, 0, &method_name, 0);
+        ret = trove_initialize(
+	    TROVE_METHOD_DBPF, NULL,
+	    storage_space, 0);
         if (ret == -1)
         {
             gossip_err("error: storage space %s does not "
@@ -658,7 +663,8 @@ int pvfs2_rmspace(
     mkspace_print(verbose, "Attempting to remove collection %s\n",
                   collection);
 
-    ret = trove_collection_remove(collection, NULL, &op_id);
+    ret = trove_collection_remove(
+	TROVE_METHOD_DBPF, collection, NULL, &op_id);
     mkspace_print(
         verbose, "PVFS2 Collection %s removed %s\n", collection,
         (((ret == 1) || (ret == -TROVE_ENOENT)) ? "successfully" :
@@ -666,13 +672,14 @@ int pvfs2_rmspace(
 
     if (!remove_collection_only)
     {
-		  /*
-		  * it is a bit weird to do a trove_finaliz() prior to blowing away
-		  * the storage space, but this allows the __db files of the DB env
-		  * to be blown away for the rmdir() to work correctly!
-		  */
-		  trove_finalize();
-        ret = trove_storage_remove(storage_space, NULL, &op_id);
+        ret = trove_storage_remove(
+	    TROVE_METHOD_DBPF, storage_space, NULL, &op_id);
+	/*
+	 * it is a bit weird to do a trove_finaliz() prior to blowing away
+	 * the storage space, but this allows the __db files of the DB env
+	 * to be blown away for the rmdir() to work correctly!
+	 */
+	trove_finalize(TROVE_METHOD_DBPF);
         mkspace_print(
             verbose, "PVFS2 Storage Space %s removed %s\n",
             storage_space, (((ret == 1) || (ret == -TROVE_ENOENT)) ?
@@ -682,3 +689,4 @@ int pvfs2_rmspace(
     }
     return ret;
 }
+

Index: pint-util.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/pint-util.c,v
diff -p -u -r1.10.2.1 -r1.10.2.2
--- pint-util.c	18 Sep 2006 15:05:09 -0000	1.10.2.1
+++ pint-util.c	19 Oct 2006 22:16:52 -0000	1.10.2.2
@@ -230,6 +230,7 @@ int PINT_copy_object_attr(PVFS_object_at
                 }
                 dest->u.meta.dist_size = src->u.meta.dist_size;
             }
+            memcpy(&dest->u.meta.hint, &src->u.meta.hint, sizeof(dest->u.meta.hint));
         }
 
         if (src->mask & PVFS_ATTR_SYMLNK_TARGET)

Index: pvfs2-debug.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/pvfs2-debug.c,v
diff -p -u -r1.40.4.1 -r1.40.4.2
--- pvfs2-debug.c	18 Sep 2006 15:05:09 -0000	1.40.4.1
+++ pvfs2-debug.c	19 Oct 2006 22:16:52 -0000	1.40.4.2
@@ -18,23 +18,7 @@ typedef struct 
     uint64_t mask_val;
 } __keyword_mask_t;
 
-#define __DEBUG_ALL                                               \
-(GOSSIP_TROVE_DEBUG | GOSSIP_BMI_DEBUG_ALL | GOSSIP_SERVER_DEBUG |\
-GOSSIP_CLIENT_DEBUG | GOSSIP_JOB_DEBUG | GOSSIP_REQUEST_DEBUG |   \
-GOSSIP_REQ_SCHED_DEBUG | GOSSIP_FLOW_PROTO_DEBUG |                \
-GOSSIP_FLOW_DEBUG | GOSSIP_NCACHE_DEBUG | GOSSIP_ACACHE_DEBUG |   \
-GOSSIP_DIST_DEBUG | GOSSIP_DBPF_ATTRCACHE_DEBUG |                 \
-GOSSIP_MMAP_RCACHE_DEBUG | GOSSIP_LOOKUP_DEBUG |                  \
-GOSSIP_REMOVE_DEBUG | GOSSIP_GETATTR_DEBUG | GOSSIP_READDIR_DEBUG|\
-GOSSIP_IO_DEBUG | GOSSIP_DBPF_OPEN_CACHE_DEBUG |                  \
-GOSSIP_PERMISSIONS_DEBUG | GOSSIP_CANCEL_DEBUG |                  \
-GOSSIP_MSGPAIR_DEBUG | GOSSIP_CLIENTCORE_DEBUG |                  \
-GOSSIP_SETATTR_DEBUG | GOSSIP_MKDIR_DEBUG |                       \
-GOSSIP_SETEATTR_DEBUG | GOSSIP_GETEATTR_DEBUG |                   \
-GOSSIP_LISTEATTR_DEBUG | GOSSIP_LISTATTR_DEBUG |                  \
-GOSSIP_DBPF_KEYVAL_DEBUG |                                        \
-GOSSIP_ACCESS_DEBUG | GOSSIP_ACCESS_DETAIL_DEBUG |                \
-GOSSIP_PERFCOUNTER_DEBUG)
+#define __DEBUG_ALL ((uint64_t) -1)
 
 /* map all config keywords to pvfs2 debug masks here */
 static __keyword_mask_t s_keyword_mask_map[] =
@@ -118,8 +102,14 @@ static __keyword_mask_t s_keyword_mask_m
     { "keyval", GOSSIP_DBPF_KEYVAL_DEBUG },
     /* Debug the metadata sync coalescing code */
     { "coalesce", GOSSIP_DBPF_COALESCE_DEBUG },
-    /* Everything except the perf counter.  Useful for debugging */
-    { "verbose",  (__DEBUG_ALL & ~GOSSIP_PERFCOUNTER_DEBUG)},
+    /* Display the  hostnames instead of IP addrs in debug output */
+    { "access_hostnames", GOSSIP_ACCESS_HOSTNAMES },
+    /* Show the client device events */
+    { "dev", GOSSIP_DEV_DEBUG },
+    /* Everything except the periodic events.  Useful for debugging */
+    { "verbose",
+      (__DEBUG_ALL & ~(GOSSIP_PERFCOUNTER_DEBUG | GOSSIP_STATE_MACHINE_DEBUG))
+    },
     /* No debug output */
     { "none", GOSSIP_NO_DEBUG },
     /* Everything */

Index: pvfs2-internal.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/pvfs2-internal.h,v
diff -p -u -r1.2.6.1 -r1.2.6.2
--- pvfs2-internal.h	18 Sep 2006 15:05:09 -0000	1.2.6.1
+++ pvfs2-internal.h	19 Oct 2006 22:16:52 -0000	1.2.6.2
@@ -40,11 +40,32 @@
 /* key string definition macros.  These are used by the server and
  * by the client (in the case of xattrs with viewdist, etc).
  */
-#define ROOT_HANDLE_KEYSTR      "rh"
-#define DIRECTORY_ENTRY_KEYSTR  "de"
-#define DATAFILE_HANDLES_KEYSTR "dh"
-#define METAFILE_DIST_KEYSTR    "md"
-#define SYMLINK_TARGET_KEYSTR   "st"
+#define ROOT_HANDLE_KEYSTR      "rh\0"
+#define ROOT_HANDLE_KEYLEN      3
+
+#define DIRECTORY_ENTRY_KEYSTR  "de\0"
+#define DIRECTORY_ENTRY_KEYLEN  3
+
+#define DATAFILE_HANDLES_KEYSTR "dh\0"
+#define DATAFILE_HANDLES_KEYLEN 3
+
+#define METAFILE_DIST_KEYSTR    "md\0"
+#define METAFILE_DIST_KEYLEN    3
+
+#define SYMLINK_TARGET_KEYSTR   "st\0"
+#define SYMLINK_TARGET_KEYLEN   3
+
+/* Optional xattrs have "user.pvfs2." as a prefix */
+#define SPECIAL_DIST_NAME_KEYSTR        "dist_name\0"
+#define SPECIAL_DIST_NAME_KEYLEN         21
+#define SPECIAL_DIST_PARAMS_KEYSTR      "dist_params\0"
+#define SPECIAL_DIST_PARAMS_KEYLEN       23
+#define SPECIAL_NUM_DFILES_KEYSTR       "num_dfiles\0"
+#define SPECIAL_NUM_DFILES_KEYLEN        22
+#define SPECIAL_METAFILE_HINT_KEYSTR    "meta_hint\0"
+#define SPECIAL_METAFILE_HINT_KEYLEN    21
+
+#define IO_MAX_REGIONS 64
 
 #define IO_MAX_REGIONS 64
 

Index: pvfs2-util.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/pvfs2-util.c,v
diff -p -u -r1.90.2.1 -r1.90.2.2
--- pvfs2-util.c	18 Sep 2006 15:05:09 -0000	1.90.2.1
+++ pvfs2-util.c	19 Oct 2006 22:16:53 -0000	1.90.2.2
@@ -124,13 +124,13 @@ int PVFS_util_get_umask(void)
 }
 
 PVFS_credentials *PVFS_util_dup_credentials(
-    PVFS_credentials *credentials)
+    const PVFS_credentials *credentials)
 {
     PVFS_credentials *ret = NULL;
 
     if (credentials)
     {
-        ret = (PVFS_credentials *)malloc(sizeof(PVFS_credentials));
+        ret = malloc(sizeof(PVFS_credentials));
         if (ret)
         {
             memcpy(ret, credentials, sizeof(PVFS_credentials));
@@ -164,6 +164,12 @@ int PVFS_util_copy_sys_attr(
         dest_attr->dfile_count = src_attr->dfile_count;
         dest_attr->objtype = src_attr->objtype;
         dest_attr->mask = src_attr->mask;
+        dest_attr->flags = src_attr->flags;
+
+        if (src_attr->mask & PVFS_ATTR_SYS_SIZE)
+        {
+            dest_attr->size = src_attr->size;
+        }
 
         if (src_attr->mask & PVFS_ATTR_SYS_SIZE)
         {

Index: server-config.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/server-config.c,v
diff -p -u -r1.83.2.1 -r1.83.2.2
--- server-config.c	18 Sep 2006 15:05:09 -0000	1.83.2.1
+++ server-config.c	19 Oct 2006 22:16:53 -0000	1.83.2.2
@@ -18,6 +18,7 @@
 #include "server-config.h"
 #include "pvfs2.h"
 #include "job.h"
+#include "trove.h"
 #include "gossip.h"
 #include "extent-utils.h"
 #include "mkspace.h"
@@ -105,6 +106,7 @@ static DOTCONF_CB(get_client_retry_delay
 static DOTCONF_CB(get_secret_key);
 static DOTCONF_CB(get_coalescing_high_watermark);
 static DOTCONF_CB(get_coalescing_low_watermark);
+static DOTCONF_CB(get_trove_method);
 
 static FUNC_ERRORHANDLER(errorhandler);
 const char *contextchecker(command_t *cmd, unsigned long mask);
@@ -680,8 +682,9 @@ static const configoption_t options[] =
          get_handle_recycle_timeout_seconds, NULL, 
          CTX_STORAGEHINTS,"360"},
     
-    /* The TROVE layer has an attribute caching component that handles
-     * caching of stored attributes.  This is used to improve the performance of
+    /* The TROVE layer (server side storage layer) 
+     * has an attribute caching component that 
+     * caches stored attributes.  This is used to improve the performance of
      * metadata accesses.  The AttrCacheKeywords option is a list of the
      * object types that should get cached in the attribute cache.  
      * The possible values for this option are:
@@ -760,10 +763,12 @@ static const configoption_t options[] =
     /* Specifies the format of the date/timestamp that events will have
      * in the event log.  Possible values are:
      *
-     * usec: [%H:%M:%S
+     * usec: [%H:%M:%S.%U]
      *
      * datetime: [%m/%d %H:%M]
      *
+     * thread: [%H:%M:%S.%U (%lu)]
+     *
      * none
      *
      * The format of the option is one of the above values.  For example,
@@ -802,6 +807,12 @@ static const configoption_t options[] =
     {"CoalescingLowWatermark", ARG_INT, get_coalescing_low_watermark, NULL,
         CTX_STORAGEHINTS, "1"},
 
+    /* This option specifies the method used for trove.  Currently the
+     * dbpf method is the default.  Other methods include 'alt-aio'.
+     */
+    {"TroveMethod", ARG_STR, get_trove_method, NULL, 
+        CTX_DEFAULTS|CTX_GLOBAL|CTX_STORAGEHINTS, "dbpf"},
+
     /* Specifies the file system's key for use in HMAC-based digests of
      * client operations.
      */
@@ -989,6 +1000,10 @@ DOTCONF_CB(get_logstamp)
     {
         config_s->logstamp_type = GOSSIP_LOGSTAMP_DATETIME;
     }
+    else if(!strcmp(cmd->data.str, "thread"))
+    {
+        config_s->logstamp_type = GOSSIP_LOGSTAMP_THREAD;
+    }
     else
     {
         return("LogStamp tag (if specified) must have one of the following values: none, usec, or datetime.\n");
@@ -2386,6 +2401,40 @@ DOTCONF_CB(get_coalescing_low_watermark)
     fs_conf->coalescing_low_watermark = cmd->data.value;
     return NULL;
 }
+
+DOTCONF_CB(get_trove_method)
+{
+    int * method;
+    struct server_configuration_s *config_s =
+        (struct server_configuration_s *)cmd->context;
+
+    method = &config_s->trove_method;
+    if(config_s->configuration_context == CTX_STORAGEHINTS)
+    {
+        /* we must be in a storagehints inside a filesystem context */
+        struct filesystem_configuration_s *fs_conf =
+            (struct filesystem_configuration_s *)
+            PINT_llist_head(config_s->file_systems);
+
+        method = &fs_conf->trove_method; 
+    }
+
+    if(!strcmp(cmd->data.str, "dbpf"))
+    {
+        *method = TROVE_METHOD_DBPF;
+    }
+    else if(!strcmp(cmd->data.str, "alt-aio"))
+    {
+        *method = TROVE_METHOD_DBPF_ALTAIO;
+    }
+    else
+    {
+        return "Error unknown TroveMethod option\n";
+    }
+    return NULL;
+}
+
+
 
 /*
  * Function: PINT_config_release

Index: server-config.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/server-config.h,v
diff -p -u -r1.50.4.1 -r1.50.4.2
--- server-config.h	18 Sep 2006 15:05:09 -0000	1.50.4.1
+++ server-config.h	19 Oct 2006 22:16:53 -0000	1.50.4.2
@@ -91,6 +91,8 @@ typedef struct filesystem_configuration_
     int fp_buffer_size;
     int fp_buffers_per_flow;
 
+    int trove_method;
+
     /* Export flags bitwise OR of flags specified */
     int exp_flags;
 
@@ -181,6 +183,8 @@ typedef struct server_configuration_s
     int trove_max_concurrent_io;    /* allow the number of aio operations to
                                      * be configurable.
                                      */
+    int trove_method;
+
 } server_configuration_s;
 
 int PINT_parse_config(

Index: str-utils.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/str-utils.c,v
diff -p -u -r1.18 -r1.18.2.1
--- str-utils.c	16 Jun 2006 21:01:12 -0000	1.18
+++ str-utils.c	19 Oct 2006 22:16:53 -0000	1.18.2.1
@@ -459,12 +459,12 @@ void PINT_free_string_list(char ** list,
  *
  */
 int PINT_remove_base_dir(
-    char *pathname,
+    const char *pathname,
     char *out_dir,
     int out_max_len)
 {
     int ret = -1, len = 0;
-    char *start, *end, *end_ref;
+    const char *start, *end, *end_ref;
 
     if (pathname && out_dir && out_max_len)
     {
@@ -474,7 +474,7 @@ int PINT_remove_base_dir(
         }
 
         start = pathname;
-        end = (char *) (pathname + strlen(pathname));
+        end = pathname + strlen(pathname);
         end_ref = end;
 
         while (end && (end > start) && (*(--end) != '/'));

Index: str-utils.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/str-utils.h,v
diff -p -u -r1.16 -r1.16.2.1
--- str-utils.h	16 Jun 2006 21:01:13 -0000	1.16
+++ str-utils.h	19 Oct 2006 22:16:53 -0000	1.16.2.1
@@ -40,7 +40,7 @@ void PINT_free_string_list(
     char ** list, 
     int len);
 int PINT_remove_base_dir(
-    char *pathname,
+    const char *pathname,
     char *out_dir,
     int out_max_len);
 int PINT_remove_dir_prefix(

Index: xattr-utils.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/xattr-utils.c,v
diff -p -u -r1.2 -r1.2.18.1
--- xattr-utils.c	23 Feb 2006 23:29:25 -0000	1.2
+++ xattr-utils.c	19 Oct 2006 22:16:53 -0000	1.2.18.1
@@ -13,7 +13,11 @@
 #include "xattr-utils.h"
 
 #ifndef HAVE_FGETXATTR
+#ifndef HAVE_FGETXATTR_EXTRA_ARGS
 ssize_t fgetxattr(int filedes, const char *name, void *value, size_t size)
+#else
+ssize_t fgetxattr(int filedes, const char *name, void *value, size_t size, int pos, int opts )
+#endif
 {
     errno = ENOSYS;
     return -1;

Index: xattr-utils.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/xattr-utils.h,v
diff -p -u -r1.2 -r1.2.14.1
--- xattr-utils.h	7 Mar 2006 21:35:08 -0000	1.2
+++ xattr-utils.h	19 Oct 2006 22:16:53 -0000	1.2.14.1
@@ -10,8 +10,12 @@
 #include "pvfs2-config.h"
 
 #ifndef HAVE_FGETXATTR_PROTOTYPE
+#ifndef HAVE_FGETXATTR_EXTRA_ARGS
 /* prototype taken from fgetxattr(2) on Fedora FC4 */
 ssize_t fgetxattr(int filedes, const char *name, void *value, size_t size);
+#else
+ssize_t fgetxattr(int filedes, const char *name, void *value, size_t size, int pos, int opts);
+#endif
 #endif
 
 #endif



More information about the Pvfs2-cvs mailing list