From 601e76620f9200a444e343b4f81a7fed84f126f0 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Fri, 27 Jun 2003 00:50:25 +0000 Subject: [PATCH] Fix botched cast in xfs_repair superblock size checks --- doc/CHANGES | 1 + repair/sb.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/CHANGES b/doc/CHANGES index ba6c1560b..10076c954 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -5,6 +5,7 @@ xfsprogs-2.5.2 (25 June 2003) for work-in-progress on xfs_repair and xfs_copy. - Fix missing initialisation of stripe unit/width alignment information during libxfs_mount. + - Fix botched repair typecast for multi-terabyte filesystems. xfsprogs-2.5.1 (23 June 2003) - Fix libdisk device driver (volume managers) detection code diff --git a/repair/sb.c b/repair/sb.c index ef9e03526..4924dc3f4 100644 --- a/repair/sb.c +++ b/repair/sb.c @@ -276,9 +276,9 @@ verify_sb(xfs_sb_t *sb, int is_primary_sb) if (sb->sb_dblocks == 0 || sb->sb_dblocks > - (__uint64_t)(sb->sb_agcount * sb->sb_agblocks) || + ((__uint64_t)sb->sb_agcount * sb->sb_agblocks) || sb->sb_dblocks < - (__uint64_t)((sb->sb_agcount - 1) * sb->sb_agblocks + ((__uint64_t)(sb->sb_agcount - 1) * sb->sb_agblocks + XFS_MIN_AG_BLOCKS)) return(XR_BAD_FS_SIZE_DATA); -- 2.47.2