2007-02-09 00:40:21

by NeilBrown

[permalink] [raw]
Subject: Re: [PATCH 03/12] Extend the exportfs interface to pass fslocations info into the kernel.

On Thursday February 8, [email protected] wrote:
> From: Kevin Coffman <[email protected]>
>
> Signed-off-by: Fred Isaman <[email protected]>
> Signed-off-by: Kevin Coffman <[email protected]>
>
> Extend exportfs interface to pass fslocations info into the kernel,
> using syntax modelled after AIX. Adds "--refer" and "--replicas"
> options to exportfs to enable use of the kernel fslocation code.

I cannot see the "--refer" and "--replicas" implemented or documented
in the patch. I think the changelog entry must be out of date, and
when we remove that sentence, there isn't much left....

> +/* Called by setting 'Method = stub' in config file. Just returns
> + * some syntactically correct gibberish for testing purposes.
> + */
> +static struct servers *method_stub(char *key)
> +{
> + struct servers *sp;
> + struct mount_point *mp;
> +
> + syslog(LOG_INFO, "called method_stub");
> + sp = malloc(sizeof(struct servers));
> + if (!sp)
> + return NULL;
> + mp = calloc(1, sizeof(struct mount_point));
> + if (!mp) {
> + free(sp);
> + return NULL;
> + }
> + sp->h_num = 1;
> + sp->h_mp[0] = mp;
> + mp->h_host = strdup("stub_server");
> + mp->h_path = strdup("/my/test/path");
> + sp->h_referral = 1;
> + return sp;
> +}


This makes perfect sense for testing during development, but do you
really want it in the released version?
If so, should there be "#ifdef DEBUG" or something around it ??


And I'm a little confused by the replicas_lookup, method_list stuff.
I think it is just parsing the format from /etc/exports so that it can
be written in the different format to the kernel.
It would seem more appropriate to do this when parsing the
/etc/exports (to /etab) file rather than every time we talk to the
kernel. Is there are reason for the way it is?
(Just trying to make sure I understand).


Thanks,
NeilBrown

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2007-02-09 14:19:43

by Kevin Coffman

[permalink] [raw]
Subject: Re: [PATCH 03/12] Extend the exportfs interface to pass fslocations info into the kernel.

On 2/8/07, Neil Brown <[email protected]> wrote:
> On Thursday February 8, [email protected] wrote:
> > From: Kevin Coffman <[email protected]>
> >
> > Signed-off-by: Fred Isaman <[email protected]>
> > Signed-off-by: Kevin Coffman <[email protected]>
> >
> > Extend exportfs interface to pass fslocations info into the kernel,
> > using syntax modelled after AIX. Adds "--refer" and "--replicas"
> > options to exportfs to enable use of the kernel fslocation code.
>
> I cannot see the "--refer" and "--replicas" implemented or documented
> in the patch. I think the changelog entry must be out of date, and
> when we remove that sentence, there isn't much left....

I guess that should read "refer=" and "replicas=".

> > +/* Called by setting 'Method = stub' in config file. Just returns
> > + * some syntactically correct gibberish for testing purposes.
> > + */
> > +static struct servers *method_stub(char *key)
> > +{
> > + struct servers *sp;
> > + struct mount_point *mp;
> > +
> > + syslog(LOG_INFO, "called method_stub");
> > + sp = malloc(sizeof(struct servers));
> > + if (!sp)
> > + return NULL;
> > + mp = calloc(1, sizeof(struct mount_point));
> > + if (!mp) {
> > + free(sp);
> > + return NULL;
> > + }
> > + sp->h_num = 1;
> > + sp->h_mp[0] = mp;
> > + mp->h_host = strdup("stub_server");
> > + mp->h_path = strdup("/my/test/path");
> > + sp->h_referral = 1;
> > + return sp;
> > +}
>
>
> This makes perfect sense for testing during development, but do you
> really want it in the released version?
> If so, should there be "#ifdef DEBUG" or something around it ??

Sounds reasonable.

> And I'm a little confused by the replicas_lookup, method_list stuff.
> I think it is just parsing the format from /etc/exports so that it can
> be written in the different format to the kernel.
> It would seem more appropriate to do this when parsing the
> /etc/exports (to /etab) file rather than every time we talk to the
> kernel. Is there are reason for the way it is?
> (Just trying to make sure I understand).

I'll have to defer to Fred on this. I think he is going to be out for a week.

K.C.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs