Whamcloud - gitweb
libext2fs: add ext2fs_find_first_set_{block,inode}_bitmap2()
authorTheodore Ts'o <tytso@mit.edu>
Sun, 12 Jan 2014 20:57:31 +0000 (15:57 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 13 Jan 2014 19:02:06 +0000 (14:02 -0500)
commitdff0b6a333821ec28bfa029ffbc0dffb46c43170
tree0fe11a22a3d2a47286126e4995a5c4778d7acb7d
parent7e50795dfabd447d28131b4b163f4166637be3d0
libext2fs: add ext2fs_find_first_set_{block,inode}_bitmap2()

Add functions which try to find the first set block or inode in a
bitmap.  This is useful when trying to allocate a range of blocks
efficiently.

Like the find_first_zero family of functions, provide a generic O(N)
search function which will be used if there is no optimized version
provided by the red-black tree or bitarray functions.

Also, expand the test cases for ext2fs_find_first_zero_*() functions.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/bitops.h
lib/ext2fs/bmap64.h
lib/ext2fs/ext2fs.h
lib/ext2fs/gen_bitmap.c
lib/ext2fs/gen_bitmap64.c
lib/ext2fs/tst_bitmaps.c
lib/ext2fs/tst_bitmaps_cmd.ct
lib/ext2fs/tst_bitmaps_cmds
lib/ext2fs/tst_bitmaps_exp