[PATCH 3/5] xfs: prevent extsize alignment from exceeding maximum extent size
Christoph Hellwig
hch at infradead.org
Mon Jan 24 03:04:59 CST 2011
> + /*
> + * make sure we don't exceed a single
> + * extent length when we align the
> + * extent by reducing length we are
> + * going to allocate by the maximum
> + * amount extent size aligment may
> + * require.
> + alen = (xfs_extlen_t)XFS_FILBLKS_MIN(
> + len,
> + MAXEXTLEN - (2 * extsz - 1));
> + */
This essentially just adds a comment, given that the new code is inside
the bracing. Also the xfs_extlen_t cast seems pointless. The C type
promotion rules do just fine for going down from a 64bit type to a 32bit
one, as long as the results fit into the latter - which they always do
here.
More information about the xfs
mailing list