All of lore.kernel.org
 help / color / mirror / Atom feed
* nfs-utils 1.0.9-rc1 - hopefully -final in a week
@ 2006-07-03  0:22 Neil Brown
  2006-07-03  7:33 ` Greg Banks
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Neil Brown @ 2006-07-03  0:22 UTC (permalink / raw)
  To: nfs; +Cc: Greg Banks, Kevin Coffman, Steinar H. Gunderson, Steve Dickson


Hi,
 I'd like to put out nfs-utils-1.0.9 by the end of the week.
There is (or will soon be) a -pre1 in
  http://www.kernel.org/pub/linux/utils/nfs/
and
  git://linux-nfs.org/nfs-utils

Recent changes can been seen at
   http://linux-nfs.org/cgi-bin/gitweb.cgi?p=nfs-utils;a=log
  
If anyone cares to do some testing that would be great.

If anyone has patches that are ready and that I haven't included, now
might be a good time to send them to me.

If they aren't quite ready, don't rush - I'd like to put out
releases a little more often than once per year (which is what it was
a for a while) so there will be another chance in a month or two or
three.

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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
  2006-07-03  0:22 nfs-utils 1.0.9-rc1 - hopefully -final in a week Neil Brown
@ 2006-07-03  7:33 ` Greg Banks
  2006-07-04  0:40   ` Neil Brown
  2006-07-04 14:50 ` Shankar Anand
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 15+ messages in thread
From: Greg Banks @ 2006-07-03  7:33 UTC (permalink / raw)
  To: Neil Brown; +Cc: Linux NFS Mailing List

On Mon, 2006-07-03 at 10:22, Neil Brown wrote:
> If anyone has patches that are ready and that I haven't included, now
> might be a good time to send them to me.

I believe I've managed to wrestle git to the ground, can you try

git pull git://oss.sgi.com:8090/gnb/nfs-utils

It's a bunch of mostly harmless warning fixes.  I can now
build nfs-utils on sles10 with no warnings except from the
generated *xdr.c files.  You may not agree with the way
I've used socklen_t conditionally, any feedback appreciated.

Thanks to Keith Owens and Nathan Scott for git help.

Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.



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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
  2006-07-03  7:33 ` Greg Banks
@ 2006-07-04  0:40   ` Neil Brown
  2006-07-04  4:17     ` Greg Banks
  0 siblings, 1 reply; 15+ messages in thread
From: Neil Brown @ 2006-07-04  0:40 UTC (permalink / raw)
  To: Greg Banks; +Cc: Linux NFS Mailing List

On Monday July 3, gnb@melbourne.sgi.com wrote:
> On Mon, 2006-07-03 at 10:22, Neil Brown wrote:
> > If anyone has patches that are ready and that I haven't included, now
> > might be a good time to send them to me.
> 
> I believe I've managed to wrestle git to the ground, can you try
> 
> git pull git://oss.sgi.com:8090/gnb/nfs-utils
> 
> It's a bunch of mostly harmless warning fixes.  I can now
> build nfs-utils on sles10 with no warnings except from the
> generated *xdr.c files.  You may not agree with the way
> I've used socklen_t conditionally, any feedback appreciated.

Thanks for doing these, and for giving me an excuse to try out more of
git.
All these changes look fine.

For the generates *xdr.c files, what would you think of this change?
It seems to do the right thing.  Each variable declaration is followed
by a (void) usage of it.  Slightly gross, but auto-generated code
often is ;-)

NeilBrown


--- /home/git/nfs-utils/tools/rpcgen/rpc_cout.c	2006-07-04 10:13:49.000000000 +1000
+++ tools/rpcgen/rpc_cout.c	2006-07-04 10:36:43.000000000 +1000
@@ -165,7 +165,7 @@
 	if (Inline == 0)
 		return;
 	/* May cause lint to complain. but  ... */
-	f_print(fout, "\t register int32_t *buf;\n\n");
+	f_print(fout, "\t register int32_t *buf; (void)buf;\n\t{\n\n");
 }
 
 static void
@@ -177,7 +177,7 @@
 static void
 print_trailer(void)
 {
-	f_print(fout, "\treturn (TRUE);\n");
+	f_print(fout, "\t}\n\treturn (TRUE);\n");
 	f_print(fout, "}\n");
 }
 
@@ -399,7 +399,7 @@
 
 		for (dl = def->def.st.decls; dl != NULL; dl = dl->next)
 			if (dl->decl.rel == REL_VECTOR) {
-				f_print(fout, "\t int i;\n");
+				f_print(fout, "\t int i;(void)i;\n");
 				break;
 			}
 		size = 0;

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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
  2006-07-04  0:40   ` Neil Brown
