From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q48EV72T184875 for ; Tue, 8 May 2012 09:31:09 -0500 Received: from bombadil.infradead.org (173-166-109-252-newengland.hfc.comcastbusiness.net [173.166.109.252]) by cuda.sgi.com with ESMTP id rf5hBCnbLCdNXCF3 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 08 May 2012 07:31:06 -0700 (PDT) Date: Tue, 8 May 2012 10:31:04 -0400 From: Christoph Hellwig Subject: Re: [PATCH] xfs: fix delalloc quota accounting on failure Message-ID: <20120508143104.GA15308@infradead.org> References: <1336474133-27732-1-git-send-email-david@fromorbit.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1336474133-27732-1-git-send-email-david@fromorbit.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Dave Chinner Cc: xfs@oss.sgi.com On Tue, May 08, 2012 at 08:48:53PM +1000, Dave Chinner wrote: > From: Dave Chinner > > 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? _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs