[PATCH] xfs: fix delalloc quota accounting on failure
Christoph Hellwig
hch at infradead.org
Tue May 8 09:31:04 CDT 2012
On Tue, May 08, 2012 at 08:48:53PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
>
> xfstest 270 was causing quota reservations way beyond what was sane
> (ten to hundreds of TB) for a 4GB filesystem. There's a sign problem
> in the error handling path of xfs_bmapi_reserve_delalloc() because
> xfs_trans_unreserve_quota_nblks() simple negates the value passed -
> which doesn't work for an unsigned variable. This causes
> reservations of close to 2^32 block instead of removing a
> reservation of a handful of blocks.
>
> Fix the same problem in the other xfs_trans_unreserve_quota_nblks()
> callers where unsigned integer variables are used, too.
eww. Wouldn't it be better to make handle that inside
xfs_trans_unreserve_quota_nblks?
More information about the xfs
mailing list