X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C88D7D.16702118@onstor-exch02.onstor.net>; Mon, 24 Mar 2008 00:02:56 -0700
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C88D7D.16702118"
Content-class: urn:content-classes:message
Subject: RE: some vsd issues
Date: Mon, 24 Mar 2008 00:02:56 -0700
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E03E9A701@onstor-exch02.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E03B1C12A@onstor-exch02.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: some vsd issues
Thread-Index: AciLv1ZxRvzf2TyWT0aY88O2WJr6HwBvJuYQ
From: "Chris Vandever" <chris.vandever@onstor.com>
To: "Rendell Fong" <rendell.fong@onstor.com>,
	"dl-Cougar" <dl-Cougar@onstor.com>

This is a multi-part message in MIME format.

------_=_NextPart_001_01C88D7D.16702118
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Comments inline...

_____________________________________________
From: Rendell Fong=20
Sent: Friday, March 21, 2008 6:52 PM
To: dl-Cougar
Subject: some vsd issues

Hi folks,

There are a few things I've noticed in vsd that I think are minor issues
but should be fixed at some point.
Only problem is I'm not sure what the proper fix ought to be.  So I'm
looking for some opinions on the following matters.

1)	In ssc-vsd/vs-daemon.c line 12661:
	=20
	The same flag (VS_CLUSTER_STATE_ENABLE) is being tested 3 times
in the VS_DISABLE_FORCE case.  I guess once is just not good enough.  So
the question is, should it be checking the other 2 flags
(VS_CLUSTER_STATE_NET_ENABLED and VS_CLUSTER_STATE__AUTH_ENABLED)? The
other ones that are also about to be cleared?

CV>  Yes, it should be checking the other 2 flags instead of the same
one 3 times.  I could swear I fixed this at one time, but obviously not.

2)	In ssc-vsd/vs-daemon.c lines 3692, 4355, 12669:

	The vsvr enable/disable/remove processing routines are making
cluster DB calls which send async requests to load/flush mount cache
info.  However, vsd is immediately completing the transaction that the
request is related to.  This causes the cluster DB response to be
ignored when received later on.  Does vsd really need to be sending
these cluster DB requests?  If it does, maybe an unacknowledged request
message (with RMC ack only) ought to be sent to the cluster DB instead.=20

CV>  If anyone can shed any additional light on this, please do.

These async requests are really convoluted.  The idea is that we need to
provide share info for an NFS showmount request, and it needs to be
relatively fast.  This involves getting the list of NFS shares for every
vol associated with a vsvr.  Since there could be thousands, it could be
extremely time consuming to make a single request to clustering to get
the share info for each of these.  (Remember, each request involves a
minimum of one message from libcluster to cluster_contrl + 1 msg from
cluster_contrl to cluster_server on the PCC + the database lookup on
flash.)

Instead, cluster_contrl maintains a mount cache for each vsvr, in which
it stores share info for all of the NFS shares for all of the vols for
each vsvr.  It sends a bulk request through libcluster to cluster_contrl
to cluster_server.  There, we get as many share records as will fit in
the buffer (32K bytes), yielding to other requests in the process.  This
bulk data is then stored in the mount cache.  If there are more shares
to fetch, we set a 1 sec timer that will pick up where we left off.

I believe that an NFS showmount request will then get whatever shares
are in the cache at the time of the request.  If we haven't finished
fetching them all yet, it only gets a partial list.  So, we kick off a
request to start filling the cache when we enable the vsvr, hoping that
we'll get everything before the first showmount, and we flush the cache
when we disable or delete the vsvr.

So, yes, VSD really does need to make the requests.  I don't think it
really wants to wait for the response.  I'll need to walk through more
of this code before I can make any suggestions.

Thanks,
Rendell



------_=_NextPart_001_01C88D7D.16702118
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7653.38">
<TITLE>RE: some vsd issues</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">Comments inline</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">&#8230;</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Tahoma">_____________________________________________<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B></B></SPAN><SPAN =
LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">From:</FONT></B></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Tahoma"> Rendell Fong<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B></B></SPAN><SPAN =
LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">Sent:</FONT></B></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Tahoma"> Friday, March 21, 2008 =
6:52 PM<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B></B></SPAN><SPAN =
LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">To:</FONT></B></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Tahoma"> dl-Cougar<BR>
</FONT></SPAN><SPAN LANG=3D"en-us"><B></B></SPAN><SPAN =
LANG=3D"en-us"><B><FONT SIZE=3D2 =
FACE=3D"Tahoma">Subject:</FONT></B></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Tahoma"> some vsd issues</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">Hi =
folks,</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">There =
are a few things I&#8217;ve noticed in vsd that I think are minor issues =
but should be fixed at some point.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">Only =
problem is I&#8217;m not sure what the proper fix ought to be.&nbsp; So =
I&#8217;m looking for some opinions on the following =
matters.</FONT></SPAN></P>

