* [RFC][15/21]e2fsprogs modify variables for bitmap to exceed 2G
@ 2006-04-13 7:12 sho
2006-04-13 16:20 ` [Ext2-devel] " Theodore Ts'o
0 siblings, 1 reply; 7+ messages in thread
From: sho @ 2006-04-13 7:12 UTC (permalink / raw)
To: Ext2-devel, linux-kernel
Summary of this patch:
[15/21] change the type of variables which manipulate bitmap
- Change the type of 4byte variables manipulating bitmap
from signed to unsigned.
Signed-off-by: Takashi Sato sho@tnes.nec.co.jp
---
diff -upNr e2fsprogs-1.39/e2fsck/pass5.c e2fsprogs-1.39.tmp/e2fsck/pass5.c
--- e2fsprogs-1.39/e2fsck/pass5.c 2005-09-06 18:40:14.000000000 +0900
+++ e2fsprogs-1.39.tmp/e2fsck/pass5.c 2006-04-12 13:27:56.000000000 +0900
@@ -502,13 +502,13 @@ static void check_inode_end(e2fsck_t ctx
static void check_block_end(e2fsck_t ctx)
{
ext2_filsys fs = ctx->fs;
- blk_t end, save_blocks_count, i;
+ blk64_t end, save_blocks_count, i;
struct problem_context pctx;
clear_problem_context(&pctx);
end = fs->block_map->start +
- (EXT2_BLOCKS_PER_GROUP(fs->super) * fs->group_desc_count) - 1;
+ (EXT2_BLOCKS_PER_GROUP(fs->super) * (__u64)fs->group_desc_count) - 1;
pctx.errcode = ext2fs_fudge_block_bitmap_end(fs->block_map, end,
&save_blocks_count);
if (pctx.errcode) {
diff -upNr e2fsprogs-1.39/lib/ext2fs/bitmaps.c e2fsprogs-1.39.tmp/lib/ext2fs/bitmaps.c
--- e2fsprogs-1.39/lib/ext2fs/bitmaps.c 2005-09-06 18:40:14.000000000 +0900
+++ e2fsprogs-1.39.tmp/lib/ext2fs/bitmaps.c 2006-04-12 13:27:56.000000000 +0900
@@ -27,7 +27,7 @@
#include "ext2_fs.h"
#include "ext2fs.h"
-static errcode_t make_bitmap(__u32 start, __u32 end, __u32 real_end,
+static errcode_t make_bitmap(__u32 start, __u32 end, __u64 real_end,
const char *descr, char *init_map,
ext2fs_generic_bitmap *ret)
{
@@ -74,7 +74,7 @@ static errcode_t make_bitmap(__u32 start
errcode_t ext2fs_allocate_generic_bitmap(__u32 start,
__u32 end,
- __u32 real_end,
+ __u64 real_end,
const char *descr,
ext2fs_generic_bitmap *ret)
{
@@ -143,7 +143,8 @@ errcode_t ext2fs_allocate_block_bitmap(e
{
ext2fs_block_bitmap bitmap;
errcode_t retval;
- __u32 start, end, real_end;
+ __u32 start, end;
+ __u64 real_end;
EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
@@ -151,7 +152,7 @@ errcode_t ext2fs_allocate_block_bitmap(e
start = fs->super->s_first_data_block;
end = fs->super->s_blocks_count-1;
- real_end = (EXT2_BLOCKS_PER_GROUP(fs->super)
+ real_end = ((__u64)EXT2_BLOCKS_PER_GROUP(fs->super)
* fs->group_desc_count)-1 + start;
retval = ext2fs_allocate_generic_bitmap(start, end, real_end,
@@ -181,7 +182,7 @@ errcode_t ext2fs_fudge_inode_bitmap_end(
}
errcode_t ext2fs_fudge_block_bitmap_end(ext2fs_block_bitmap bitmap,
- blk_t end, blk_t *oend)
+ blk64_t end, blk64_t *oend)
{
EXT2_CHECK_MAGIC(bitmap, EXT2_ET_MAGIC_BLOCK_BITMAP);
diff -upNr e2fsprogs-1.39/lib/ext2fs/bitops.c e2fsprogs-1.39.tmp/lib/ext2fs/bitops.c
--- e2fsprogs-1.39/lib/ext2fs/bitops.c 2005-09-06 18:40:14.000000000 +0900
+++ e2fsprogs-1.39.tmp/lib/ext2fs/bitops.c 2006-04-12 13:27:56.000000000 +0900
@@ -66,26 +66,26 @@ int ext2fs_test_bit(unsigned int nr, con
#endif /* !_EXT2_HAVE_ASM_BITOPS_ */
-void ext2fs_warn_bitmap(errcode_t errcode, unsigned long arg,
+void ext2fs_warn_bitmap(errcode_t errcode, unsigned long long arg,
const char *description)
{
#ifndef OMIT_COM_ERR
if (description)
- com_err(0, errcode, "#%lu for %s", arg, description);
+ com_err(0, errcode, "#%llu for %s", arg, description);
else
- com_err(0, errcode, "#%lu", arg);
+ com_err(0, errcode, "#%llu", arg);
#endif
}
void ext2fs_warn_bitmap2(ext2fs_generic_bitmap bitmap,
- int code, unsigned long arg)
+ int code, unsigned long long arg)
{
#ifndef OMIT_COM_ERR
if (bitmap->description)
com_err(0, bitmap->base_error_code+code,
- "#%lu for %s", arg, bitmap->description);
+ "#%llu for %s", arg, bitmap->description);
else
- com_err(0, bitmap->base_error_code + code, "#%lu", arg);
+ com_err(0, bitmap->base_error_code + code, "#%llu", arg);
#endif
}
diff -upNr e2fsprogs-1.39/lib/ext2fs/bitops.h e2fsprogs-1.39.tmp/lib/ext2fs/bitops.h
--- e2fsprogs-1.39/lib/ext2fs/bitops.h 2006-03-30 02:51:53.000000000 +0900
+++ e2fsprogs-1.39.tmp/lib/ext2fs/bitops.h 2006-04-12 13:28:14.000000000 +0900
@@ -52,15 +52,15 @@ extern const char *ext2fs_inode_string;
extern const char *ext2fs_mark_string;
extern const char *ext2fs_unmark_string;
extern const char *ext2fs_test_string;
-extern void ext2fs_warn_bitmap(errcode_t errcode, unsigned long arg,
+extern void ext2fs_warn_bitmap(errcode_t errcode, unsigned long long arg,
const char *description);
extern void ext2fs_warn_bitmap2(ext2fs_generic_bitmap bitmap,
- int code, unsigned long arg);
+ int code, unsigned long long arg);
-extern int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block);
+extern int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap, blk64_t block);
extern int ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
- blk_t block);
-extern int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block);
+ blk64_t block);
+extern int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap, blk64_t block);
extern int ext2fs_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode);
extern int ext2fs_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap,
@@ -68,11 +68,11 @@ extern int ext2fs_unmark_inode_bitmap(ex
extern int ext2fs_test_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode);
extern void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap,
- blk_t block);
+ blk64_t block);
extern void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
- blk_t block);
+ blk64_t block);
extern int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap,
- blk_t block);
+ blk64_t block);
extern void ext2fs_fast_mark_inode_bitmap(ext2fs_inode_bitmap bitmap,
ext2_ino_t inode);
@@ -86,24 +86,24 @@ extern blk_t ext2fs_get_block_bitmap_end
extern ext2_ino_t ext2fs_get_inode_bitmap_end(ext2fs_inode_bitmap bitmap);
extern void ext2fs_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
- blk_t block, int num);
+ blk64_t block, int num);
extern void ext2fs_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
- blk_t block, int num);
+ blk64_t block, int num);
extern int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap,
- blk_t block, int num);
+ blk64_t block, int num);
extern void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
- blk_t block, int num);
+ blk64_t block, int num);
extern void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
- blk_t block, int num);
+ blk64_t block, int num);
extern int ext2fs_fast_test_block_bitmap_range(ext2fs_block_bitmap bitmap,
- blk_t block, int num);
+ blk64_t block, int num);
extern void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map);
/* These two routines moved to gen_bitmap.c */
extern int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap,
- __u32 bitno);
+ __u64 bitno);
extern int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap,
- blk_t bitno);
+ blk64_t bitno);
/*
* The inline routines themselves...
*
@@ -391,10 +391,10 @@ _INLINE_ int ext2fs_find_next_bit_set (v
#endif
_INLINE_ int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap,
- blk_t bitno);
+ blk64_t bitno);
_INLINE_ int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap,
- blk_t bitno)
+ blk64_t bitno)
{
if ((bitno < bitmap->start) || (bitno > bitmap->end)) {
ext2fs_warn_bitmap2(bitmap, EXT2FS_TEST_ERROR, bitno);
@@ -404,7 +404,7 @@ _INLINE_ int ext2fs_test_generic_bitmap(
}
_INLINE_ int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap,
- blk_t block)
+ blk64_t block)
{
return ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap)
bitmap,
@@ -412,14 +412,14 @@ _INLINE_ int ext2fs_mark_block_bitmap(ex
}
_INLINE_ int ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
- blk_t block)
+ blk64_t block)
{
return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap,
block);
}
_INLINE_ int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap,
- blk_t block)
+ blk64_t block)
{
return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap,
block);
@@ -447,7 +447,7 @@ _INLINE_ int ext2fs_test_inode_bitmap(ex
}
_INLINE_ void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap,
- blk_t block)
+ blk64_t block)
{
#ifdef EXT2FS_DEBUG_FAST_OPS
if ((block < bitmap->start) || (block > bitmap->end)) {
@@ -460,7 +460,7 @@ _INLINE_ void ext2fs_fast_mark_block_bit
}
_INLINE_ void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
- blk_t block)
+ blk64_t block)
{
#ifdef EXT2FS_DEBUG_FAST_OPS
if ((block < bitmap->start) || (block > bitmap->end)) {
@@ -473,7 +473,7 @@ _INLINE_ void ext2fs_fast_unmark_block_b
}
_INLINE_ int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap,
- blk_t block)
+ blk64_t block)
{
#ifdef EXT2FS_DEBUG_FAST_OPS
if ((block < bitmap->start) || (block > bitmap->end)) {
@@ -545,7 +545,7 @@ _INLINE_ ext2_ino_t ext2fs_get_inode_bit
}
_INLINE_ int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap,
- blk_t block, int num)
+ blk64_t block, int num)
{
int i;
@@ -562,7 +562,7 @@ _INLINE_ int ext2fs_test_block_bitmap_ra
}
_INLINE_ int ext2fs_fast_test_block_bitmap_range(ext2fs_block_bitmap bitmap,
- blk_t block, int num)
+ blk64_t block, int num)
{
int i;
@@ -581,7 +581,7 @@ _INLINE_ int ext2fs_fast_test_block_bitm
}
_INLINE_ void ext2fs_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
- blk_t block, int num)
+ blk64_t block, int num)
{
int i;
@@ -595,7 +595,7 @@ _INLINE_ void ext2fs_mark_block_bitmap_r
}
_INLINE_ void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
- blk_t block, int num)
+ blk64_t block, int num)
{
int i;
@@ -611,7 +611,7 @@ _INLINE_ void ext2fs_fast_mark_block_bit
}
_INLINE_ void ext2fs_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
- blk_t block, int num)
+ blk64_t block, int num)
{
int i;
@@ -626,7 +626,7 @@ _INLINE_ void ext2fs_unmark_block_bitmap
}
_INLINE_ void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
- blk_t block, int num)
+ blk64_t block, int num)
{
int i;
diff -upNr e2fsprogs-1.39/lib/ext2fs/ext2fs.h e2fsprogs-1.39.tmp/lib/ext2fs/ext2fs.h
--- e2fsprogs-1.39/lib/ext2fs/ext2fs.h 2006-03-19 08:58:00.000000000 +0900
+++ e2fsprogs-1.39.tmp/lib/ext2fs/ext2fs.h 2006-04-12 13:27:56.000000000 +0900
@@ -102,7 +102,7 @@ struct ext2fs_struct_generic_bitmap {
errcode_t magic;
ext2_filsys fs;
__u32 start, end;
- __u32 real_end;
+ __u64 real_end;
char * description;
char * bitmap;
errcode_t base_error_code;
@@ -545,7 +545,7 @@ extern errcode_t ext2fs_read_inode_bitma
extern errcode_t ext2fs_read_block_bitmap(ext2_filsys fs);
extern errcode_t ext2fs_allocate_generic_bitmap(__u32 start,
__u32 end,
- __u32 real_end,
+ __u64 real_end,
const char *descr,
ext2fs_generic_bitmap *ret);
extern errcode_t ext2fs_allocate_block_bitmap(ext2_filsys fs,
@@ -557,7 +557,7 @@ extern errcode_t ext2fs_allocate_inode_b
extern errcode_t ext2fs_fudge_inode_bitmap_end(ext2fs_inode_bitmap bitmap,
ext2_ino_t end, ext2_ino_t *oend);
extern errcode_t ext2fs_fudge_block_bitmap_end(ext2fs_block_bitmap bitmap,
- blk_t end, blk_t *oend);
+ blk64_t end, blk64_t *oend);
extern void ext2fs_clear_inode_bitmap(ext2fs_inode_bitmap bitmap);
extern void ext2fs_clear_block_bitmap(ext2fs_block_bitmap bitmap);
extern errcode_t ext2fs_read_bitmaps(ext2_filsys fs);
@@ -914,11 +914,11 @@ extern errcode_t ext2fs_create_resize_in
/* rs_bitmap.c */
extern errcode_t ext2fs_resize_generic_bitmap(__u32 new_end,
- __u32 new_real_end,
+ __u64 new_real_end,
ext2fs_generic_bitmap bmap);
extern errcode_t ext2fs_resize_inode_bitmap(__u32 new_end, __u32 new_real_end,
ext2fs_inode_bitmap bmap);
-extern errcode_t ext2fs_resize_block_bitmap(__u32 new_end, __u32 new_real_end,
+extern errcode_t ext2fs_resize_block_bitmap(__u32 new_end, __u64 new_real_end,
ext2fs_block_bitmap bmap);
extern errcode_t ext2fs_copy_bitmap(ext2fs_generic_bitmap src,
ext2fs_generic_bitmap *dest);
diff -upNr e2fsprogs-1.39/lib/ext2fs/gen_bitmap.c e2fsprogs-1.39.tmp/lib/ext2fs/gen_bitmap.c
--- e2fsprogs-1.39/lib/ext2fs/gen_bitmap.c 2005-09-06 18:40:14.000000000 +0900
+++ e2fsprogs-1.39.tmp/lib/ext2fs/gen_bitmap.c 2006-04-12 13:27:56.000000000 +0900
@@ -28,7 +28,7 @@
#include "ext2fs.h"
int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap,
- __u32 bitno)
+ __u64 bitno)
{
if ((bitno < bitmap->start) || (bitno > bitmap->end)) {
ext2fs_warn_bitmap2(bitmap, EXT2FS_MARK_ERROR, bitno);
@@ -38,7 +38,7 @@ int ext2fs_mark_generic_bitmap(ext2fs_ge
}
int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap,
- blk_t bitno)
+ blk64_t bitno)
{
if ((bitno < bitmap->start) || (bitno > bitmap->end)) {
ext2fs_warn_bitmap2(bitmap, EXT2FS_UNMARK_ERROR, bitno);
diff -upNr e2fsprogs-1.39/lib/ext2fs/rs_bitmap.c e2fsprogs-1.39.tmp/lib/ext2fs/rs_bitmap.c
--- e2fsprogs-1.39/lib/ext2fs/rs_bitmap.c 2005-09-06 18:40:14.000000000 +0900
+++ e2fsprogs-1.39.tmp/lib/ext2fs/rs_bitmap.c 2006-04-12 13:27:56.000000000 +0900
@@ -26,7 +26,7 @@
#include "ext2_fs.h"
#include "ext2fs.h"
-errcode_t ext2fs_resize_generic_bitmap(__u32 new_end, __u32 new_real_end,
+errcode_t ext2fs_resize_generic_bitmap(__u32 new_end, __u64 new_real_end,
ext2fs_generic_bitmap bmap)
{
errcode_t retval;
@@ -87,7 +87,7 @@ errcode_t ext2fs_resize_inode_bitmap(__u
return retval;
}
-errcode_t ext2fs_resize_block_bitmap(__u32 new_end, __u32 new_real_end,
+errcode_t ext2fs_resize_block_bitmap(__u32 new_end, __u64 new_real_end,
ext2fs_block_bitmap bmap)
{
errcode_t retval;
diff -upNr e2fsprogs-1.39/resize/resize2fs.c e2fsprogs-1.39.tmp/resize/resize2fs.c
--- e2fsprogs-1.39/resize/resize2fs.c 2006-04-12 13:27:51.000000000 +0900
+++ e2fsprogs-1.39.tmp/resize/resize2fs.c 2006-04-12 13:27:56.000000000 +0900
@@ -181,7 +181,7 @@ errcode_t adjust_fs_info(ext2_filsys fs,
int overhead = 0;
int rem;
blk_t blk, group_block;
- ext2_ino_t real_end;
+ blk64_t real_end;
int adj, old_numblocks, numblocks, adjblocks;
unsigned long i, j, old_desc_blocks, max_group;
unsigned int meta_bg, meta_bg_size;
@@ -266,7 +266,7 @@ retry:
if (retval) goto errout;
real_end = ((EXT2_BLOCKS_PER_GROUP(fs->super)
- * fs->group_desc_count)) - 1 +
+ * (__u64)fs->group_desc_count)) - 1 +
fs->super->s_first_data_block;
retval = ext2fs_resize_block_bitmap(fs->super->s_blocks_count-1,
real_end, fs->block_map);
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Ext2-devel] [RFC][15/21]e2fsprogs modify variables for bitmap to exceed 2G
2006-04-13 7:12 [RFC][15/21]e2fsprogs modify variables for bitmap to exceed 2G sho
@ 2006-04-13 16:20 ` Theodore Ts'o
2006-04-17 12:30 ` Takashi Sato
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Theodore Ts'o @ 2006-04-13 16:20 UTC (permalink / raw)
To: sho; +Cc: Ext2-devel, linux-kernel
On Thu, Apr 13, 2006 at 04:12:27PM +0900, sho@tnes.nec.co.jp wrote:
> Summary of this patch:
> [15/21] change the type of variables which manipulate bitmap
> - Change the type of 4byte variables manipulating bitmap
> from signed to unsigned.
Generalized NACK. We can't just blindly change function signatures of
pre-existing functions in libext2fs, since this breaks the ABI with
pre-existing applications linked with current shared libraries of
libext2fs.
We could bump the major version number, but what I'd much rather do is
to create new functions which use the 64-bit blk64_t (i.e.,
ext2fs_mark_block_bitmap2). This will make the patches much bigger,
but it allows us to preserve backwards compatibility.
> --- e2fsprogs-1.39/lib/ext2fs/bitmaps.c 2005-09-06 18:40:14.000000000 +0900
> +++ e2fsprogs-1.39.tmp/lib/ext2fs/bitmaps.c 2006-04-12 13:27:56.000000000 +0900
> errcode_t ext2fs_allocate_generic_bitmap(__u32 start,
> __u32 end,
> - __u32 real_end,
> + __u64 real_end,
> const char *descr,
> ext2fs_generic_bitmap *ret)
Breaks the ABI
> @@ -181,7 +182,7 @@ errcode_t ext2fs_fudge_inode_bitmap_end(
> }
>
> errcode_t ext2fs_fudge_block_bitmap_end(ext2fs_block_bitmap bitmap,
> - blk_t end, blk_t *oend)
> + blk64_t end, blk64_t *oend)
Breaks the ABI.
> --- e2fsprogs-1.39/lib/ext2fs/bitops.c 2005-09-06 18:40:14.000000000 +0900
> +++ e2fsprogs-1.39.tmp/lib/ext2fs/bitops.c 2006-04-12 13:27:56.000000000 +0900
> @@ -66,26 +66,26 @@ int ext2fs_test_bit(unsigned int nr, con
>
> #endif /* !_EXT2_HAVE_ASM_BITOPS_ */
>
> -void ext2fs_warn_bitmap(errcode_t errcode, unsigned long arg,
> +void ext2fs_warn_bitmap(errcode_t errcode, unsigned long long arg,
Breaks the ABI
> void ext2fs_warn_bitmap2(ext2fs_generic_bitmap bitmap,
> - int code, unsigned long arg)
> + int code, unsigned long long arg)
Breaks the ABI
> diff -upNr e2fsprogs-1.39/lib/ext2fs/bitops.h e2fsprogs-1.39.tmp/lib/ext2fs/bitops.h
> --- e2fsprogs-1.39/lib/ext2fs/bitops.h 2006-03-30 02:51:53.000000000 +0900
> +++ e2fsprogs-1.39.tmp/lib/ext2fs/bitops.h 2006-04-12 13:28:14.000000000 +0900
> @@ -52,15 +52,15 @@ extern const char *ext2fs_inode_string;
> extern const char *ext2fs_mark_string;
> extern const char *ext2fs_unmark_string;
> extern const char *ext2fs_test_string;
> -extern void ext2fs_warn_bitmap(errcode_t errcode, unsigned long arg,
> +extern void ext2fs_warn_bitmap(errcode_t errcode, unsigned long long arg,
> const char *description);
Breaks the ABI.
> extern void ext2fs_warn_bitmap2(ext2fs_generic_bitmap bitmap,
> - int code, unsigned long arg);
> + int code, unsigned long long arg);
>
> -extern int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block);
> +extern int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap, blk64_t block);
Breaks the ABI.
> extern int ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
> - blk_t block);
> -extern int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block);
> + blk64_t block);
> +extern int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap, blk64_t block);
>
Breaks the ABI.
> extern int ext2fs_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode);
> extern int ext2fs_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap,
> @@ -68,11 +68,11 @@ extern int ext2fs_unmark_inode_bitmap(ex
> extern int ext2fs_test_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode);
>
> extern void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap,
> - blk_t block);
> + blk64_t block);
> extern void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
Breaks the ABI.
> - blk_t block);
> + blk64_t block);
> extern int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap,
> - blk_t block);
> + blk64_t block);
>
Breaks the ABI.
> extern void ext2fs_fast_mark_inode_bitmap(ext2fs_inode_bitmap bitmap,
> ext2_ino_t inode);
> @@ -86,24 +86,24 @@ extern blk_t ext2fs_get_block_bitmap_end
> extern ext2_ino_t ext2fs_get_inode_bitmap_end(ext2fs_inode_bitmap bitmap);
>
> extern void ext2fs_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
> - blk_t block, int num);
> + blk64_t block, int num);
Breaks the ABI.
> extern void ext2fs_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
> - blk_t block, int num);
> + blk64_t block, int num);
Breaks the ABI.
> extern int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap,
> - blk_t block, int num);
> + blk64_t block, int num);
Breaks the ABI.
> extern void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
> - blk_t block, int num);
> + blk64_t block, int num);
Breaks the ABI.
> extern void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
> - blk_t block, int num);
> + blk64_t block, int num);
Breaks the ABI.
> extern int ext2fs_fast_test_block_bitmap_range(ext2fs_block_bitmap bitmap,
> - blk_t block, int num);
> + blk64_t block, int num);
Breaks the ABI.
> extern void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map);
>
> /* These two routines moved to gen_bitmap.c */
> extern int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap,
> - __u32 bitno);
> + __u64 bitno);
Breaks the ABI.
> extern int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap,
> - blk_t bitno);
> + blk64_t bitno);
Breaks the ABI.
> /*
> * The inline routines themselves...
> *
> @@ -391,10 +391,10 @@ _INLINE_ int ext2fs_find_next_bit_set (v
> #endif
>
> _INLINE_ int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap,
> - blk_t bitno);
> + blk64_t bitno);
>
Breaks the ABI.
etc....
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Ext2-devel] [RFC][15/21]e2fsprogs modify variables for bitmap to exceed 2G
2006-04-13 16:20 ` [Ext2-devel] " Theodore Ts'o
@ 2006-04-17 12:30 ` Takashi Sato
2006-04-17 12:48 ` Adrian Bunk
2006-04-17 13:01 ` Arjan van de Ven
2006-04-18 7:45 ` Takashi Sato
2 siblings, 1 reply; 7+ messages in thread
From: Takashi Sato @ 2006-04-17 12:30 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: linux-kernel, Ext2-devel
Thank you for your comment, Ted.
> Generalized NACK. We can't just blindly change function signatures of
> pre-existing functions in libext2fs, since this breaks the ABI with
> pre-existing applications linked with current shared libraries of
> libext2fs.
Though I checked if there are any commands which use the following
functions in RHEL4, no such commands were found except in e2fsprogs
itself.
ext2fs_allocate_generic_bitmap()
ext2fs_fudge_block_bitmap_end()
ext2fs_warn_bitmap()
ext2fs_test_generic_bitmap()
ext2fs_mark_block_bitmap()
ext2fs_unmark_block_bitmap()
ext2fs_test_block_bitmap()
ext2fs_fast_test_block_bitmap_range()
ext2fs_mark_block_bitmap_range()
ext2fs_fast_mark_block_bitmap_range()
ext2fs_unmark_block_bitmap_range()
ext2fs_fast_unmark_block_bitmap_range()
ext2fs_mark_generic_bitmap()
ext2fs_unmark_generic_bitmap()
ext2fs_resize_generic_bitmap()
ext2fs_resize_block_bitmap()
So I think changing these function signatures does not break the ABI
practically. Am I missing something?
Cheers, sho
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Ext2-devel] [RFC][15/21]e2fsprogs modify variables for bitmap to exceed 2G
2006-04-17 12:30 ` Takashi Sato
@ 2006-04-17 12:48 ` Adrian Bunk
2006-04-18 4:37 ` Takashi Sato
0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2006-04-17 12:48 UTC (permalink / raw)
To: Takashi Sato; +Cc: Theodore Ts'o, linux-kernel, Ext2-devel
On Mon, Apr 17, 2006 at 09:30:39PM +0900, Takashi Sato wrote:
> Thank you for your comment, Ted.
>
> >Generalized NACK. We can't just blindly change function signatures of
> >pre-existing functions in libext2fs, since this breaks the ABI with
> >pre-existing applications linked with current shared libraries of
> >libext2fs.
>
> Though I checked if there are any commands which use the following
> functions in RHEL4, no such commands were found except in e2fsprogs
> itself.
>...
> ext2fs_test_block_bitmap()
>...
Used by e2undel [1].
> So I think changing these function signatures does not break the ABI
> practically. Am I missing something?
>
> Cheers, sho
cu
Adrian
[1] http://e2undel.sourceforge.net/
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Ext2-devel] [RFC][15/21]e2fsprogs modify variables for bitmap to exceed 2G
2006-04-13 16:20 ` [Ext2-devel] " Theodore Ts'o
2006-04-17 12:30 ` Takashi Sato
@ 2006-04-17 13:01 ` Arjan van de Ven
2006-04-18 7:45 ` Takashi Sato
2 siblings, 0 replies; 7+ messages in thread
From: Arjan van de Ven @ 2006-04-17 13:01 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: sho, Ext2-devel, linux-kernel
On Thu, 2006-04-13 at 12:20 -0400, Theodore Ts'o wrote:
> On Thu, Apr 13, 2006 at 04:12:27PM +0900, sho@tnes.nec.co.jp wrote:
> > Summary of this patch:
> > [15/21] change the type of variables which manipulate bitmap
> > - Change the type of 4byte variables manipulating bitmap
> > from signed to unsigned.
>
> Generalized NACK. We can't just blindly change function signatures of
> pre-existing functions in libext2fs, since this breaks the ABI with
> pre-existing applications linked with current shared libraries of
> libext2fs.
>
> We could bump the major version number, but what I'd much rather do is
> to create new functions which use the 64-bit blk64_t (i.e.,
> ext2fs_mark_block_bitmap2). This will make the patches much bigger,
> but it allows us to preserve backwards compatibility.
would this be a time to consider using ELF function versioning (similar
to what glibc and others use for abi comat) in libext2fs ?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Ext2-devel] [RFC][15/21]e2fsprogs modify variables for bitmap to exceed 2G
2006-04-17 12:48 ` Adrian Bunk
@ 2006-04-18 4:37 ` Takashi Sato
0 siblings, 0 replies; 7+ messages in thread
From: Takashi Sato @ 2006-04-18 4:37 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Theodore Ts'o, linux-kernel, Ext2-devel
Thanks for your info, Adrian.
>> Though I checked if there are any commands which use the following
>> functions in RHEL4, no such commands were found except in e2fsprogs
>> itself.
>>...
>> ext2fs_test_block_bitmap()
>>...
>
> Used by e2undel [1].
The function is certainly used in this command. Then I'll consider
adding new functions which use blk64_t.
Cheers, sho
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Ext2-devel] [RFC][15/21]e2fsprogs modify variables for bitmap to exceed 2G
2006-04-13 16:20 ` [Ext2-devel] " Theodore Ts'o
2006-04-17 12:30 ` Takashi Sato
2006-04-17 13:01 ` Arjan van de Ven
@ 2006-04-18 7:45 ` Takashi Sato
2 siblings, 0 replies; 7+ messages in thread
From: Takashi Sato @ 2006-04-18 7:45 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: linux-kernel, Ext2-devel
Hi, Ted
> We could bump the major version number, but what I'd much rather do is
> to create new functions which use the 64-bit blk64_t (i.e.,
> ext2fs_mark_block_bitmap2). This will make the patches much bigger,
> but it allows us to preserve backwards compatibility.
I'm trying to add new functions which use the 64-bit block number in
e2fsprogs. But I think the name "ext2fs_mark_blocks_bitmap2" is rather
obscure. How about adding "_64" to the end of the name? (i.e. ext2fs_
mark_block_bitmap_64 for ext2fs_mark_block_bitmap)
Cheers, sho
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-04-18 7:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-13 7:12 [RFC][15/21]e2fsprogs modify variables for bitmap to exceed 2G sho
2006-04-13 16:20 ` [Ext2-devel] " Theodore Ts'o
2006-04-17 12:30 ` Takashi Sato
2006-04-17 12:48 ` Adrian Bunk
2006-04-18 4:37 ` Takashi Sato
2006-04-17 13:01 ` Arjan van de Ven
2006-04-18 7:45 ` Takashi Sato
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox