NFS quotas panic when NFS server has no rquotad

David Lee T.D.Lee at durham.ac.uk
Mon Apr 30 14:22:41 GMT 2001


On Mon, 30 Apr 2001, Michael Gerdts wrote:

> On Mon, Apr 30, 2001 at 10:26:10AM +0100, David Lee wrote:
> > Please could I encourage Mike's request to be addressed?
> 
> It looks as though a very close relative of this was committed by Jeremy in
> revision 1.34.4.7 of quotas.c.  I have not yet tested it, but will before 
> 2.2.1 is released (assuming that I hear about 2.2.1 beta).

Good.  Thanks.  I hope to try it soon.

There is a remaining (though less severe) problem.

Compilation, of whichever version, gives:

   quotas.c:270: warning: static declaration for `xdr_getquota_args' follows non-static
   quotas.c:279: warning: static declaration for `xdr_getquota_rslt' follows non-static

The prototypes in "/usr/include/rpcsvc/rquota.h", checked for both
Solaris 2.6 and Solaris 8, are:

   extern  bool_t xdr_getquota_args(XDR *, getquota_args*);
   extern  bool_t xdr_getquota_rslt(XDR *, getquota_rslt*);

whereas the Samba file "smbd/quotas.c" has:
   static int xdr_getquota_args( ... )
   static int xdr_getquota_rslt( ... )

So I think we may benefit from a patch such as:
======================= snip =======================
--- quotas-2.2.0.c      Mon Apr 30 15:00:17 2001
+++ quotas.c+   Mon Apr 30 15:07:08 2001
@@ -266,7 +266,7 @@
 
 static int quotastat;
 
-static int xdr_getquota_args(XDR *xdrsp, struct getquota_args *args)
+bool_t xdr_getquota_args(XDR *xdrsp, struct getquota_args *args)
 {
        if (!xdr_string(xdrsp, &args->gqa_pathp, RQ_PATHLEN ))
                return(0);
@@ -275,7 +275,7 @@
        return (1);
 }
 
-static int xdr_getquota_rslt(XDR *xdrsp, struct getquota_rslt *gqr)
+bool_t xdr_getquota_rslt(XDR *xdrsp, struct getquota_rslt *gqr)
 {
        if (!xdr_int(xdrsp, &quotastat)) {
                DEBUG(6,("nfs_quotas: Status bad or zero\n"));
======================= snip =======================

Hope this helps.

-- 

:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:  http://www.dur.ac.uk/t.d.lee/            South Road            :
:                                           Durham                :
:  Phone: +44 191 374 2882                  U.K.                  :





More information about the samba-technical mailing list