Re: [PATCH 05/14] xfs: create deferred log items for file mapping exchanges

Christoph Hellwig
2024-02-28T22:08:53Z

On Wed, Feb 28, 2024 at 11:55:32AM -0800, Darrick J. Wong wrote:
> static inline bool
> xmi_can_merge_all(
> const struct xfs_bmbt_irec *l,
> const struct xfs_bmbt_irec *m,
> const struct xfs_bmbt_irec *r)
> {
> xfs_filblks_t new_len;
>
> new_len = l->br_blockcount + m->br_blockcount + r->br_blockcount;
> return new_len <= XFS_MAX_BMBT_EXTLEN;
> }

Dumb question: can the addition overflow?