erofs-utils: lib: add API to iterate dirs in EROFS

This introduces erofs_iterate_dir() to iterate all dirents in
a directory inode and convert erofsfuse to use the API.

Note that it doesn't recursively walk into sub-directories.
If it's really needed, users should handle this in the callback.

Link: https://lore.kernel.org/r/20211216012436.10111-1-xiang@kernel.org
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
7 files changed