[Top] [All Lists]

Re: [PATCH] xfs: fix delalloc quota accounting on failure

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: fix delalloc quota accounting on failure
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 8 May 2012 10:31:04 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1336474133-27732-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1336474133-27732-1-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, May 08, 2012 at 08:48:53PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 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

<Prev in Thread] Current Thread [Next in Thread>