@ 2006-07-04  4:17     ` Greg Banks
  2006-07-04  7:47       ` Neil Brown
  0 siblings, 1 reply; 15+ messages in thread
From: Greg Banks @ 2006-07-04  4:17 UTC (permalink / raw)
  To: Neil Brown; +Cc: Linux NFS Mailing List

On Tue, 2006-07-04 at 10:40, Neil Brown wrote:
> On Monday July 3, gnb@melbourne.sgi.com wrote:
> Thanks for doing these, and for giving me an excuse to try out more of
> git.

No worries, it gave me an excuse too ;-)

> For the generates *xdr.c files, what would you think of this change?
> It seems to do the right thing.  Each variable declaration is followed
> by a (void) usage of it.  Slightly gross, but auto-generated code
> often is ;-)

I think the following patch is cleaner.  It eliminates the
warnings about `buf' being unused by generating the declaration
on first demand.  As a result most XDR routines don't have
a `buf' declaration at all; those that do inlining have two,
one each in the encode and decode branch.  Comments?

I'll see if I can do something equivalent for that pesky `i' too.

diff-tree 18ffd1f098436ebfb99291815dfd3463a41fcb3f (from 4e9ed06f8f8a0cd9f34a6830c0ff14344a528042)
Author: Greg Banks <gnb@melbourne.sgi.com>
Date:   Tue Jul 4 14:07:11 2006 +1000

    Eliminate warnings about unused variable `buf' in generated
    XDR code by emitting a declaration for `buf' on demand.

diff --git a/tools/rpcgen/rpc_cout.c b/tools/rpcgen/rpc_cout.c
index cae8717..26dc466 100644
--- a/tools/rpcgen/rpc_cout.c
+++ b/tools/rpcgen/rpc_cout.c
@@ -164,8 +164,6 @@ print_header(definition *def)
 
 	if (Inline == 0)
 		return;
-	/* May cause lint to complain. but  ... */
-	f_print(fout, "\t register int32_t *buf;\n\n");
 }
 
 static void
@@ -390,6 +388,7 @@ emit_struct(definition *def)
 	char           *sizestr, *plus;
 	char            ptemp[256];
 	int             can_inline;
+	const char	*buf_declaration;
 
 
 	if (Inline == 0) {
@@ -444,6 +443,7 @@ emit_struct(definition *def)
 			i = 0;
 			size = 0;
 			sizestr = NULL;
+			buf_declaration = "int32_t *";
 			for (dl = def->def.st.decls; dl != NULL; dl = dl->next) {	/* xxx */
 
 				/* now walk down the list and check for basic types */
@@ -497,16 +497,17 @@ emit_struct(definition *def)
 
 							/* were already looking at a xdr_inlineable structure */
 							if (sizestr == NULL)
-								f_print(fout, "\t buf = XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);",
-									size);
+								f_print(fout, "\t %sbuf = XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);",
+									buf_declaration, size);
 							else if (size == 0)
 								f_print(fout,
-									"\t buf = XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);",
-									sizestr);
+									"\t %sbuf = XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);",
+									buf_declaration, sizestr);
 							else
 								f_print(fout,
-									"\t buf = XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);",
-									size, sizestr);
+									"\t %sbuf = XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);",
+									buf_declaration, size, sizestr);
+							buf_declaration = "";
 
 							f_print(fout, "\n\t   if (buf == NULL) {\n");
 
@@ -546,16 +547,17 @@ emit_struct(definition *def)
 
 					/* were already looking at a xdr_inlineable structure */
 					if (sizestr == NULL)
-						f_print(fout, "\t\tbuf = XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);",
-							size);
+						f_print(fout, "\t\t%sbuf = XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);",
+							buf_declaration, size);
 					else if (size == 0)
 						f_print(fout,
-							"\t\tbuf = XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);",
-							sizestr);
+							"\t\t%sbuf = XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);",
+							buf_declaration, sizestr);
 					else
 						f_print(fout,
-							"\t\tbuf = XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);",
-							size, sizestr);
+							"\t\t%sbuf = XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);",
+							buf_declaration, size, sizestr);
+					buf_declaration = "";
 
 					f_print(fout, "\n\t\tif (buf == NULL) {\n");
 

Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.



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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
  2006-07-04  4:17     ` Greg Banks
@ 2006-07-04  7:47       ` Neil Brown
  2006-07-04  7:56         ` Greg Banks
  0 siblings, 1 reply; 15+ messages in thread
From: Neil Brown @ 2006-07-04  7:47 UTC (permalink / raw)
  To: Greg Banks; +Cc: Linux NFS Mailing List

On Tuesday July 4, gnb@melbourne.sgi.com wrote:
> On Tue, 2006-07-04 at 10:40, Neil Brown wrote:
> > For the generates *xdr.c files, what would you think of this change?
> > It seems to do the right thing.  Each variable declaration is followed
> > by a (void) usage of it.  Slightly gross, but auto-generated code
> > often is ;-)
> 
> I think the following patch is cleaner.  It eliminates the
> warnings about `buf' being unused by generating the declaration
> on first demand.  As a result most XDR routines don't have
> a `buf' declaration at all; those that do inlining have two,
> one each in the encode and decode branch.  Comments?

My likey.

> 
> I'll see if I can do something equivalent for that pesky `i' too.

