You need to read the source together with the fs format documentation
(found on the sourceforge page, or the kernel source). Sadly, a large
part of any filesystem code is interfacing other parts of the kernel,
and it would be awkward to document the rest of the kernel from within
a different component.
A readdir() function (referenced from romfs_dir_operations) is the
workhorse to do what you expect from the ls command. It can be called
on a directory, and the fs is requried to return the list of files in
that directory. How it's returned was streamlined in the past few
years, so it's not very straightforward, but it has to cope with much
more complex filesystems as well.
In romfs the inode of a file is actually the location of the file
metadata on disk, but it has to be on a 16-byte boundary.
Technically, it should come from the kernel itself, so it should
already be safe, but it made sense at the time.
Janos