[Pvfs2-cvs] commit by walt in pvfs2-1/src/io/trove/trove-dbpf: dbpf-dspace.c

CVS commit program cvs at parl.clemson.edu
Thu Jul 9 12:40:51 EDT 2009


Update of /projects/cvsroot/pvfs2-1/src/io/trove/trove-dbpf
In directory parlweb1:/tmp/cvs-serv7536/src/io/trove/trove-dbpf

Modified Files:
      Tag: Orange-Merge1
	dbpf-dspace.c 
Log Message:
Merged changes in Blue branch into Orange branch


Index: dbpf-dspace.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/io/trove/trove-dbpf/dbpf-dspace.c,v
diff -p -u -r1.163 -r1.163.22.1
--- dbpf-dspace.c	30 Jan 2009 15:41:08 -0000	1.163
+++ dbpf-dspace.c	9 Jul 2009 16:40:50 -0000	1.163.22.1
@@ -886,9 +886,10 @@ static int dbpf_dspace_iterate_handles_o
             if(sizeof_handle != sizeof(TROVE_handle) ||
                sizeof_attr != sizeof(attr))
             {
-                /* something is wrong with the result */
-                ret = -TROVE_EINVAL;
-                goto return_error;
+                gossip_err("Warning: got invalid handle or key size in dbpf_dspace_iterate_handles().\n");
+                gossip_err("Warning: skipping entry.\n");
+                i--;
+                continue;
             }
 
             op_p->u.d_iterate_handles.handle_array[i] =
@@ -904,22 +905,26 @@ static int dbpf_dspace_iterate_handles_o
          * the position to the next handle after the last one we
          * return
          */
-        DB_MULTIPLE_KEY_NEXT(tmp_ptr, &data,
-                             tmp_handle, sizeof_handle,
-                             tmp_attr, sizeof_attr);
-        if(!tmp_ptr)
+        sizeof_handle = sizeof(TROVE_handle);
+        sizeof_attr = sizeof(attr);
+        do
         {
-            goto get_next;
-        }
-
-        /* verify sizes are correct */
-        if(sizeof_handle != sizeof(TROVE_handle) ||
-           sizeof_attr != sizeof(attr))
-        {
-            /* something is wrong with the result */
-            ret = -TROVE_EINVAL;
-            goto return_error;
-        }
+            /* verify sizes are correct */
+            if(sizeof_handle != sizeof(TROVE_handle) ||
+               sizeof_attr != sizeof(attr))
+            {
+                gossip_err("Warning: got invalid handle or key size in dbpf_dspace_iterate_handles().\n");
+                gossip_err("Warning: skipping entry.\n");
+            }
+            DB_MULTIPLE_KEY_NEXT(tmp_ptr, &data,
+                                 tmp_handle, sizeof_handle,
+                                 tmp_attr, sizeof_attr);
+            if(!tmp_ptr)
+            {
+                goto get_next;
+            }
+        } while (sizeof_handle != sizeof(TROVE_handle) ||
+           sizeof_attr != sizeof(attr));
 
         *op_p->u.d_iterate_handles.position_p = *(TROVE_handle *)tmp_handle;
         goto return_ok;



More information about the Pvfs2-cvs mailing list