That seems to be very straight forward.

The only place that the 'i' variable is used is in code generated by
emit_inline, and that is already in a local block where 'genp'
is declared.  We can just declare 'i' at the same time.

I'll add that to your patch and stick it in .git

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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
  2006-07-04  7:47       ` Neil Brown
@ 2006-07-04  7:56         ` Greg Banks
  2006-07-04  8:36           ` Neil Brown
  0 siblings, 1 reply; 15+ messages in thread
From: Greg Banks @ 2006-07-04  7:56 UTC (permalink / raw)
  To: Neil Brown; +Cc: Linux NFS Mailing List

On Tue, 2006-07-04 at 17:47, Neil Brown wrote:
> The only place that the 'i' variable is used is in code generated by
> emit_inline, and that is already in a local block where 'genp'
> is declared.  We can just declare 'i' at the same time.
> 
> I'll add that to your patch and stick it in .git

Yep.  That leaves just two warnings.

The first is the whiny message about the result of IXDR_PUT_SHORT()
not being used.  I can't see any way around that except a (void)
cast, like this:

diff-tree cdb0a2d31b63eb6a25ea518a8adcb5029ab6c460 (from 65ae2312a99cb36fbcf4b369200de365810b7015)
Author: Greg Banks <gnb@melbourne.sgi.com>
Date:   Tue Jul 4 17:54:42 2006 +1000

    Remove warning about unused value of IXDR_PUT_{LONG,SHORT}.

diff --git a/tools/rpcgen/rpc_cout.c b/tools/rpcgen/rpc_cout.c
index f78961c..9c32b8a 100644
--- a/tools/rpcgen/rpc_cout.c
+++ b/tools/rpcgen/rpc_cout.c
@@ -646,7 +646,7 @@ emit_single_in_line(declaration *decl, i
 	int freed=0;
 
 	if(flag == PUT)
-		f_print(fout,"\t\t IXDR_PUT_");
+		f_print(fout,"\t\t (void) IXDR_PUT_");
 	else    
 		if(rel== REL_ALIAS)
 			f_print(fout,"\t\t objp->%s = IXDR_GET_",decl->name);


Then there's the type-punned pointer warning.  I hate those.


Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.



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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
  2006-07-04  7:56         ` Greg Banks
@ 2006-07-04  8:36           ` Neil Brown
  2006-07-04  9:09             ` Greg Banks
  0 siblings, 1 reply; 15+ messages in thread
From: Neil Brown @ 2006-07-04  8:36 UTC (permalink / raw)
  To: Greg Banks; +Cc: Linux NFS Mailing List

On Tuesday July 4, gnb@melbourne.sgi.com wrote:
> On Tue, 2006-07-04 at 17:47, Neil Brown wrote:
> > The only place that the 'i' variable is used is in code generated by
> > emit_inline, and that is already in a local block where 'genp'
> > is declared.  We can just declare 'i' at the same time.
> > 
> > I'll add that to your patch and stick it in .git
> 
> Yep.  That leaves just two warnings.
> 
> The first is the whiny message about the result of IXDR_PUT_SHORT()
> not being used.  I can't see any way around that except a (void)
> cast, like this:
> 

That'll do.

> 
> Then there's the type-punned pointer warning.  I hate those.

Here is a trick that google helped me find.  I hope it isn't worse
that the disease :-)

All in .git now, thanks.

NeilBrown


@@ -266,7 +264,8 @@ print_ifstat(int indent, char *prefix, c
 			} else {
 				print_ifopen(indent, "array");
 			}
