diff options
author | Theodore Ts'o <tytso@mit.edu> | 1998-06-10 20:39:43 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 1998-06-10 20:39:43 +0000 |
commit | 03673dbb04a3458ce78a394f27d17d434b51a714 (patch) | |
tree | ddc7dbbf5505b6f427235a3ed73972afaffacb47 /lib/ext2fs/alloc_tables.c | |
parent | 084307590c5e28b6a8305933220ff5b2bd1bcda2 (diff) | |
download | android_external_e2fsprogs-03673dbb04a3458ce78a394f27d17d434b51a714.tar.gz android_external_e2fsprogs-03673dbb04a3458ce78a394f27d17d434b51a714.tar.bz2 android_external_e2fsprogs-03673dbb04a3458ce78a394f27d17d434b51a714.zip |
Many files:
alloc_tables.c (ext2fs_allocate_group_table): Fix bug so that if the
stride length hits a bad value, we retry the block allocation starting
at the beginning of the block group.
ext2fs.h, bb_inode.c, block.c, bmove.c, dir_iterate.c, expanddir.c,
ext2fsP.h, read_bb.c: Change blkcnt_t to be e2_blkcnt_t to avoid
collision with LFS API.
Diffstat (limited to 'lib/ext2fs/alloc_tables.c')
-rw-r--r-- | lib/ext2fs/alloc_tables.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ext2fs/alloc_tables.c b/lib/ext2fs/alloc_tables.c index 3a057596..3660c5e0 100644 --- a/lib/ext2fs/alloc_tables.c +++ b/lib/ext2fs/alloc_tables.c @@ -85,6 +85,9 @@ errcode_t ext2fs_allocate_group_table(ext2_filsys fs, int group, if (!fs->group_desc[group].bg_block_bitmap) { retval = ext2fs_get_free_blocks(fs, start_blk, last_blk, 1, bmap, &new_blk); + if (retval == EXT2_ET_BLOCK_ALLOC_FAIL) + retval = ext2fs_get_free_blocks(fs, group_blk, + last_blk, 1, bmap, &new_blk); if (retval) return retval; ext2fs_mark_block_bitmap(bmap, new_blk); @@ -94,6 +97,9 @@ errcode_t ext2fs_allocate_group_table(ext2_filsys fs, int group, if (!fs->group_desc[group].bg_inode_bitmap) { retval = ext2fs_get_free_blocks(fs, start_blk, last_blk, 1, bmap, &new_blk); + if (retval == EXT2_ET_BLOCK_ALLOC_FAIL) + retval = ext2fs_get_free_blocks(fs, group_blk, + last_blk, 1, bmap, &new_blk); if (retval) return retval; ext2fs_mark_block_bitmap(bmap, new_blk); |