[PVFS2-CVS] New parameters to PVFS_sys_initialize()

Phil Carns pcarns at parl.clemson.edu
Tue Mar 9 10:54:24 EST 2004


Actually, that whole argument is going away shortly :)

Instead, you will have to tell the library about filesystems using a
PVFS_sys_fs_add() function that is seperate from the initialize()
function.  The fs_add() function won't take a util_tab structure,
instead it will operate on individual mnt entries one at a time.  I'll
make a wrapper function that does this:

- call parse_pvfstab
- call initialize
- call fs_add for every entry found in pvfstab

So that all of these steps that are kindof the same for the bulk of our
tools can be done cleanly all at once, while still having the underlying
functions around to let admin tools with specific needs (like pvfs2-ping,
or karma) to add file systems arbitrarily without using tab files.  It
should also be easier to print helpful messages if not all of the
tabfile entries are valid.

There's going to be a few crazy looking changes along the way to make
this work out :)  Probably it will need some tweaks after we see what
that looks like.

-Phil

On Tue, 9 Mar 2004, Rob Ross wrote:

> Hey,
>
> Would it be better to just pass the address of the PVFS_util_tab structure
> to PVFS_sys_initialize() instead of passing in the whole structure?
>
> Thanks,
>
> Rob
>
> On Mon, 8 Mar 2004 pvfs2-cvs-request at beowulf-underground.org wrote:
>
> > Message: 1
> > Date: Mon, 8 Mar 2004 23:19:02 -0500
> > From: CVS commit program <cvs at parl.clemson.edu>
> > Subject: [PVFS2-CVS] 	commit by pcarns in pvfs2/test/client/sysint:
> > 	client.c create.c	dmkdir.c find.c flush-1.c flush-2.c get-info.c
> > 	getparent.c	initialize.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-pint-bucket.c	truncate.c
> > To: pvfs2-cvs at beowulf-underground.org
> > Message-ID: <200403090419.i294J2T2022879 at parlweb.parl.clemson.edu>
> >
> > Update of /projects/cvsroot/pvfs2/test/client/sysint
> > In directory parlweb:/tmp/cvs-serv22815/test/client/sysint
> >
> > Modified Files:
> > 	client.c create.c dmkdir.c find.c flush-1.c flush-2.c
> > 	get-info.c getparent.c initialize.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-pint-bucket.c truncate.c
> > Log Message:
> > modified PVFS_util_parse_pvfstab to return a const pointer to a tab
> > structure managed within the library; user no longer responsible for
> > allocating or freeing any of it
> >
> >
> > Index: client.c
> > ===================================================================
> > RCS file: /projects/cvsroot/pvfs2/test/client/sysint/client.c,v
> > diff -p -u -r1.39 -r1.40
> > --- client.c	8 Mar 2004 22:06:37 -0000	1.39
> > +++ client.c	9 Mar 2004 04:19:02 -0000	1.40
> > @@ -35,7 +35,7 @@ int main(int argc,char **argv)
> >  	char *filename;
> >  	//char dirname[256] = "/parl/fshorte/sysint/home";
> >  	int ret = -1,i = 0;
> > -	PVFS_util_tab mnt = {0,NULL};
> > +	const PVFS_util_tab* tab;
> >  	PVFS_fs_id fs_id;
> >  	char* name = "/";
> >  	PVFS_credentials credentials;
> > @@ -53,14 +53,14 @@ int main(int argc,char **argv)
> >
> >  	printf("creating a file named %s\n", filename);
> >
> > -	ret = PVFS_util_parse_pvfstab(NULL, &mnt);
> > -	if (ret < 0)
> > +	tab = PVFS_util_parse_pvfstab(NULL);
> > +	if (!tab)
> >  	{
> >  		printf("Parsing error\n");
> >  		return(-1);
> >  	}
> >
> > -	ret = PVFS_sys_initialize(mnt, GOSSIP_NO_DEBUG, &resp_init);
> > +	ret = PVFS_sys_initialize(*tab, GOSSIP_NO_DEBUG, &resp_init);
> >  	if(ret < 0)
> >  	{
> >  		printf("PVFS_sys_initialize() failure. = %d\n", ret);
>
> _______________________________________________
> PVFS2-CVS mailing list
> PVFS2-CVS at beowulf-underground.org
> http://www.beowulf-underground.org/mailman/listinfo/pvfs2-cvs
>



More information about the PVFS2-CVS mailing list