[PATCH] xfs: prevent 32bit overflow in space reservation
Christoph Hellwig
hch at infradead.org
Thu Sep 2 07:16:31 CDT 2010
On Thu, Sep 02, 2010 at 03:17:43PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
>
> If we attempt to preallocate more than 2^32 blocks of space in a
> single syscall, the transaction block reservation will overflow
> leading to a hangs in the superblock block accounting code. This
> is trivially reproduced with xfs_io. Fix the problem by capping the
> allocation reservation to the maximum number of blocks a single
> xfs_bmapi() call can allocate (2^21 blocks).
>
> Signed-off-by: Dave Chinner <dchinner at redhat.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch at lst.de>
More information about the xfs
mailing list