-			print_ifarg("(char **)");
+			/* The (void*) avoids a gcc-4.1 warning */
+			print_ifarg("(char **)(void*)");
 			if (*objname == '&') {
 				f_print(fout, "%s.%s_val, (u_int *)%s.%s_len",
 					objname, name, objname, name);

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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
  2006-07-04  8:36           ` Neil Brown
@ 2006-07-04  9:09             ` Greg Banks
  0 siblings, 0 replies; 15+ messages in thread
From: Greg Banks @ 2006-07-04  9:09 UTC (permalink / raw)
  To: Neil Brown; +Cc: Linux NFS Mailing List

On Tue, 2006-07-04 at 18:36, Neil Brown wrote:
> On Tuesday July 4, gnb@melbourne.sgi.com wrote:
> > Then there's the type-punned pointer warning.  I hate those.
> 
> Here is a trick that google helped me find.  I hope it isn't worse
> that the disease :-)

Looks fine.

> All in .git now, thanks.

Yay, no warnings ;-)

Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.



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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
  2006-07-03  0:22 nfs-utils 1.0.9-rc1 - hopefully -final in a week Neil Brown
  2006-07-03  7:33 ` Greg Banks
@ 2006-07-04 14:50 ` Shankar Anand
  2006-07-05  6:03   ` Neil Brown
       [not found] ` <1151901993.3932.18.camel@localhost.localdomain>
  2006-07-07 11:13 ` Steve Dickson
  3 siblings, 1 reply; 15+ messages in thread
From: Shankar Anand @ 2006-07-04 14:50 UTC (permalink / raw)
  To: nfs, Neil Brown; +Cc: Kevin Coffman

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]

Hi,

>>> On 7/3/2006 at 5:52 AM, Neil Brown <neilb@suse.de> wrote:

> Hi,
>  I'd like to put out nfs-utils-1.0.9 by the end of the week.
> There is (or will soon be) a -pre1 in
>   http://www.kernel.org/pub/linux/utils/nfs/ 
> and
>   git://linux-nfs.org/nfs-utils
> 
> Recent changes can been seen at
>    http://linux-nfs.org/cgi-bin/gitweb.cgi?p=nfs-utils;a=log 
>   
> If anyone cares to do some testing that would be great.
> 
> If anyone has patches that are ready and that I haven't included,
now
> might be a good time to send them to me.
> 
> If they aren't quite ready, don't rush - I'd like to put out
> releases a little more often than once per year (which is what it
was
> a for a while) so there will be another chance in a month or two or
> three.

The patch attached here reads /proc/net/rpc/nfsd for nfsv4 server
statistics and displays them.

To maintain uniformity with older nfs versions operations 0 1 and 2
are also printed though they are not used by nfsv4.

Shankar


[-- Attachment #2: nfs-utils-1.0.8-display-nfs4-server-stats.diff --]
[-- Type: text/plain, Size: 2750 bytes --]

This patch adds code to nfsstat to read /proc/net/rpc/nfsd for nfsv4 server statistics and print them.

Submitted by: Shankar Anand <shanand@novell.com>

diff -aurp nfs-utils-1.0.8.old/utils/nfsstat/nfsstat.c nfs-utils-1.0.8/utils/nfsstat/nfsstat.c
--- nfs-utils-1.0.8.old/utils/nfsstat/nfsstat.c	2005-12-20 09:42:47.000000000 +0530
+++ nfs-utils-1.0.8/utils/nfsstat/nfsstat.c	2006-07-04 20:11:51.000000000 +0530
@@ -29,6 +29,7 @@ static unsigned int	svcv3info[24];	/* NF
 static unsigned int	cltv3info[24];	/* NFSv3 call counts ([0] == 22) */
 static unsigned int	svcv4info[4];	/* NFSv4 call counts ([0] == 2) */
 static unsigned int	cltv4info[34];	/* NFSv4 call counts ([0] == 32) */
+static unsigned int	svcv4opinfo[42];/* NFSv4 call counts ([0] == 40) */
 static unsigned int	svcnetinfo[5];	/* 0  # of received packets
 					 * 1  UDP packets
 					 * 2  TCP packets
@@ -99,6 +100,16 @@ static const char *	nfscltv4name[32] = {
 	"statfs",    "readlink",  "readdir", "server_caps", "delegreturn",
 };
 
+static const char *     nfssvrv4opname[40] = {
+        "op0-unused",   "op1-unused", "op2-future",  "access",     "close",       "commit",
+        "create",       "delegpurge", "delegreturn", "getattr",    "getfh",       "link",
+        "lock",         "lockt",      "locku",       "lookup",     "lookup_root", "nverify",
+        "open",         "openattr",   "open_conf",   "open_dgrd",  "putfh",       "putpubfh",
+        "putrootfh",    "read",       "readdir",     "readlink",   "remove",      "rename",
+        "renew",        "restorefh",  "savefh",      "secinfo",    "setattr",     "setcltid",
+        "setcltidconf", "verify",     "write",       "rellockowner"
+};
+
 typedef struct statinfo {
 	char		*tag;
 	int		nrvals;
@@ -115,6 +126,7 @@ static statinfo		svcinfo[] = {
 	{ "proc2",      STRUCTSIZE(svcv2info),  svcv2info  },
 	{ "proc3",      STRUCTSIZE(svcv3info),  svcv3info  },
 	{ "proc4",      STRUCTSIZE(svcv4info),  svcv4info  },
+	{ "proc4ops",   STRUCTSIZE(svcv4opinfo),svcv4opinfo},
 	{ NULL,         0,                      NULL       }
 };
 
@@ -381,11 +393,16 @@ main(int argc, char **argv)
 				"Server nfs v3:\n",
 				nfsv3name, svcv3info + 1, sizeof(nfsv3name)/sizeof(char *)
 				);
-			if ((opt_prt & PRNT_V4) || ((opt_prt & PRNT_AUTO) && svcv4info[0] && svcv4info[svcv4info[0]+1] != svcv4info[0]))
+			if ((opt_prt & PRNT_V4) || ((opt_prt & PRNT_AUTO) && svcv4info[0] && svcv4info[svcv4info[0]+1] != svcv4info[0])) {
 				print_callstats(
 				"Server nfs v4:\n",
 				nfssvrv4name, svcv4info + 1, sizeof(nfssvrv4name)/sizeof(char *)
 				);
+				print_callstats(
+				"Server nfs v4 operations:\n",
+				nfssvrv4opname, svcv4opinfo + 1, sizeof(nfssvrv4opname)/sizeof(char *)
+				);
+			}
 		}
 	}
 

[-- Attachment #3: Type: text/plain, Size: 299 bytes --]

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

[-- Attachment #4: Type: text/plain, Size: 140 bytes --]

_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
  2006-07-04 14:50 ` Shankar Anand
@ 2006-07-05  6:03   ` Neil Brown
  2006-07-05  6:19     ` Shankar Anand
  0 siblings, 1 reply; 15+ messages in thread
From: Neil Brown @ 2006-07-05  6:03 UTC (permalink / raw)
  To: Shankar Anand; +Cc: nfs, Kevin Coffman

On Tuesday July 4, shanand@novell.com wrote:
> 
> The patch attached here reads /proc/net/rpc/nfsd for nfsv4 server
> statistics and displays them.
> 
> To maintain uniformity with older nfs versions operations 0 1 and 2
> are also printed though they are not used by nfsv4.

Good..

> @@ -115,6 +126,7 @@ static statinfo		svcinfo[] = {
>  	{ "proc2",      STRUCTSIZE(svcv2info),  svcv2info  },
>  	{ "proc3",      STRUCTSIZE(svcv3info),  svcv3info  },
>  	{ "proc4",      STRUCTSIZE(svcv4info),  svcv4info  },
> +	{ "proc4ops",   STRUCTSIZE(svcv4opinfo),svcv4opinfo},
>  	{ NULL,         0,                      NULL       }
>  };
>  

As it is called 'proc4ops', does that mean it will apply to all
minor-versions, or do we expect a
	proc4.1ops

for NFSv4.1?  Or maybe proc4ops.1 ??

It doesn't really matter one way or the other, but I would like to
know that the issue has been considered, and to know what the current
decision is.

