[PVFS2-CVS] commit by neill in pvfs2/test/client/sysint: client.c create-with-dist.c create.c dmkdir.c find.c flush-1.c flush-2.c get-info.c getparent.c io-bug.c io-test-offset.c io-test.c lookup.c ls.c mkdir.c readdir.c remove.c rename.c set-info.c symlink.c test-create-scale.c truncate.c

CVS commit program cvs at parl.clemson.edu
Thu May 20 14:27:53 EDT 2004


Update of /projects/cvsroot/pvfs2/test/client/sysint
In directory parlweb:/tmp/cvs-serv11755/test/client/sysint

Modified Files:
	client.c create-with-dist.c create.c dmkdir.c find.c flush-1.c 
	flush-2.c get-info.c getparent.c io-bug.c io-test-offset.c 
	io-test.c lookup.c ls.c mkdir.c readdir.c remove.c rename.c 
	set-info.c symlink.c test-create-scale.c truncate.c 
Log Message:
- implement non-blocking operations for all sysint and mgmt operations
- refactor blocking operations in terms of non-blocking operations
- change all sysint credential arguments to credential references
- memory leaks, bug fixes, cleanups

NOTE: this is a non-blocking first draft, updates are sure to come


Index: client.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/client.c,v
diff -p -u -r1.45 -r1.46
--- client.c	25 Mar 2004 04:23:39 -0000	1.45
+++ client.c	20 May 2004 17:27:53 -0000	1.46
@@ -72,7 +72,7 @@ int main(
 
     /* lookup the root handle */
     printf("looking up the root handle for fsid = %d\n", fs_id);
-    ret = PVFS_sys_lookup(fs_id, name, credentials,
+    ret = PVFS_sys_lookup(fs_id, name, &credentials,
 			  &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
     if (ret < 0)
     {
@@ -122,7 +122,7 @@ int main(
 
     // call create 
     ret = PVFS_sys_create(entry_name, parent_refn, attr,
-			  credentials, NULL, resp_create);
+			  &credentials, NULL, resp_create);
     if (ret < 0)
     {
 	printf("create failed with errcode = %d\n", ret);
@@ -202,7 +202,7 @@ int main(
     name[0] = '/';
     memcpy(name + 1, filename, strlen(filename) + 1);
 
-    ret = PVFS_sys_lookup(fs_id, name, credentials,
+    ret = PVFS_sys_lookup(fs_id, name, &credentials,
 			  resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
     if (ret < 0)
     {
@@ -479,7 +479,7 @@ int main(
 
     // call readdir 
     ret = PVFS_sys_readdir(pinode_refn, token, pvfs_dirent_incount,
-			   credentials, resp_readdir);
+			   &credentials, resp_readdir);
     if (ret < 0)
     {
 	printf("readdir failed with errcode = %d\n", ret);

Index: create-with-dist.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/create-with-dist.c,v
diff -p -u -r1.1 -r1.2
--- create-with-dist.c	17 May 2004 15:58:11 -0000	1.1
+++ create-with-dist.c	20 May 2004 17:27:53 -0000	1.2
@@ -24,7 +24,7 @@ int main(int argc, char **argv)
     PVFS_object_ref parent_refn;
     PVFS_sys_attr attr;
     PVFS_credentials credentials;
-    PVFS_sys_dist* dist;
+    PVFS_sys_dist *dist = NULL;
 
     if (argc != 2)
     {
@@ -68,7 +68,7 @@ int main(int argc, char **argv)
     attr.atime = attr.ctime = attr.mtime = 
 	time(NULL);
 
-    ret = PVFS_util_lookup_parent(filename, cur_fs, credentials, 
+    ret = PVFS_util_lookup_parent(filename, cur_fs, &credentials, 
                                   &parent_refn.handle);
     if(ret < 0)
     {
@@ -89,7 +89,7 @@ int main(int argc, char **argv)
     }
     
     ret = PVFS_sys_create(entry_name, parent_refn, attr,
-                          credentials, dist, &resp_create);
+                          &credentials, dist, &resp_create);
     if (ret < 0)
     {
         PVFS_perror("create failed with errcode", ret);

Index: create.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/create.c,v
diff -p -u -r1.38 -r1.39
--- create.c	25 Mar 2004 04:23:39 -0000	1.38
+++ create.c	20 May 2004 17:27:53 -0000	1.39
@@ -67,7 +67,7 @@ int main(int argc, char **argv)
     attr.atime = attr.ctime = attr.mtime = 
 	time(NULL);
 
-    ret = PVFS_util_lookup_parent(filename, cur_fs, credentials, 
+    ret = PVFS_util_lookup_parent(filename, cur_fs, &credentials, 
                                   &parent_refn.handle);
     if(ret < 0)
     {
@@ -80,7 +80,7 @@ int main(int argc, char **argv)
            str_buf, Lu(parent_refn.handle));
 
     ret = PVFS_sys_create(entry_name, parent_refn, attr,
-                          credentials, NULL, &resp_create);
+                          &credentials, NULL, &resp_create);
     if (ret < 0)
     {
         PVFS_perror("create failed with errcode", ret);

Index: dmkdir.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/dmkdir.c,v
diff -p -u -r1.10 -r1.11
--- dmkdir.c	24 Mar 2004 23:10:32 -0000	1.10
+++ dmkdir.c	20 May 2004 17:27:53 -0000	1.11
@@ -68,7 +68,7 @@ int main(int argc,char **argv)
     PVFS_util_gen_credentials(&credentials);
 
     entry_name = str_buf;
-    ret = PVFS_util_lookup_parent(dirname, cur_fs, credentials, 
+    ret = PVFS_util_lookup_parent(dirname, cur_fs, &credentials, 
                                   &parent_refn.handle);
     if(ret < 0)
     {
@@ -84,7 +84,7 @@ int main(int argc,char **argv)
     attr.atime = attr.ctime = attr.mtime = time(NULL);
 
     ret = PVFS_sys_mkdir(entry_name, parent_refn, attr, 
-                         credentials, &resp_mkdir);
+                         &credentials, &resp_mkdir);
     if (ret < 0)
     {
         printf("mkdir failed\n");
@@ -96,7 +96,7 @@ int main(int argc,char **argv)
     printf("FSID:%d\n",parent_refn.fs_id);
 
     ret = PVFS_sys_mkdir(str_buf2, resp_mkdir.ref, attr, 
-                         credentials, &resp_mkdir);
+                         &credentials, &resp_mkdir);
     if (ret < 0)
     {
         printf("mkdir failed\n");
@@ -108,7 +108,7 @@ int main(int argc,char **argv)
     printf("FSID:%d\n",parent_refn.fs_id);
 
     ret = PVFS_sys_mkdir(str_buf3, resp_mkdir.ref, attr, 
-			credentials, &resp_mkdir);
+			&credentials, &resp_mkdir);
     if (ret < 0)
     {
         printf("mkdir failed\n");

Index: find.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/find.c,v
diff -p -u -r1.38 -r1.39
--- find.c	24 Mar 2004 23:10:33 -0000	1.38
+++ find.c	20 May 2004 17:27:53 -0000	1.39
@@ -46,7 +46,7 @@ int is_directory(PVFS_handle handle, PVF
 
     PVFS_util_gen_credentials(&credentials);
     if (PVFS_sys_getattr(pinode_refn, attrmask,
-                         credentials, &getattr_response))
+                         &credentials, &getattr_response))
     {
         fprintf(stderr,"Failed to get attributes on handle 0x%08Lx "
                 "(fs_id is %d)\n",Lu(handle),fs_id);
@@ -92,7 +92,7 @@ int directory_walk(PVFS_fs_id cur_fs,
     name = full_path;
 
     PVFS_util_gen_credentials(&credentials);
-    if (PVFS_sys_lookup(cur_fs, name, credentials,
+    if (PVFS_sys_lookup(cur_fs, name, &credentials,
                         &lk_response, PVFS2_LOOKUP_LINK_FOLLOW))
     {
         fprintf(stderr,"Failed to lookup %s on fs_id %d!\n",
@@ -113,7 +113,7 @@ int directory_walk(PVFS_fs_id cur_fs,
         if (PVFS_sys_readdir(pinode_refn,
                              (!token ? PVFS_READDIR_START : token),
                              pvfs_dirent_incount,
-                             credentials, &rd_response))
+                             &credentials, &rd_response))
         {
             fprintf(stderr,"Failed to perform readdir operation\n");
             return 1;

Index: flush-1.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/flush-1.c,v
diff -p -u -r1.11 -r1.12
--- flush-1.c	25 Mar 2004 04:23:39 -0000	1.11
+++ flush-1.c	20 May 2004 17:27:53 -0000	1.12
@@ -69,7 +69,7 @@ int main(int argc, char **argv)
 	time(NULL);
 
     PVFS_util_gen_credentials(&credentials);
-    ret = PVFS_util_lookup_parent(filename, cur_fs, credentials, 
+    ret = PVFS_util_lookup_parent(filename, cur_fs, &credentials, 
                                   &parent_refn.handle);
     if(ret < 0)
     {
@@ -79,7 +79,7 @@ int main(int argc, char **argv)
     parent_refn.fs_id = cur_fs;
 
     ret = PVFS_sys_create(entry_name, parent_refn, attr,
-                credentials, NULL, &resp_create);
+                &credentials, NULL, &resp_create);
     if (ret < 0)
     {
         printf("create failed with errcode = %d\n", ret);
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
     printf("--create--\n"); 
     printf("Handle: %Ld\n",Ld(resp_create.ref.handle));
 
-    ret = PVFS_sys_flush(resp_create.ref, credentials);
+    ret = PVFS_sys_flush(resp_create.ref, &credentials);
     if (ret < 0)
     {
 	    printf("flush failed with errcode = %d\n", ret);

Index: flush-2.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/flush-2.c,v
diff -p -u -r1.18 -r1.19
--- flush-2.c	25 Mar 2004 04:23:39 -0000	1.18
+++ flush-2.c	20 May 2004 17:27:53 -0000	1.19
@@ -98,7 +98,7 @@ int main(
     name = filename;
 
     PVFS_util_gen_credentials(&credentials);
-    ret = PVFS_sys_lookup(fs_id, name, credentials,
+    ret = PVFS_sys_lookup(fs_id, name, &credentials,
 			  &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
     /* TODO: really we probably want to look for a specific error code,
      * like maybe ENOENT?
@@ -110,7 +110,7 @@ int main(
 	/* get root handle */
 	name = "/";
 
-	ret = PVFS_sys_lookup(fs_id, name, credentials,
+	ret = PVFS_sys_lookup(fs_id, name, &credentials,
 			      &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
 	if (ret < 0)
 	{
@@ -130,7 +130,7 @@ int main(
 	entry_name = &(filename[1]);	/* leave off slash */
 
 	ret = PVFS_sys_create(entry_name, parent_refn, attr,
-			      credentials, NULL, &resp_cr);
+			      &credentials, NULL, &resp_cr);
 	if (ret < 0)
 	{
 	    fprintf(stderr, "Error: PVFS_sys_create() failure.\n");
@@ -168,7 +168,7 @@ int main(
     }
 
     ret = PVFS_sys_write(pinode_refn, file_req, 0, buffer, mem_req,
-			 credentials, &resp_io);
+			 &credentials, &resp_io);
     if (ret < 0)
     {
 	fprintf(stderr, "Error: PVFS_sys_write() failure.\n");
@@ -185,7 +185,7 @@ int main(
     printf("IO-TEST: performing read on handle: %ld, fs: %d\n",
 	   (long) pinode_refn.handle, (int) pinode_refn.fs_id);
     ret = PVFS_sys_read(pinode_refn, file_req, 0, buffer, mem_req,
-			credentials, &resp_io);
+			&credentials, &resp_io);
     if (ret < 0)
     {
 	fprintf(stderr, "Error: PVFS_sys_read() failure.\n");
@@ -220,7 +220,7 @@ int main(
     }
 
     /* now that we've done some i/o, flush the data to disk */
-    ret = PVFS_sys_flush(pinode_refn, credentials);
+    ret = PVFS_sys_flush(pinode_refn, &credentials);
     if (ret < 0)
     {
 	fprintf(stderr, "Error: PVFS_sys_flush() error.\n");

Index: get-info.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/get-info.c,v
diff -p -u -r1.37 -r1.38
--- get-info.c	24 Mar 2004 23:10:33 -0000	1.37
+++ get-info.c	20 May 2004 17:27:53 -0000	1.38
@@ -53,7 +53,7 @@ int main(int argc,char **argv)
     name = filename;
 
     PVFS_util_gen_credentials(&credentials);
-    ret = PVFS_sys_lookup(fs_id, name, credentials,
+    ret = PVFS_sys_lookup(fs_id, name, &credentials,
                           &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
     if (ret < 0)
     {
@@ -72,7 +72,7 @@ int main(int argc,char **argv)
     pinode_refn.fs_id = fs_id;
     attrmask = PVFS_ATTR_SYS_ALL;
 
-    ret = PVFS_sys_getattr(pinode_refn, attrmask, credentials, resp_gattr);
+    ret = PVFS_sys_getattr(pinode_refn, attrmask, &credentials, resp_gattr);
     if (ret < 0)
     {
         printf("getattr failed with errcode = %d\n", ret);

Index: getparent.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/getparent.c,v
diff -p -u -r1.15 -r1.16
--- getparent.c	24 Mar 2004 23:10:33 -0000	1.15
+++ getparent.c	20 May 2004 17:27:53 -0000	1.16
@@ -42,7 +42,7 @@ int main(int argc,char **argv)
     }
 
     PVFS_util_gen_credentials(&credentials);
-    ret = PVFS_sys_getparent(fs_id, argv[1], credentials, &resp_getparent);
+    ret = PVFS_sys_getparent(fs_id, argv[1], &credentials, &resp_getparent);
     if (ret == 0)
     {
         printf("=== getparent data:\n");

Index: io-bug.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/io-bug.c,v
diff -p -u -r1.4 -r1.5
--- io-bug.c	25 Mar 2004 04:23:39 -0000	1.4
+++ io-bug.c	20 May 2004 17:27:53 -0000	1.5
@@ -103,7 +103,7 @@ int main(
     name = filename;
 
     PVFS_util_gen_credentials(&credentials);
-    ret = PVFS_sys_lookup(fs_id, name, credentials,
+    ret = PVFS_sys_lookup(fs_id, name, &credentials,
 			  &resp_lk, PVFS2_LOOKUP_LINK_FOLLOW);
     /* TODO: really we probably want to look for a specific error code,
      * like maybe ENOENT?
@@ -114,7 +114,7 @@ int main(
 
 	/* get root handle */
 	name = "/";
-	ret = PVFS_sys_lookup(fs_id, name, credentials,
+	ret = PVFS_sys_lookup(fs_id, name, &credentials,
 			      &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
 	if (ret < 0)
 	{
@@ -136,7 +136,7 @@ int main(
 	entry_name = &(filename[1]);	/* leave off slash */
 
 	ret = PVFS_sys_create(entry_name, parent_refn, attr,
-			      credentials, NULL, &resp_cr);
+			      &credentials, NULL, &resp_cr);
 	if (ret < 0)
 	{
 	    fprintf(stderr, "Error: PVFS_sys_create() failure.\n");
@@ -182,7 +182,7 @@ int main(
                      off_array2, PVFS_BYTE, &file_req);
 
     ret = PVFS_sys_write(pinode_refn, file_req, 0, PVFS_BOTTOM, mem_req,
-			 credentials, &resp_io);
+			 &credentials, &resp_io);
     if (ret < 0)
     {
 	fprintf(stderr, "Error: PVFS_sys_write() failure.\n");

Index: io-test-offset.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/io-test-offset.c,v
diff -p -u -r1.23 -r1.24
--- io-test-offset.c	25 Mar 2004 04:23:39 -0000	1.23
+++ io-test-offset.c	20 May 2004 17:27:53 -0000	1.24
@@ -103,7 +103,7 @@ int main(
     name = filename;
 
     PVFS_util_gen_credentials(&credentials);
-    ret = PVFS_sys_lookup(fs_id, name, credentials,
+    ret = PVFS_sys_lookup(fs_id, name, &credentials,
 			  &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
     /* TODO: really we probably want to look for a specific error code,
      * like maybe ENOENT?
@@ -115,7 +115,7 @@ int main(
 	/* get root handle */
 	name = "/";
 
-	ret = PVFS_sys_lookup(fs_id, name, credentials,
+	ret = PVFS_sys_lookup(fs_id, name, &credentials,
 			      &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
 	if (ret < 0)
 	{
@@ -136,7 +136,7 @@ int main(
 	entry_name = &(filename[1]);	/* leave off slash */
 
 	ret = PVFS_sys_create(entry_name, parent_refn, attr,
-			      credentials, NULL, &resp_cr);
+			      &credentials, NULL, &resp_cr);
 	if (ret < 0)
 	{
 	    fprintf(stderr, "Error: PVFS_sys_create() failure.\n");
@@ -182,7 +182,7 @@ int main(
     }
 
     ret = PVFS_sys_write(pinode_refn, file_req, 0, buffer, mem_req,
-			 credentials, &resp_io);
+			 &credentials, &resp_io);
     if (ret < 0)
     {
 	fprintf(stderr, "Error: PVFS_sys_write() failure.\n");
@@ -206,7 +206,7 @@ int main(
     printf("IO-TEST: performing read on handle: %ld, fs: %d\n",
 	   (long) pinode_refn.handle, (int) pinode_refn.fs_id);
     ret = PVFS_sys_read(pinode_refn, file_req, (5 * sizeof(int)), off_buffer,
-			mem_req2, credentials, &resp_io);
+			mem_req2, &credentials, &resp_io);
     if (ret < 0)
     {
 	fprintf(stderr, "Error: PVFS_sys_read() failure.\n");

Index: io-test.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/io-test.c,v
diff -p -u -r1.52 -r1.53
--- io-test.c	11 May 2004 17:21:48 -0000	1.52
+++ io-test.c	20 May 2004 17:27:53 -0000	1.53
@@ -81,7 +81,7 @@ int main(int argc, char **argv)
     }
 
     PVFS_util_gen_credentials(&credentials);
-    ret = PVFS_sys_lookup(fs_id, name, credentials,
+    ret = PVFS_sys_lookup(fs_id, name, &credentials,
 			  &resp_lk, PVFS2_LOOKUP_LINK_FOLLOW);
     if (ret == -PVFS_ENOENT)
     {
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
 	printf("IO-TEST: lookup failed; creating new file.\n");
 
         memset(&gp_resp, 0, sizeof(PVFS_sysresp_getparent));
-	ret = PVFS_sys_getparent(fs_id, name, credentials, &gp_resp);
+	ret = PVFS_sys_getparent(fs_id, name, &credentials, &gp_resp);
 	if (ret < 0)
 	{
             PVFS_perror("PVFS_sys_getparent failed", ret);
@@ -110,7 +110,7 @@ int main(int argc, char **argv)
         assert(entry_name);
 
 	ret = PVFS_sys_create(entry_name, parent_refn, attr,
-			      credentials, NULL, &resp_cr);
+			      &credentials, NULL, &resp_cr);
 	if (ret < 0)
 	{
 	    PVFS_perror("PVFS_sys_create() failure", ret);
@@ -154,7 +154,7 @@ int main(int argc, char **argv)
     }
 
     ret = PVFS_sys_write(pinode_refn, file_req, 0, buffer, mem_req,
-			 credentials, &resp_io);
+			 &credentials, &resp_io);
     if (ret < 0)
     {
         PVFS_perror("PVFS_sys_write failure", ret);
@@ -172,7 +172,7 @@ int main(int argc, char **argv)
 	   (long) pinode_refn.handle, (int) pinode_refn.fs_id);
 
     ret = PVFS_sys_read(pinode_refn, file_req, 0, buffer, mem_req,
-			credentials, &resp_io);
+			&credentials, &resp_io);
     if (ret < 0)
     {
         PVFS_perror("PVFS_sys_read failure", ret);
@@ -208,7 +208,7 @@ int main(int argc, char **argv)
 
     /* test out some of the mgmt functionality */
     ret = PVFS_sys_getattr(pinode_refn, PVFS_ATTR_SYS_ALL_NOSIZE,
-			   credentials, &resp_getattr);
+			   &credentials, &resp_getattr);
     if (ret < 0)
     {
 	PVFS_perror("PVFS_sys_getattr", ret);
@@ -225,7 +225,7 @@ int main(int argc, char **argv)
 	return (-1);
     }
 
-    ret = PVFS_mgmt_get_dfile_array(pinode_refn, credentials,
+    ret = PVFS_mgmt_get_dfile_array(pinode_refn, &credentials,
 				    dfile_array, resp_getattr.attr.dfile_count);
     if (ret < 0)
     {

Index: lookup.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/lookup.c,v
diff -p -u -r1.28 -r1.29
--- lookup.c	24 Mar 2004 23:10:33 -0000	1.28
+++ lookup.c	20 May 2004 17:27:53 -0000	1.29
@@ -61,7 +61,7 @@ int main(int argc,char **argv)
 
     memset(&resp_lk,0,sizeof(PVFS_sysresp_lookup));
 
-    ret = PVFS_sys_lookup(fs_id, filename, credentials,
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
                           &resp_lk, follow_link);
     if (ret < 0)
     {

Index: ls.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/ls.c,v
diff -p -u -r1.28 -r1.29
--- ls.c	6 Apr 2004 20:22:10 -0000	1.28
+++ ls.c	20 May 2004 17:27:53 -0000	1.29
@@ -98,7 +98,7 @@ void print_entry(
     pinode_refn.fs_id = fs_id;
 
     if (PVFS_sys_getattr(pinode_refn, PVFS_ATTR_SYS_ALL,
-                         credentials, &getattr_response))
+                         &credentials, &getattr_response))
     {
         fprintf(stderr,"Failed to get attributes on handle 0x%08Lx "
                 "(fs_id is %d)\n",Lu(handle),fs_id);
@@ -129,7 +129,7 @@ int do_list(
 
     PVFS_util_gen_credentials(&credentials);
 
-    if (PVFS_sys_lookup(fs_id, name, credentials,
+    if (PVFS_sys_lookup(fs_id, name, &credentials,
                         &lk_response, PVFS2_LOOKUP_LINK_NO_FOLLOW))
     {
         fprintf(stderr,"Failed to lookup %s on fs_id %d!\n",
@@ -143,7 +143,7 @@ int do_list(
     PVFS_util_gen_credentials(&credentials);
 
     if (PVFS_sys_getattr(pinode_refn, PVFS_ATTR_SYS_ALL,
-                         credentials, &getattr_response) == 0)
+                         &credentials, &getattr_response) == 0)
     {
         if ((getattr_response.attr.objtype == PVFS_TYPE_METAFILE) ||
             (getattr_response.attr.objtype == PVFS_TYPE_SYMLINK))
@@ -161,7 +161,7 @@ int do_list(
         memset(&rd_response,0,sizeof(PVFS_sysresp_readdir));
         if (PVFS_sys_readdir(pinode_refn,
                              (!token ? PVFS_READDIR_START : token),
-                             pvfs_dirent_incount, credentials, &rd_response))
+                             pvfs_dirent_incount, &credentials, &rd_response))
         {
             fprintf(stderr,"readdir failed\n");
             return -1;

Index: mkdir.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/mkdir.c,v
diff -p -u -r1.31 -r1.32
--- mkdir.c	24 Mar 2004 23:10:33 -0000	1.31
+++ mkdir.c	20 May 2004 17:27:53 -0000	1.32
@@ -62,7 +62,7 @@ int main(int argc,char **argv)
     PVFS_util_gen_credentials(&credentials);
 
     entry_name = str_buf;
-    ret = PVFS_util_lookup_parent(dirname, cur_fs, credentials, 
+    ret = PVFS_util_lookup_parent(dirname, cur_fs, &credentials, 
                                   &parent_refn.handle);
     if(ret < 0)
     {
@@ -78,7 +78,7 @@ int main(int argc,char **argv)
 	time(NULL);
 
     ret = PVFS_sys_mkdir(entry_name, parent_refn, attr, 
-                         credentials, &resp_mkdir);
+                         &credentials, &resp_mkdir);
     if (ret < 0)
     {
         printf("mkdir failed\n");

Index: readdir.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/readdir.c,v
diff -p -u -r1.32 -r1.33
--- readdir.c	24 Mar 2004 23:10:33 -0000	1.32
+++ readdir.c	20 May 2004 17:27:53 -0000	1.33
@@ -54,7 +54,7 @@ int main(int argc,char **argv)
 
     name = starting_point;
     PVFS_util_gen_credentials(&credentials);
-    ret = PVFS_sys_lookup(fs_id, name, credentials,
+    ret = PVFS_sys_lookup(fs_id, name, &credentials,
                           &resp_look, PVFS2_LOOKUP_LINK_FOLLOW);
     if (ret < 0)
     {
@@ -76,7 +76,7 @@ int main(int argc,char **argv)
         memset(&resp_readdir,0,sizeof(PVFS_sysresp_readdir));
         ret = PVFS_sys_readdir(pinode_refn, (!token ? PVFS_READDIR_START :
                                              token), pvfs_dirent_incount, 
-                               credentials, &resp_readdir);
+                               &credentials, &resp_readdir);
         if (ret < 0)
         {
             printf("readdir failed with errcode = %d\n", ret);

Index: remove.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/remove.c,v
diff -p -u -r1.24 -r1.25
--- remove.c	24 Mar 2004 23:10:33 -0000	1.24
+++ remove.c	20 May 2004 17:27:53 -0000	1.25
@@ -57,7 +57,7 @@ int main(int argc,char **argv)
     entry_name = str_buf;
 
     PVFS_util_gen_credentials(&credentials);
-    ret = PVFS_util_lookup_parent(filename, cur_fs, credentials,
+    ret = PVFS_util_lookup_parent(filename, cur_fs, &credentials,
                                   &parent_refn.handle);
     if(ret < 0)
     {
@@ -66,7 +66,7 @@ int main(int argc,char **argv)
     }
     parent_refn.fs_id = cur_fs;
 
-    ret = PVFS_sys_remove(entry_name, parent_refn, credentials);
+    ret = PVFS_sys_remove(entry_name, parent_refn, &credentials);
     if (ret < 0)
     {
         PVFS_perror("remove failed ", ret);

Index: rename.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/rename.c,v
diff -p -u -r1.22 -r1.23
--- rename.c	24 Mar 2004 23:10:33 -0000	1.22
+++ rename.c	20 May 2004 17:27:53 -0000	1.23
@@ -74,7 +74,7 @@ int main(int argc,char **argv)
     PVFS_util_gen_credentials(&credentials);
 
     old_entry = old_buf;
-    ret = PVFS_util_lookup_parent(old_filename, cur_fs, credentials,
+    ret = PVFS_util_lookup_parent(old_filename, cur_fs, &credentials,
                                   &old_parent_refn.handle);
     if(ret < 0)
     {
@@ -83,7 +83,7 @@ int main(int argc,char **argv)
     }
     old_parent_refn.fs_id = cur_fs;
     new_entry = new_buf;
-    ret = PVFS_util_lookup_parent(new_filename, cur_fs, credentials,
+    ret = PVFS_util_lookup_parent(new_filename, cur_fs, &credentials,
 	&new_parent_refn.handle);
     if(ret < 0)
     {
@@ -93,7 +93,7 @@ int main(int argc,char **argv)
     new_parent_refn.fs_id = cur_fs;
 
     ret = PVFS_sys_rename(old_entry, old_parent_refn, new_entry, 
-			new_parent_refn, credentials);
+			new_parent_refn, &credentials);
     if (ret < 0)
     {
         printf("rename failed with errcode = %d\n",ret);

Index: set-info.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/set-info.c,v
diff -p -u -r1.21 -r1.22
--- set-info.c	24 Mar 2004 23:10:33 -0000	1.21
+++ set-info.c	20 May 2004 17:27:53 -0000	1.22
@@ -51,7 +51,7 @@ int main(int argc, char **argv)
 
     printf("about to lookup %s\n", filename);
 
-    ret = PVFS_sys_lookup(fs_id, filename, credentials,
+    ret = PVFS_sys_lookup(fs_id, filename, &credentials,
                           &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
     if (ret < 0)
     {
@@ -65,7 +65,7 @@ int main(int argc, char **argv)
     printf("about to getattr on %s\n", filename);
 
     ret = PVFS_sys_getattr(pinode_refn, PVFS_ATTR_SYS_ALL_SETABLE,
-                           credentials, &resp_getattr);
+                           &credentials, &resp_getattr);
     if (ret < 0)
     {
         printf("getattr failed with errcode = %d\n", ret);
@@ -102,7 +102,7 @@ int main(int argc, char **argv)
 
     printf("about to setattr on %s\n", filename);
 
-    ret = PVFS_sys_setattr(pinode_refn, resp_getattr.attr, credentials);
+    ret = PVFS_sys_setattr(pinode_refn, resp_getattr.attr, &credentials);
     if (ret < 0)
     {
         fprintf(stderr, "setattr failed with errcode = %d\n", ret);

Index: symlink.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/symlink.c,v
diff -p -u -r1.12 -r1.13
--- symlink.c	24 Mar 2004 23:10:33 -0000	1.12
+++ symlink.c	20 May 2004 17:27:53 -0000	1.13
@@ -69,7 +69,7 @@ int main(int argc, char **argv)
     attr.perms = 1877;
     attr.atime = attr.ctime = attr.mtime = time(NULL);
 
-    ret = PVFS_util_lookup_parent(filename, cur_fs, credentials, 
+    ret = PVFS_util_lookup_parent(filename, cur_fs, &credentials, 
                                   &parent_refn.handle);
     if(ret < 0)
     {
@@ -79,7 +79,7 @@ int main(int argc, char **argv)
     parent_refn.fs_id = cur_fs;
 
     ret = PVFS_sys_symlink(entry_name, parent_refn, target,
-                           attr, credentials, &resp_sym);
+                           attr, &credentials, &resp_sym);
     if (ret < 0)
     {
         printf("symlink failed with errcode = %d\n", ret);

Index: test-create-scale.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/test-create-scale.c,v
diff -p -u -r1.3 -r1.4
--- test-create-scale.c	11 May 2004 16:39:04 -0000	1.3
+++ test-create-scale.c	20 May 2004 17:27:53 -0000	1.4
@@ -107,7 +107,7 @@ int main(int argc, char **argv)
     attr.dfile_count = max_dfiles;
     attr.mask |= PVFS_ATTR_SYS_DFILE_COUNT;
 
-    ret = PVFS_util_lookup_parent(basename, cur_fs, credentials, 
+    ret = PVFS_util_lookup_parent(basename, cur_fs, &credentials, 
                                   &parent_refn.handle);
     if(ret < 0)
     {
@@ -119,13 +119,13 @@ int main(int argc, char **argv)
     /* do one big one to prime connections if needed */
     sprintf(entry_name, "%s%d", str_buf, 0);
     ret = PVFS_sys_create(entry_name, parent_refn, attr,
-			  credentials, NULL, &resp_create);
+			  &credentials, NULL, &resp_create);
     if (ret < 0)
     {
 	PVFS_perror("PVFS_sys_create", ret);
 	return(-1);
     }
-    ret = PVFS_sys_remove(entry_name, parent_refn, credentials);
+    ret = PVFS_sys_remove(entry_name, parent_refn, &credentials);
     if(ret < 0)
     {
 	PVFS_perror("PVFS_sys_remove", ret);
@@ -140,7 +140,7 @@ int main(int argc, char **argv)
 	    attr.dfile_count = i+1;
 	    start_time = Wtime();
 	    ret = PVFS_sys_create(entry_name, parent_refn, attr,
-				  credentials, NULL, &resp_create);
+				  &credentials, NULL, &resp_create);
 	    end_time = Wtime();
 	    if (ret < 0)
 	    {
@@ -153,7 +153,7 @@ int main(int argc, char **argv)
 	for(j=0; j<iters; j++)
 	{
 	    sprintf(entry_name, "%s%d", str_buf, j);
-	    ret = PVFS_sys_remove(entry_name, parent_refn, credentials);
+	    ret = PVFS_sys_remove(entry_name, parent_refn, &credentials);
 	    if(ret < 0)
 	    {
 		PVFS_perror("PVFS_sys_remove", ret);

Index: truncate.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/client/sysint/truncate.c,v
diff -p -u -r1.21 -r1.22
--- truncate.c	24 Mar 2004 23:10:33 -0000	1.21
+++ truncate.c	20 May 2004 17:27:53 -0000	1.22
@@ -55,7 +55,7 @@ int main(int argc,char **argv)
     name[0] = '/';
     name[1] = '\0';
     printf("looking up the root handle for fsid = %d\n", fs_id);
-    ret = PVFS_sys_lookup(fs_id, name, credentials,
+    ret = PVFS_sys_lookup(fs_id, name, &credentials,
                           &resp_look, PVFS2_LOOKUP_LINK_NO_FOLLOW);
     if (ret < 0)
     {
@@ -71,7 +71,7 @@ int main(int argc,char **argv)
     name = filename;
 
     PVFS_util_gen_credentials(&credentials);
-    ret = PVFS_sys_lookup(fs_id, name, credentials,
+    ret = PVFS_sys_lookup(fs_id, name, &credentials,
                           &resp_lk, PVFS2_LOOKUP_LINK_NO_FOLLOW);
     if (ret < 0)
     {
@@ -84,7 +84,7 @@ int main(int argc,char **argv)
     pinode_refn.handle = resp_lk.ref.handle;
     pinode_refn.fs_id = resp_lk.ref.fs_id;
 
-    ret = PVFS_sys_truncate(pinode_refn, size, credentials);
+    ret = PVFS_sys_truncate(pinode_refn, size, &credentials);
     if (ret < 0)
     {
         printf("truncate failed with errcode = %d\n",ret);



More information about the PVFS2-CVS mailing list