xfs: fix the extent count when allocating an new indirection array entry
authorJie Liu <jeff.liu@oracle.com>
Fri, 25 Oct 2013 06:52:44 +0000 (14:52 +0800)
committerBen Myers <bpm@sgi.com>
Thu, 31 Oct 2013 21:43:19 +0000 (16:43 -0500)
At xfs_iext_add(), if extent(s) are being appended to the last page in
the indirection array and the new extent(s) don't fit in the page, the
number of extents(erp->er_extcount) in a new allocated entry should be
the minimum value between count and XFS_LINEAR_EXTS, instead of count.

For now, there is no existing test case can demonstrates a problem with
the er_extcount being set incorrectly here, but it obviously like a bug.

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>

No differences found