<P><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"> <FONT SIZE=3D2 =
FACE=3D"Arial">In ssc-vsd/vs-daemon.c line 12661:</FONT></SPAN>
<UL>
<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">The =
same flag (VS_CLUSTER_STATE_ENABLE) is being tested 3 times in the =
VS_DISABLE_FORCE case.&nbsp; I guess once is just not good enough.&nbsp; =
So the question is, should it be checking the other 2 flags =
(VS_CLUSTER_STATE_NET_ENABLED and VS_CLUSTER_STATE__AUTH_ENABLED)? The =
other ones that are also about to be cleared?</FONT></SPAN></P>
</UL>
<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">CV&gt;&nbsp; Yes, it should be checking the other 2 flags =
instead of the same one 3 times.&nbsp; I</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial"> could swear I fixed this at one time, but =
obviously not.</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"></SPAN></P>

<P><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">2)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"> <FONT SIZE=3D2 =
FACE=3D"Arial">In ssc-vsd/vs-daemon.c lines 3692, 4355, =
12669:</FONT></SPAN>
</P>
<UL>
<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">The =
vsvr enable/disable/remove processing routines are making cluster DB =
calls which send async requests to load/flush mount cache info.&nbsp; =
However, vsd is immediately completing the transaction that the request =
is related to.&nbsp; This causes the cluster DB response to be ignored =
when received later on.&nbsp; Does vsd really need to be sending these =
cluster DB requests?&nbsp; If it does, maybe an unacknowledged request =
message (with RMC ack only) ought to be sent to the cluster DB instead. =
</FONT></SPAN></P>
</UL>
<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">CV&gt;</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">&nbsp;</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"> <FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">If =
anyone can shed any additional light on this, please =
do.</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">These async requests are really =
convoluted.</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us">&nbsp;<FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial"> =
The idea is that we need to provide share info for an NFS showmount =
request, and it needs to be relatively fast.</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">&nbsp; This involves getting</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial"> the list of</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"> <FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">NFS</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"> <FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">shares for every vol associated with a =
vsvr.&nbsp; Since there could be thousands, it could be extremely time =
consuming to make a single request to clustering to get the share info =
for each of these.</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">&nbsp; =
(Remember, each request involves a minimum of one message from =
libcluster to cluster_contrl + 1 msg from cluster_contrl to =
cluster_server on the PCC + the database lookup on =
flash.</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">)</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">Instead, c</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">luster_contrl</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial"> maintain</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">s</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial"> a mount =
cache for each vsvr</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">,</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial"> in which =
it stores share info for all of the</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"> <FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">NFS</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"> <FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">shares for all of the vols for each =
vsvr.&nbsp;</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"> <FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">It sends =
a bulk request</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"> <FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">through =
libcluster to cluster_contrl to cluster_server.</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us">&nbsp;<FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial"> There</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">,</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial"> we get =
as many share records as will fit in the buffer (32K =
bytes)</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">, =
yielding to other requests in the process.</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">&nbsp; This bulk data is then stored in the =
mount cache.&nbsp; If there are more shares to fetch, we set =
a</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"> <FONT =
COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">1 sec timer that will pick up =
where we left off.</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">I believe that an NFS showmount request will then get =
whatever shares</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial"> =
are</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT =
COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial"> in the cache at the time of =
the request.</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us">&nbsp;<FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial"> If =
we haven</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">&#8217;</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">t =
finished fetching them all yet, it only gets a partial list.&nbsp; So, =
we kick off a request to start filling the cache when we enable the =
vsvr</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT =
COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">, hoping that =
we</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT =
COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">&#8217;</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">ll get everything before the first =
showmount</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">, and we =
flush the cache when we disable or delete the vsvr.</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">So, yes, VSD really does need to make the =
requests.&nbsp;</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"> <FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">I</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"> <FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">don&#8217;t</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial"> think it really wants to</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"> <FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">wait for the response.</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">&nbsp; I</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">&#8217;</FONT></SPAN><SPAN =
LANG=3D"en-us"></SPAN><SPAN LANG=3D"en-us"><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Arial">ll need to walk through more of this code before =
I can make any suggestion</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">s.</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN =
LANG=3D"en-us"></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">Thanks,</FONT></SPAN></P>

<P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">Rendell</FONT></SPAN></P>
<BR>

</BODY>
</HTML>
------_=_NextPart_001_01C88D7D.16702118--
