From: Nathan Scott Date: Wed, 12 Sep 2001 22:29:43 +0000 (+0000) Subject: sync MIN/MAX type casting changes with corresponding kernel change. X-Git-Tag: v2.0.0~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7dcc1612fbb2d928ec287213ab03f80732ce57a0;p=thirdparty%2Fxfsprogs-dev.git sync MIN/MAX type casting changes with corresponding kernel change. --- diff --git a/include/xfs_ag.h b/include/xfs_ag.h index be0ddcef1..f85091111 100644 --- a/include/xfs_ag.h +++ b/include/xfs_ag.h @@ -257,8 +257,8 @@ int xfs_min_freelist_pag(xfs_perag_t *pag, struct xfs_mount *mp); #define XFS_MIN_FREELIST_PAG(pag,mp) xfs_min_freelist_pag(pag,mp) #else #define XFS_MIN_FREELIST_PAG(pag,mp) \ - XFS_MIN_FREELIST_RAW((pag)->pagf_levels[XFS_BTNUM_BNOi], \ - (pag)->pagf_levels[XFS_BTNUM_CNTi], mp) + XFS_MIN_FREELIST_RAW((uint_t)(pag)->pagf_levels[XFS_BTNUM_BNOi], \ + (uint_t)(pag)->pagf_levels[XFS_BTNUM_CNTi], mp) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MIN_FREELIST_RAW) int xfs_min_freelist_raw(int bl, int cl, struct xfs_mount *mp); diff --git a/include/xfs_trans.h b/include/xfs_trans.h index 8153f8aeb..7db2821f5 100644 --- a/include/xfs_trans.h +++ b/include/xfs_trans.h @@ -675,7 +675,7 @@ typedef struct xfs_trans { (mp)->m_sb.sb_sectsize + \ (mp)->m_sb.sb_sectsize + \ XFS_FSB_TO_B((mp), 1) + \ - MAX(XFS_FSB_TO_B((mp), 1), XFS_INODE_CLUSTER_SIZE(mp)) + \ + MAX((__uint16_t)XFS_FSB_TO_B((mp), 1), XFS_INODE_CLUSTER_SIZE(mp)) + \ (128 * 5)) #define XFS_IFREE_LOG_RES(mp) ((mp)->m_reservations.tr_ifree) diff --git a/libxfs/xfs_mount.c b/libxfs/xfs_mount.c index 61ab1ee77..4d54373b0 100644 --- a/libxfs/xfs_mount.c +++ b/libxfs/xfs_mount.c @@ -93,7 +93,8 @@ xfs_mount_common(xfs_mount_t *mp, xfs_sb_t *sbp) } mp->m_bsize = XFS_FSB_TO_BB(mp, 1); - mp->m_ialloc_inos = (int)MAX(XFS_INODES_PER_CHUNK, sbp->sb_inopblock); + mp->m_ialloc_inos = (int)MAX((__uint16_t)XFS_INODES_PER_CHUNK, + sbp->sb_inopblock); mp->m_ialloc_blks = mp->m_ialloc_inos >> sbp->sb_inopblog; }