Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Feb 2012 00:17:17 +0700
From:      Adam Strohl <adams-freebsd@ateamsystems.com>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Kirk McKusick <mckusick@mckusick.com>, FreeBSD-Stable ML <freebsd-stable@freebsd.org>
Subject:   Re: FreeBSD 9: Group quotas increase but don't decrease automatically
Message-ID:  <4F300B1D.9080809@ateamsystems.com>
In-Reply-To: <20120203144848.GX3283@deviant.kiev.zoral.com.ua>
References:  <4F2BD37E.70209@ateamsystems.com> <20120203144848.GX3283@deviant.kiev.zoral.com.ua>

index | next in thread | previous in thread | raw e-mail

On 2/3/2012 21:48, Konstantin Belousov wrote:
> This is a bug in +J code (even if you do not use +J). Do you have
> softupdates enabled on the volume ? If yes, try the following patch.
>
> diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
> index 5b4b6b9..ed2db79 100644
> --- a/sys/ufs/ffs/ffs_softdep.c
> +++ b/sys/ufs/ffs/ffs_softdep.c
> @@ -43,6 +43,7 @@
>   __FBSDID("$FreeBSD$");
>
>   #include "opt_ffs.h"
> +#include "opt_quota.h"
>   #include "opt_ddb.h"
>
>   /*
> @@ -6428,7 +6429,7 @@ softdep_setup_freeblocks(ip, length, flags)
>   	}
>   #ifdef QUOTA
>   	/* Reference the quotas in case the block count is wrong in the end. */
> -	quotaref(vp, freeblks->fb_quota);
> +	quotaref(ITOV(ip), freeblks->fb_quota);
>   	(void) chkdq(ip, -datablocks, NOCRED, 0);
>   #endif
>   	freeblks->fb_chkcnt = -datablocks;

Bingo, this fixes the issue for me!  Testing it out on one machine now 
and will push it out to the others gradually ... thanks!


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F300B1D.9080809>