(Meanwhile, The current patch is in .git waiting for the 1.0.9
release).

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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
  2006-07-05  6:03   ` Neil Brown
@ 2006-07-05  6:19     ` Shankar Anand
  2006-07-05  7:06       ` Neil Brown
  0 siblings, 1 reply; 15+ messages in thread
From: Shankar Anand @ 2006-07-05  6:19 UTC (permalink / raw)
  To: Neil Brown; +Cc: bfields, , nfs, Kevin Coffman, J.BruceFields

Hi Neil,

>>> On 7/5/2006 at 11:33 AM,  Neil Brown <neilb@suse.de> wrote:
> On Tuesday July 4, shanand@novell.com wrote:
>> 
>> The patch attached here reads /proc/net/rpc/nfsd for nfsv4 server
>> statistics and displays them.
>> 
>> To maintain uniformity with older nfs versions operations 0 1 and 2
>> are also printed though they are not used by nfsv4.
> 
> Good..
> 
>> @@ -115,6 +126,7 @@ static statinfo		svcinfo[] = {
>>  	{ "proc2",      STRUCTSIZE(svcv2info),  svcv2info  },
>>  	{ "proc3",      STRUCTSIZE(svcv3info),  svcv3info  },
>>  	{ "proc4",      STRUCTSIZE(svcv4info),  svcv4info  },
>> +	{ "proc4ops",   STRUCTSIZE(svcv4opinfo),svcv4opinfo},
>>  	{ NULL,         0,                      NULL       }
>>  };
>>  
> 
> As it is called 'proc4ops', does that mean it will apply to all
> minor-versions, or do we expect a
> 	proc4.1ops
> 
> for NFSv4.1?  Or maybe proc4ops.1 ??
> 
> It doesn't really matter one way or the other, but I would like to
> know that the issue has been considered, and to know what the
current
> decision is.

Though the issue has not been discussed earlier on the mailing list,
my thought when I wrote the patch was that instead of creating 
new lines for each minor version (which may lead to confusion), 
we can add the additional procedures, if at all, to the same line. 

Anyway the server is going to have either nfs4 or nfs4.1 running at
one point in time. So it should be fine.

> (Meanwhile, The current patch is in .git waiting for the 1.0.9
> release).

Thanks.

Shankar

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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
  2006-07-05  6:19     ` Shankar Anand
@ 2006-07-05  7:06       ` Neil Brown
  0 siblings, 0 replies; 15+ messages in thread
From: Neil Brown @ 2006-07-05  7:06 UTC (permalink / raw)
  To: Shankar Anand; +Cc: bfields, J.BruceFields, nfs, Kevin Coffman

On Wednesday July 5, shanand@novell.com wrote:
> 
> Anyway the server is going to have either nfs4 or nfs4.1 running at
> one point in time. So it should be fine.
> 

I don't think that is true.
A server needs to support multiple versions - at least as an option,
just as we now support v2, v3, and v4.

But I suspect it is a question that can be safely left until it is a
real issue.

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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
       [not found]   ` <17579.22262.255903.309723@cse.unsw.edu.au>
