On Wed, Oct 18, 2023 at 09:25:09AM -0300, Wedson Almeida Filho wrote: > @@ -36,6 +39,9 @@ pub trait FileSystem { > > /// Returns the inode corresponding to the directory entry with the given name. > fn lookup(parent: &INode<Self>, name: &[u8]) -> Result<ARef<INode<Self>>>; > + > + /// Reads the contents of the inode into the given folio. > + fn read_folio(inode: &INode<Self>, folio: LockedFolio<'_>) -> Result; > } > This really shouldn't be a per-filesystem operation. We have operations split up into mapping_ops, inode_ops and file_ops for a reason. In this case, read_folio() can have a very different implementation for, eg, symlinks, directories and files. So we want to have different aops for each of symlinks, directories and files. We should maintain that separation for filesystems written in Rust too. Unless there's a good reason to change it, and then we should change it in C too.