From: Jan Kara Date: Fri, 6 Jun 2014 06:06:37 +0000 (+1000) Subject: xfs: Fix rounding in xfs_alloc_fix_len() X-Git-Tag: omap-for-v3.16/fixes-against-rc1~55^2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30265117ee1e23fa91920f337a3ea91207f700dc;p=pandora-kernel.git xfs: Fix rounding in xfs_alloc_fix_len() Rounding in xfs_alloc_fix_len() is wrong. As the comment states, the result should be a number of a form (k*prod+mod) however due to sign mistake the result is different. As a result allocations on raid arrays could be misaligned in some cases. This also seems to fix occasional assertion failure: XFS_WANT_CORRUPTED_GOTO(rlen <= flen, error0) in xfs_alloc_ag_vextent_size(). Also add an assertion that the result of xfs_alloc_fix_len() is of expected form. Signed-off-by: Jan Kara Reviewed-by: Brian Foster Signed-off-by: Dave Chinner --- Reading git-diff-tree failed