@ 2006-07-06 17:32     ` Wendy Cheng
  0 siblings, 0 replies; 15+ messages in thread
From: Wendy Cheng @ 2006-07-06 17:32 UTC (permalink / raw)
  To: Neil Brown; +Cc: Lon Hohberger, nfs, steved

Neil Brown wrote:

>We can do another release in August if that turns out to be
>useful. 
>  
>

Ok, decided *not* to rush NLM lock failover into this - August schedule 
would be better. Thanks for the comments and helps we've received so far.

-- Wendy

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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
  2006-07-03  0:22 nfs-utils 1.0.9-rc1 - hopefully -final in a week Neil Brown
                   ` (2 preceding siblings ...)
       [not found] ` <1151901993.3932.18.camel@localhost.localdomain>
@ 2006-07-07 11:13 ` Steve Dickson
  2006-07-24  6:02   ` Neil Brown
  3 siblings, 1 reply; 15+ messages in thread
From: Steve Dickson @ 2006-07-07 11:13 UTC (permalink / raw)
  To: Neil Brown; +Cc: nfs

[-- Attachment #1: Type: text/plain, Size: 2417 bytes --]

Hey Neil,

Neil Brown wrote:
> Hi,
>  I'd like to put out nfs-utils-1.0.9 by the end of the week.
> There is (or will soon be) a -pre1 in
>   http://www.kernel.org/pub/linux/utils/nfs/
> and
>   git://linux-nfs.org/nfs-utils
> 
> Recent changes can been seen at
>    http://linux-nfs.org/cgi-bin/gitweb.cgi?p=nfs-utils;a=log
>   
> If anyone cares to do some testing that would be great.

Well using the nfs-utils-1.0.9-pre1 tarball from kernel.org
and the recent kernel patch set you posted here is what I found.

Starting and stopping nfsds did not kill neither the
TCP or UDP connections. There were two problems with this.
One, rpc.nfsd was incorrectly increasing nfsd_serv->sv_nrthreads
in nfsd_svc() by calling nfsd_create_serv(); (Note: another side effect
of this problem was only 7 nfsd process were start instead of 8)
So the solution I've come up with is to only  have nfsd_create_serv()
called when it needs to... basically:
     if (nfsd_serv == NULL) {
         error = nfsd_create_serv();
         if (error)
             goto out;
     }

The second problem was an oops that occurred when the sv_nrthreads was
incremented correctly... and Neil your going to love this one... ;-)

In svc_delete_socket(), sock_release() was being called with a
socket that was already closed... The socket was closed by the
previous sockfd_put() when svsk->sk_sock->file != NULL... So
the code changed from
     if (svsk->sk_sock->file)
         sockfd_put(svsk->sk_sock);
     sock_release(svsk->sk_sock);
to
     if (svsk->sk_sock->file)
         sockfd_put(svsk->sk_sock);
     else
         sock_release(svsk->sk_sock);

The reason Neil is going to love this is I asked him to
make this change because in my previous testing, the only
way I could get the connections to come down was to
always call sock_release() even after the fput() of the
file pointer... So it appears in Neil's rewrite, fput()
is actually doing the release which is how it should work...

Once I got the connections to come up and down as expected, I
noticed I could not turn off any versions...

In the patches I sent Neil, I had to reverse the order of when
nfssvc_setfds() and nfssvc_versbits() were called in rpc.nfsd.
But in Neil's patch it appears nfssvc_versbits() is expect
to be called before nfssvc_setfds(). After I switching the
order of those calls... things started to work as expected..

That patches are attached....

steved.


[-- Attachment #2: kernel-2.6.17-nfsd109.patch --]
[-- Type: text/x-patch, Size: 1191 bytes --]

Don't let rpc.nfsd incorrectly increase the nfsd_serv->sv_nrthreads
and stop sockets from being released twice by only calling sock_release()
on socket that don't have file pointer associated with them.


Signed-off-by: Steve Dickson <steved@redhat.com>
-------------------------

--- linux-2.6.17.i686/fs/nfsd/nfssvc.c.orig	2006-07-06 17:47:22.000000000 -0400
+++ linux-2.6.17.i686/fs/nfsd/nfssvc.c	2006-07-07 06:15:21.000000000 -0400
@@ -265,9 +265,11 @@ nfsd_svc(unsigned short port, int nrserv
 
 	nfsd_reset_versions();
 
-	error = nfsd_create_serv();
-	if (error)
-		goto out;
+	if (nfsd_serv == NULL) {
+		error = nfsd_create_serv();
+		if (error)
+			goto out;
+	}
 	error = nfsd_init_socks(port);
 	if (error)
 		goto failure;
--- linux-2.6.17.i686/net/sunrpc/svcsock.c.orig	2006-07-06 17:47:22.000000000 -0400
+++ linux-2.6.17.i686/net/sunrpc/svcsock.c	2006-07-07 05:41:04.000000000 -0400
@@ -1525,7 +1525,8 @@ svc_delete_socket(struct svc_sock *svsk)
 		spin_unlock_bh(&serv->sv_lock);
 		if (svsk->sk_sock->file)
 			sockfd_put(svsk->sk_sock);
-		sock_release(svsk->sk_sock);
+		else
+			sock_release(svsk->sk_sock);
 		kfree(svsk);
 	} else {
 		spin_unlock_bh(&serv->sv_lock);

[-- Attachment #3: nfs-utils-1.0.9-pre1-vers.patch --]
[-- Type: text/x-patch, Size: 669 bytes --]

nfssvc_versbits() has to be called before nfssvc_setfds()
for the version processing to work correctly

Signed-off-by: Steve Dickson <steved@redhat.com>
-------------------------

--- nfs-utils-1.0.9-pre1/support/nfs/nfssvc.c.orig	2006-07-02 20:02:03.000000000 -0400
+++ nfs-utils-1.0.9-pre1/support/nfs/nfssvc.c	2006-07-07 06:10:01.000000000 -0400
@@ -135,10 +135,10 @@ nfssvc(int port, int nrservs, unsigned i
 	struct nfsctl_arg	arg;
 	int fd;
 
-	nfssvc_setfds(port, protobits, haddr);
-
 	nfssvc_versbits(versbits);
 
+	nfssvc_setfds(port, protobits, haddr);
+
 	fd = open(NFSD_THREAD_FILE, O_WRONLY);
 	if (fd < 0)
 		fd = open("/proc/fs/nfs/threads", O_WRONLY);

[-- Attachment #4: Type: text/plain, Size: 299 bytes --]

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

[-- Attachment #5: Type: text/plain, Size: 140 bytes --]

_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: nfs-utils 1.0.9-rc1 - hopefully -final in a week
  2006-07-07 11:13 ` Steve Dickson
