Whamcloud - gitweb
libext2fs: find/alloc a range of empty blocks
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 17 May 2015 00:56:32 +0000 (20:56 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 17 May 2015 01:02:18 +0000 (21:02 -0400)
commit5a980264434c83a3df50b842117a41d5d70b1dab
tree50cddca3790874e25a5026173588a32af8424ae2
parent60a212f773ba116b4f7a9edb5eb76b40668ea8a0
libext2fs: find/alloc a range of empty blocks

Provide a function that, given a goal pblk and a range, will try to
find a run of free blocks to satisfy the allocation.  By default the
function will look anywhere in the filesystem for the run, though this
can be constrained with optional flags.  One flag indicates that the
range must start at the goal block; the other flag indicates that we
should not return a range shorter than len.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/alloc.c
lib/ext2fs/ext2fs.h