From: Theodore Ts'o Date: Sun, 31 Jan 2010 02:22:17 +0000 (-0500) Subject: Merge branch 'maint' into next X-Git-Tag: v1.42-WIP-0702~116 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2d07b3ad98bfe1db5fb1071f53a5338ab6c35522;p=thirdparty%2Fe2fsprogs.git Merge branch 'maint' into next Conflicts: configure lib/ext2fs/alloc_tables.c misc/mke2fs.c --- 2d07b3ad98bfe1db5fb1071f53a5338ab6c35522 diff --cc configure index eedcefc88,12d6a9f4a..b97521f1d --- a/configure +++ b/configure @@@ -15826,136 -10599,12 +10599,12 @@@ if test "$ac_res" != no; then fi fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -for ac_func in chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid usleep nanosleep getdtablesize getrlimit blkid_probe_get_topology +for ac_func in chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid usleep nanosleep getdtablesize getrlimit sync_file_range posix_fadvise fallocate blkid_probe_get_topology - do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` - { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 - $as_echo_n "checking for $ac_func... " >&6; } - if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - /* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ - #define $ac_func innocuous_$ac_func - - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - - #ifdef __STDC__ - # include - #else - # include - #endif - - #undef $ac_func - - /* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ - #ifdef __cplusplus - extern "C" - #endif - char $ac_func (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined __stub_$ac_func || defined __stub___$ac_func - choke me - #endif - - int - main () - { - return $ac_func (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" - else - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" - fi - - rm -rf conftest.dSYM - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - fi - ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } - as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" + eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF diff --cc e2fsck/pass1.c index 1578aa17b,0cb3fda4b..ed03af309 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@@ -2635,13 -2621,17 +2621,17 @@@ static errcode_t e2fsck_get_alloc_block { e2fsck_t ctx = (e2fsck_t) fs->priv_data; errcode_t retval; - blk_t new_block; + blk64_t new_block; if (ctx->block_found_map) { - retval = ext2fs_new_block(fs, (blk_t) goal, - ctx->block_found_map, &new_block); + retval = ext2fs_new_block2(fs, goal, ctx->block_found_map, + &new_block); if (retval) return retval; + if (fs->block_map) { - ext2fs_mark_block_bitmap(fs->block_map, new_block); ++ ext2fs_mark_block_bitmap2(fs->block_map, new_block); + ext2fs_mark_bb_dirty(fs); + } } else { if (!fs->block_map) { retval = ext2fs_read_block_bitmap(fs); diff --cc e2fsck/pass2.c index 1e91e6d01,761c2f1f6..29a0174a4 --- a/e2fsck/pass2.c +++ b/e2fsck/pass2.c @@@ -1465,8 -1457,8 +1459,8 @@@ static int allocate_dir_block(e2fsck_t * Finally, update the block pointers for the inode */ db->blk = blk; - pctx->errcode = ext2fs_block_iterate2(fs, db->ino, BLOCK_FLAG_HOLE, - 0, update_dir_block, db); - pctx->errcode = ext2fs_bmap(fs, db->ino, &inode, 0, BMAP_SET, - db->blockcnt, &blk); ++ pctx->errcode = ext2fs_bmap2(fs, db->ino, &inode, 0, BMAP_SET, ++ db->blockcnt, 0, &blk); if (pctx->errcode) { pctx->str = "ext2fs_block_iterate"; fix_problem(ctx, PR_2_ALLOC_DIRBOCK, pctx); diff --cc lib/ext2fs/alloc_tables.c index 44716652d,55e617430..ed5bfac88 --- a/lib/ext2fs/alloc_tables.c +++ b/lib/ext2fs/alloc_tables.c @@@ -180,9 -178,11 +180,11 @@@ errcode_t ext2fs_allocate_group_table(e * Allocate the inode table */ if (flexbg_size) { - blk_t prev_block = 0; - if (group && fs->group_desc[group-1].bg_inode_table) - prev_block = fs->group_desc[group-1].bg_inode_table; + blk64_t prev_block = 0; + if (group && ext2fs_inode_table_loc(fs, group - 1)) + prev_block = ext2fs_inode_table_loc(fs, group - 1); + if (last_grp == fs->group_desc_count) + rem_grps = last_grp - group; group_blk = flexbg_offset(fs, group, prev_block, bmap, flexbg_size * 2, fs->inode_blocks_per_group *