On Sun, Aug 10, 2014 at 10:21:51PM -0700, Darrick J. Wong wrote: > > It turns out that each of the calls to ext2fs_resize_mem in the > ext2fs_add_dir_block2() function is costing us ~2ms for each call to this > function. I'll add a new ext2fs_init_dblist() APi that lets us specify the > initial size of the list. This seems to reduce the fsck runtime by a few more > seconds. I suspect dblist is the wrong abstraction to use here. Since the blocks we want to read ahead are generally going to be contiguous, why not use a rbtree bitmap, setting the blocks that should be subject to readahead, and then use the find_first_set() function to iterate over the bitmap? Or if you want to be even more efficient, create an interator function which takes a bitmap and returns blocks that are set in the bitmap, one by one. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html