Skip to contentSkip to conversation

__u32 -> __u64 in ba_resize_bmap() and blk_t -> blk64_t in ext2fs_check_desc()

PATCH In review Nick Dokos 2 participants 2 messages May 1, 2009 – May 4, 2009

lore
Share & tools
lore

Nick Dokos

author
#0 lore raw

PATCH 6/6 __u32 -> __u64 in ba_resize_bmap() and blk_t -> blk64_t in ext2fs_check_desc()

Both of these were found by code inspection while chasing the ext2fs_get_free_blocks2() problem. I have not seen a problem arising from them, but they look like bugs to me.

---
 lib/ext2fs/blkmap64_ba.c |    2 +-
 lib/ext2fs/check_desc.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
lib/ext2fs/blkmap64_ba.c +1 -1
index f7f7097..b9e0e90 100644
@@ -124,7 +124,7 @@ static errcode_t ba_resize_bmap(ext2fs_generic_bitmap64 bmap,
 	ext2fs_ba_private bp = (ext2fs_ba_private) bmap->private;
 	errcode_t	retval;
 	size_t		size, new_size;
-	__u32		bitno;
+	__u64		bitno;
 
 	/*
 	 * If we're expanding the bitmap, make sure all of the new
lib/ext2fs/check_desc.c +1 -1
index 6a969e0..e812c9f 100644
@@ -36,7 +36,7 @@ errcode_t ext2fs_check_desc(ext2_filsys fs)
 	dgrp_t i;
 	blk64_t first_block = fs->super->s_first_data_block;
 	blk64_t last_block = ext2fs_blocks_count(fs->super)-1;
-	blk_t blk, b;
+	blk64_t blk, b;
 	int j;
 
 	EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
Signature · 1 line
1.6.0.6
#1 lore raw
Quoted 39 lines · Nick Dokos

Both of these were found by code inspection while chasing the ext2fs_get_free_blocks2() problem. I have not seen a problem arising from them, but they look like bugs to me.

---
 lib/ext2fs/blkmap64_ba.c |    2 +-
 lib/ext2fs/check_desc.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
lib/ext2fs/blkmap64_ba.c +1 -1
index f7f7097..b9e0e90 100644
@@ -124,7 +124,7 @@ static errcode_t ba_resize_bmap(ext2fs_generic_bitmap64 bmap,
 	ext2fs_ba_private bp = (ext2fs_ba_private) bmap->private;
 	errcode_t	retval;
 	size_t		size, new_size;
-	__u32		bitno;
+	__u64		bitno;
 
 	/*
 	 * If we're expanding the bitmap, make sure all of the new
lib/ext2fs/check_desc.c +1 -1
index 6a969e0..e812c9f 100644
@@ -36,7 +36,7 @@ errcode_t ext2fs_check_desc(ext2_filsys fs)
 	dgrp_t i;
 	blk64_t first_block = fs->super->s_first_data_block;
 	blk64_t last_block = ext2fs_blocks_count(fs->super)-1;
-	blk_t blk, b;
+	blk64_t blk, b;
 	int j;
 
 	EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
Signature · 1 line
1.6.0.6

-VAL