Release of 2.0.7 due soon (quotas)

Norbert Püschel Pueschel.Norbert at Walzbarren-VAW.ne.uunet.de
Mon Apr 10 13:24:45 GMT 2000



David Lee schrieb:
> 
> On Sat, 8 Apr 2000, Jeremy Allison wrote:
> 
> > Norbert Püschel wrote:
> > >
> > >
> > > There is a long standing bug in Solaris quota handling: If the soft
> > > quota is zero,
> > > you need to check the hard quota instead. This bug may affect other
> > > systems as well.
> >
> > Thanks for that fix, but I need to confirm it before including
> > in the 2.0.7 source.
> >
> > Can someone with access to Solaris confirm that the soft
> > quota being zero means check hard quota ?
> 
> To confirm:
> 
> I then applied Norbert's patch.  Now if the soft limit is zero, the PC
> Properties show reasonable figures: very similar to the "soft"-based
> figures, just slightly higher, being the "hard"-based figures.  This
> is (in my view) much better than the old behaviour of falling back to the
> order(gigabyte) figures.
> 
> Count this as a vote for Norbert's patch.

Thanks.

> 
> Also:
> 
> o  The new Veritas quotas code is very similar.  Indeed, it was originally
>    cloned from the Solaris code.  This functionality would be highly
>    desirable there, too.

Oops, you are right. Below is a new version of the patch. I added the
check to
all systems which have those two lines:

if (D.dqb_bsoftlimit==0)
  return(False);

> 
> o  Various other systems may benefit from similar attention: skim-reading
>    the source suggests OSF1, FreeBDS/OpenBSD

I agree.

> 
> o  Assuming the LINUX code is correct, the IRIX code seems similar but
>    I think may have a bug.

I agree with this too.

> 
> I don't have any of those non-Solaris versions, so cannot test.  I have
> the Veritas version.  It is in major user-service, so I cannot do many
> tests, but we could do one or perhaps two.  Any thoughts, Jeremy?

I have been using a version of this patch for 2.0.6 for a while with ufs
and 
Veritas File System without problems.

Bye,
  Norbert Pueschel
-- 
Norbert Pueschel            Koblenzer Str. 122
Dipl.-Inf.                  D-41415 Neuss
EDV-Projekte                Telefon: 02131/382-512
Geschaeftsfeld Walzbarren   Telefax: 02131/382-694
-------------- next part --------------
*** quotas.c.orig	Mon Apr 10 15:11:48 2000
--- quotas.c	Mon Apr 10 15:19:46 2000
***************
*** 367,373 ****
--- 367,378 ----
      return(False);
    }
  
+   /* If softlimit is zero, set it equal to hardlimit.
+    */
  
+   if (D.dqb_bsoftlimit==0)
+     D.dqb_bsoftlimit = D.dqb_bhardlimit;
+ 
    /* Use softlimit to determine disk space. A user exceeding the quota is told
     * that there's no space left. Writes might actually work for a bit if the
     * hardlimit is set higher than softlimit. Effectively the disk becomes
***************
*** 436,441 ****
--- 441,452 ----
           return (False);  
    }
  
+   /* If softlimit is zero, set it equal to hardlimit.
+    */
+ 
+   if (D.dqb_bsoftlimit==0)
+     D.dqb_bsoftlimit = D.dqb_bhardlimit;
+ 
    /* Use softlimit to determine disk space, except when it has been exceeded */
  
    if (D.dqb_bsoftlimit==0)
***************
*** 666,672 ****
--- 677,690 ----
  	}
        else return(False);
      }
+ 
+   /* If softlimit is zero, set it equal to hardlimit.
+    */
+ 
    if (D.dqb_bsoftlimit==0)
+     D.dqb_bsoftlimit = D.dqb_bhardlimit;
+ 
+   if (D.dqb_bsoftlimit==0)
      return(False);
    /* Use softlimit to determine disk space, except when it has been exceeded */
    if ((D.dqb_curblocks>D.dqb_bsoftlimit)
***************
*** 762,767 ****
--- 780,791 ----
      return(False);
    }
  
+   /* If softlimit is zero, set it equal to hardlimit.
+    */
+ 
+   if (D.dqb_bsoftlimit==0)
+     D.dqb_bsoftlimit = D.dqb_bhardlimit;
+ 
    /* Use softlimit to determine disk space. A user exceeding the quota is told
     * that there's no space left. Writes might actually work for a bit if the
     * hardlimit is set higher than softlimit. Effectively the disk becomes


More information about the samba-technical mailing list