@ 2006-07-24  6:02   ` Neil Brown
  0 siblings, 0 replies; 15+ messages in thread
From: Neil Brown @ 2006-07-24  6:02 UTC (permalink / raw)
  To: Steve Dickson; +Cc: nfs

On Friday July 7, SteveD@redhat.com wrote:
> Hey Neil,
> 
> Neil Brown wrote:
> > Hi,
> >  I'd like to put out nfs-utils-1.0.9 by the end of the week.
> > There is (or will soon be) a -pre1 in
> >   http://www.kernel.org/pub/linux/utils/nfs/
> > and
> >   git://linux-nfs.org/nfs-utils
> > 
> > Recent changes can been seen at
> >    http://linux-nfs.org/cgi-bin/gitweb.cgi?p=nfs-utils;a=log
> >   
> > If anyone cares to do some testing that would be great.
> 
> Well using the nfs-utils-1.0.9-pre1 tarball from kernel.org
> and the recent kernel patch set you posted here is what I found.
> 
> Starting and stopping nfsds did not kill neither the
> TCP or UDP connections. There were two problems with this.
> One, rpc.nfsd was incorrectly increasing nfsd_serv->sv_nrthreads
> in nfsd_svc() by calling nfsd_create_serv(); (Note: another side effect
> of this problem was only 7 nfsd process were start instead of 8)
> So the solution I've come up with is to only  have nfsd_create_serv()
> called when it needs to... basically:
>      if (nfsd_serv == NULL) {
>          error = nfsd_create_serv();
>          if (error)
>              goto out;
>      }

Hmm.. There is room for confusion here as sv_nrthreads is used as a
general reference count, rather than just a count of the number of
threads.
This is why e.g. we do
	nrservs -= (nfsd_serv->sv_nrthreads-1);
to find out how much to change the number of threads by.  The '-1' is
because we are currently holding a non-thread reference.

I think the real problem was that nfsd_create_serv was doing
	nfsd_serv = svc_create(&nfsd_program, NFSD_BUFSIZE,
			       nfsd_last_thread);
	if (nfsd_serv == NULL)
		err = -ENOMEM;
	else
		nfsd_serv->sv_nrthreads++;

and as svc_create sets sv_nrthreads to 1, it end up as '2', even
though there is only one reference.
But I'll be sure to test this before submitting it.

> 
> The second problem was an oops that occurred when the sv_nrthreads was
> incremented correctly... and Neil your going to love this one... ;-)
> 
> In svc_delete_socket(), sock_release() was being called with a
> socket that was already closed... The socket was closed by the
> previous sockfd_put() when svsk->sk_sock->file != NULL... So
> the code changed from
>      if (svsk->sk_sock->file)
>          sockfd_put(svsk->sk_sock);
>      sock_release(svsk->sk_sock);
> to
>      if (svsk->sk_sock->file)
>          sockfd_put(svsk->sk_sock);
>      else
>          sock_release(svsk->sk_sock);
> 
> The reason Neil is going to love this is I asked him to
> make this change because in my previous testing, the only
> way I could get the connections to come down was to
> always call sock_release() even after the fput() of the
> file pointer... So it appears in Neil's rewrite, fput()
> is actually doing the release which is how it should work...

Yes.. I had a feeling I had missed up bit in fixing that all up once I
had figured out how it was meant to work.  Thanks for catching it.


> 
> Once I got the connections to come up and down as expected, I
> noticed I could not turn off any versions...
> 
> In the patches I sent Neil, I had to reverse the order of when
> nfssvc_setfds() and nfssvc_versbits() were called in rpc.nfsd.
> But in Neil's patch it appears nfssvc_versbits() is expect
> to be called before nfssvc_setfds(). After I switching the
> order of those calls... things started to work as expected..

Looks like I got that right in the released nfs-utils-1.0.9 - good.

Thanks,
NeilBrown

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2006-07-24  6:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-03  0:22 nfs-utils 1.0.9-rc1 - hopefully -final in a week Neil Brown
2006-07-03  7:33 ` Greg Banks
2006-07-04  0:40   ` Neil Brown
2006-07-04  4:17     ` Greg Banks
2006-07-04  7:47       ` Neil Brown
2006-07-04  7:56         ` Greg Banks
2006-07-04  8:36           ` Neil Brown
2006-07-04  9:09             ` Greg Banks
2006-07-04 14:50 ` Shankar Anand
2006-07-05  6:03   ` Neil Brown
2006-07-05  6:19     ` Shankar Anand
2006-07-05  7:06       ` Neil Brown
     [not found] ` <1151901993.3932.18.camel@localhost.localdomain>
     [not found]   ` <17579.22262.255903.309723@cse.unsw.edu.au>
2006-07-06 17:32     ` Wendy Cheng
2006-07-07 11:13 ` Steve Dickson
2006-07-24  6:02   ` Neil Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.