Re: [PATCH V7 03/17] xfs: Use xfs_extnum_t instead of basic data types

Dave Chinner
2022-03-04T01:30:36Z

On Fri, Mar 04, 2022 at 11:59:34AM +1100, Dave Chinner wrote:
> On Tue, Mar 01, 2022 at 04:09:24PM +0530, Chandan Babu R wrote:
> > xfs_extnum_t is the type to use to declare variables which have values
> > obtained from xfs_dinode->di_[a]nextents. This commit replaces basic
> > types (e.g. uint32_t) with xfs_extnum_t for such variables.
> >
> > Reviewed-by: Darrick J. Wong <djwong@kernel.org>
> > Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
> > ---
> > fs/xfs/libxfs/xfs_bmap.c | 2 +-
> > fs/xfs/libxfs/xfs_inode_buf.c | 2 +-
> > fs/xfs/libxfs/xfs_inode_fork.c | 2 +-
> > fs/xfs/scrub/inode.c | 2 +-
> > fs/xfs/xfs_trace.h | 2 +-
> > 5 files changed, 5 insertions(+), 5 deletions(-)
>
> Nice little cleanup.
>
> Reviewed-by: Dave Chinner <dchinner@redhat.com>
>
> Something to think about for a followup - how do we ensure we catch
> this sort type mismatch in future as it could end up with overflow
> bugs?

Ah, never mind, later patches in the series look to address this...

Cheers,

Dave.

--
Dave Chinner
david@fromorbit.com