Update free space find algorithm.

Signed-off-by: yushijinhun <yushijinhun@gmail.com>