Performance enhancements to speed up creating a journal and

block and inode allocation in general.
bitmap-optimize
Theodore Ts'o 2001-08-05 20:31:09 -04:00
parent 888b29d14b
commit 89a6ebd524
3 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,16 @@
2001-08-05 Theodore Tso <tytso@valinux.com>
* alloc.c (ext2fs_new_inode, ext2fs_new_block): Use the fast
version of the bitmap test routines to speed up these
routines. (At some point I may want to make these
routines use the find_first_bit functions, but that will
add a lot of complexity since it means that these
functions will have to break the bitmap abstraction
boundary. It's not clear it's worth it.)
* mkjournal.c (mkjournal_proc): Remember the last block allocated
to speed up ext2fs_new_block().
2001-07-29 Theodore Tso <tytso@valinux.com>
* finddev.c (scan_dir): Fix memory leak; we weren't calling

View File

@ -55,7 +55,7 @@ errcode_t ext2fs_new_inode(ext2_filsys fs, ext2_ino_t dir, int mode,
i = start_inode;
do {
if (!ext2fs_test_inode_bitmap(map, i))
if (!ext2fs_fast_test_inode_bitmap(map, i))
break;
i++;
if (i > fs->super->s_inodes_count)
@ -87,7 +87,7 @@ errcode_t ext2fs_new_block(ext2_filsys fs, blk_t goal,
goal = fs->super->s_first_data_block;
i = goal;
do {
if (!ext2fs_test_block_bitmap(map, i)) {
if (!ext2fs_fast_test_block_bitmap(map, i)) {
*ret = i;
return 0;
}

View File

@ -179,6 +179,7 @@ static int mkjournal_proc(ext2_filsys fs,
return BLOCK_ABORT;
}
*blocknr = new_blk;
last_blk = new_blk;
ext2fs_mark_block_bitmap(fs->block_map, new_blk);
ext2fs_mark_bb_dirty(fs);
group = ext2fs_group_of_blk(fs, new_blk);