Jan Kara 30265117ee 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 <jack@suse.cz>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2014-06-06 16:06:37 +10:00
..
2013-05-07 18:45:36 -05:00
2014-03-07 16:19:14 +11:00
2013-11-06 16:31:27 -06:00
2013-05-07 18:45:36 -05:00
2011-08-12 16:21:35 -05:00
2011-08-12 16:21:35 -05:00
2012-11-19 20:11:24 -06:00
2013-08-12 16:53:39 -05:00
2014-06-06 16:04:42 +10:00
2014-06-06 16:02:12 +10:00
2014-06-06 16:02:12 +10:00
2014-06-06 16:02:12 +10:00
2012-11-19 20:11:24 -06:00
2011-08-12 16:21:35 -05:00
2014-06-06 16:02:12 +10:00
2014-02-27 15:21:07 +11:00
2011-08-12 16:21:35 -05:00
2014-06-06 16:02:12 +10:00
2013-09-12 16:13:41 -07:00
2012-05-14 16:20:54 -05:00
2011-08-12 16:21:35 -05:00
2014-04-01 23:19:15 -04:00
2013-08-12 16:56:06 -05:00
2014-02-27 15:21:07 +11:00
2014-06-06 16:02:12 +10:00
2013-05-07 18:45:36 -05:00
2014-06-06 16:02:12 +10:00
2014-01-06 13:50:06 -06:00
2012-10-17 12:01:25 -05:00
2013-11-06 12:41:51 -06:00
2013-12-04 14:11:05 -06:00
2013-05-07 18:45:36 -05:00